File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
test/java/org/htmlunit/cssparser/parser Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1761,6 +1761,7 @@ LexicalUnit calcProduct(LexicalUnit prev) :
17611761//
17621762LexicalUnit calcValue(LexicalUnit prev) :
17631763{
1764+ Token t;
17641765 char op = ' ';
17651766 LexicalUnit head = LexicalUnitImpl.createIdent(null, "");
17661767}
@@ -1773,6 +1774,7 @@ LexicalUnit calcValue(LexicalUnit prev) :
17731774 prev = number(prev, op)
17741775 | prev = dimension(prev, op)
17751776 | prev = percentage(prev, op)
1777+ | t = ident() { prev = LexicalUnitImpl.createIdent(prev, unescape(t.image, false)); }
17761778 )
17771779 )
17781780 | prev = var(prev)
@@ -1876,6 +1878,7 @@ LexicalUnit calcNumberValue(LexicalUnit prev) :
18761878 (
18771879 (op = unaryOperator() )?
18781880 prev = number(prev, op)
1881+ | t = ident() { prev = LexicalUnitImpl.createIdent(prev, unescape(t.image, false)); }
18791882 )
18801883 | prev = var(prev)
18811884 |
Original file line number Diff line number Diff line change @@ -94,11 +94,12 @@ public void hslMixed() throws Exception {
9494 */
9595 @ Test
9696 public void hslRelative () throws Exception {
97- color ("foreground: hsl(from red r g b )" , "foreground: hsl(from red r g b )" );
97+ color ("foreground: hsl(from red h s l )" , "foreground: hsl(from red h s l )" );
9898 color ("foreground: hsl(from red 7 11% 13%)" , "foreground: hsl(from red 7 11% 13%)" );
9999 color ("foreground: hsl(from rgb(200 170 0) 7 11% 13%)" , "foreground: hsl(from rgb(200 170 0) 7 11% 13%)" );
100100 color ("foreground: hsl(from var(--base-color) 7 11% 13%)" , "foreground: hsl(from var(--base-color) 7 11% 13%)" );
101- // color("foreground: hsl(from var(--base-color) 7 11% 13%)", "foreground: red calc(h + 7) calc(s - 11%) calc(l * 13%)");
101+
102+ color ("foreground: red calc(h + 7) calc(s - 11%) calc(l * 13%)" , "foreground: red calc(h + 7) calc(s - 11%) calc(l * 13%)" );
102103 }
103104
104105 /**
You can’t perform that action at this time.
0 commit comments