From 1a2735c8927d4ceec02efca52e32bcce3a579cb5 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Wed, 19 Aug 2015 23:39:53 +0300 Subject: [PATCH] Handle 'grad' correctly in lists (#18687) Change-Id: I6a81ec9686aba32579ecde04493f4a904dea9b6b --- src/main/javacc/com/vaadin/sass/internal/Parser.jj | 2 +- src/test/resources/automatic/css/bourboun-derived-tests.css | 3 +++ .../resources/automatic/scss/bourboun-derived-tests.scss | 6 ++++++ 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 src/test/resources/automatic/css/bourboun-derived-tests.css create mode 100644 src/test/resources/automatic/scss/bourboun-derived-tests.scss diff --git a/src/main/javacc/com/vaadin/sass/internal/Parser.jj b/src/main/javacc/com/vaadin/sass/internal/Parser.jj index 178ef51b..415ad4a6 100644 --- a/src/main/javacc/com/vaadin/sass/internal/Parser.jj +++ b/src/main/javacc/com/vaadin/sass/internal/Parser.jj @@ -2512,7 +2512,7 @@ List numberTerm(char op) : | n= { result = LexicalUnitImpl.createRAD(n.beginLine, n.beginColumn, number(op, n, 3)); } | n= - { result = LexicalUnitImpl.createGRAD(n.beginLine, n.beginColumn, number(op, n, 3)); } + { result = LexicalUnitImpl.createGRAD(n.beginLine, n.beginColumn, number(op, n, 4)); } | n= { result = LexicalUnitImpl.createS(n.beginLine, n.beginColumn, number(op, n, 1)); } | n= diff --git a/src/test/resources/automatic/css/bourboun-derived-tests.css b/src/test/resources/automatic/css/bourboun-derived-tests.css new file mode 100644 index 00000000..883cbff9 --- /dev/null +++ b/src/test/resources/automatic/css/bourboun-derived-tests.css @@ -0,0 +1,3 @@ +.foo { + units: 1px, 1cm, 1mm, 1%, 1ch, 1pica, 1in, 1em, 1rem, 1pt, 1pc, 1ex, 1vw, 1vh, 1vmin, 1vmax, 1deg, 1rad, 1grad, 1turn; +} diff --git a/src/test/resources/automatic/scss/bourboun-derived-tests.scss b/src/test/resources/automatic/scss/bourboun-derived-tests.scss new file mode 100644 index 00000000..f8a8551c --- /dev/null +++ b/src/test/resources/automatic/scss/bourboun-derived-tests.scss @@ -0,0 +1,6 @@ + $units: 1px, 1cm, 1mm, 1%, 1ch, 1pica, 1in, 1em, 1rem, 1pt, 1pc, 1ex, 1vw, 1vh, 1vmin, 1vmax, 1deg, 1rad, 1grad, 1turn; + + .foo { + units: $units; + } + \ No newline at end of file