File tree Expand file tree Collapse file tree 7 files changed +42
-7
lines changed
src/test/java/org/htmlunit/cssparser/parser Expand file tree Collapse file tree 7 files changed +42
-7
lines changed Original file line number Diff line number Diff line change @@ -95,11 +95,16 @@ public void hslMixed() throws Exception {
9595 @ Test
9696 public void hslRelative () throws Exception {
9797 color ("foreground: hsl(from red h s l)" , "foreground: hsl(from red h s l)" );
98+ color ("foreground: hsl(from red h s l / alpha)" , "foreground: hsl(from red h s l / alpha)" );
99+
98100 color ("foreground: hsl(from red 7 11% 13%)" , "foreground: hsl(from red 7 11% 13%)" );
101+ color ("foreground: hsl(from red 7 11% 13% / 0.7)" , "foreground: hsl(from red 7 11% 13% / 0.7)" );
102+
99103 color ("foreground: hsl(from rgb(200 170 0) 7 11% 13%)" , "foreground: hsl(from rgb(200 170 0) 7 11% 13%)" );
100104 color ("foreground: hsl(from var(--base-color) 7 11% 13%)" , "foreground: hsl(from var(--base-color) 7 11% 13%)" );
101105
102106 color ("foreground: hsl(from red calc(h + 7) calc(s - 11%) calc(l * 13%))" , "foreground: hsl(from red calc(h + 7) calc(s - 11%) calc(l * 13%))" );
107+ color ("foreground: hsl(from red calc(h + 7) calc(s - 11%) calc(l * 13%) / calc(alpha / 2))" , "foreground: hsl(from red calc(h + 7) calc(s - 11%) calc(l * 13%) / calc(alpha / 2))" );
103108 }
104109
105110 /**
Original file line number Diff line number Diff line change @@ -58,11 +58,16 @@ public void hwbBlank() throws Exception {
5858 @ Test
5959 public void hwbRelative () throws Exception {
6060 color ("foreground: hwb(from red h w b)" , "foreground: hwb(from red h w b)" );
61+ color ("foreground: hwb(from red h w b / alpha)" , "foreground: hwb(from red h w b / alpha)" );
62+
6163 color ("foreground: hwb(from red 7 11% 13%)" , "foreground: hwb(from red 7 11% 13%)" );
64+ color ("foreground: hwb(from red 7 11% 13% / 0.7)" , "foreground: hwb(from red 7 11% 13% / 0.7)" );
65+
6266 color ("foreground: hwb(from rgb(200 170 0) 7 11% 13%)" , "foreground: hwb(from rgb(200 170 0) 7 11% 13%)" );
6367 color ("foreground: hwb(from var(--base-color) 7 11% 13%)" , "foreground: hwb(from var(--base-color) 7 11% 13%)" );
6468
6569 color ("foreground: hwb(from red calc(h + 7) calc(w - 11%) calc(b * 13%))" , "foreground: hwb(from red calc(h + 7) calc(w - 11%) calc(b * 13%))" );
70+ color ("foreground: hwb(from red calc(h + 7) calc(w - 11%) calc(b * 13%) / calc(alpha / 2))" , "foreground: hwb(from red calc(h + 7) calc(w - 11%) calc(b * 13%) / calc(alpha / 2))" );
6671 }
6772
6873 /**
Original file line number Diff line number Diff line change @@ -70,11 +70,16 @@ public void labMixed() throws Exception {
7070 @ Test
7171 public void labRelative () throws Exception {
7272 color ("foreground: lab(from red l a b)" , "foreground: lab(from red l a b)" );
73+ color ("foreground: lab(from red l a b / alpha)" , "foreground: lab(from red l a b / alpha)" );
74+
7375 color ("foreground: lab(from red 7 11% 13%)" , "foreground: lab(from red 7 11% 13%)" );
76+ color ("foreground: lab(from red 7 11% 13% / 0.7)" , "foreground: lab(from red 7 11% 13% / 0.7)" );
77+
7478 color ("foreground: lab(from rgb(200 170 0) 7 11% 13%)" , "foreground: lab(from rgb(200 170 0) 7 11% 13%)" );
7579 color ("foreground: lab(from var(--base-color) 7 11% 13%)" , "foreground: lab(from var(--base-color) 7 11% 13%)" );
7680
77- color ("foreground: lab(from red calc(h + 7) calc(w - 11%) calc(b * 13%))" , "foreground: lab(from red calc(h + 7) calc(w - 11%) calc(b * 13%))" );
81+ color ("foreground: lab(from red calc(l + 7) calc(a - 11%) calc(b * 13%))" , "foreground: lab(from red calc(l + 7) calc(a - 11%) calc(b * 13%))" );
82+ color ("foreground: lab(from red calc(l + 7) calc(a - 11%) calc(b * 13%) / calc(alpha / 2))" , "foreground: lab(from red calc(l + 7) calc(a - 11%) calc(b * 13%) / calc(alpha / 2))" );
7883 }
7984
8085 /**
Original file line number Diff line number Diff line change @@ -70,11 +70,16 @@ public void lchMixed() throws Exception {
7070 @ Test
7171 public void lchRelative () throws Exception {
7272 color ("foreground: lch(from red l c h)" , "foreground: lch(from red l c h)" );
73+ color ("foreground: lch(from red l c h / alpha)" , "foreground: lch(from red l c h / alpha)" );
74+
7375 color ("foreground: lch(from red 7 11% 13deg)" , "foreground: lch(from red 7 11% 13deg)" );
76+ color ("foreground: lch(from red 7 11% 13deg / 0.7)" , "foreground: lch(from red 7 11% 13deg / 0.7)" );
77+
7478 color ("foreground: lch(from rgb(200 170 0) 7 11% 13deg)" , "foreground: lch(from rgb(200 170 0) 7 11% 13deg)" );
7579 color ("foreground: lch(from var(--base-color) 7 11% 13deg)" , "foreground: lch(from var(--base-color) 7 11% 13deg)" );
7680
77- color ("foreground: lch(from red calc(h + 7) calc(w - 11%) calc(b * 13deg))" , "foreground: lch(from red calc(h + 7) calc(w - 11%) calc(b * 13deg))" );
81+ color ("foreground: lch(from red calc(l + 7) calc(c - 11%) calc(h * 13deg))" , "foreground: lch(from red calc(l + 7) calc(c - 11%) calc(h * 13deg))" );
82+ color ("foreground: lch(from red calc(l + 7) calc(c - 11%) calc(h * 13deg) / calc(alpha / 2))" , "foreground: lch(from red calc(l + 7) calc(c - 11%) calc(h * 13deg) / calc(alpha / 2))" );
7883 }
7984
8085 /**
Original file line number Diff line number Diff line change @@ -68,13 +68,18 @@ public void oklabMixed() throws Exception {
6868 * @throws Exception in case of failure
6969 */
7070 @ Test
71- public void labRelative () throws Exception {
71+ public void oklabRelative () throws Exception {
7272 color ("foreground: oklab(from red l a b)" , "foreground: oklab(from red l a b)" );
73+ color ("foreground: oklab(from red l a b / alpha)" , "foreground: oklab(from red l a b / alpha)" );
74+
7375 color ("foreground: oklab(from red 7 11% 13%)" , "foreground: oklab(from red 7 11% 13%)" );
76+ color ("foreground: oklab(from red 7 11% 13% / 0.7)" , "foreground: oklab(from red 7 11% 13% / 0.7)" );
77+
7478 color ("foreground: oklab(from rgb(200 170 0) 7 11% 13%)" , "foreground: oklab(from rgb(200 170 0) 7 11% 13%)" );
7579 color ("foreground: oklab(from var(--base-color) 7 11% 13%)" , "foreground: oklab(from var(--base-color) 7 11% 13%)" );
7680
77- color ("foreground: oklab(from red calc(h + 7) calc(w - 11%) calc(b * 13%))" , "foreground: oklab(from red calc(h + 7) calc(w - 11%) calc(b * 13%))" );
81+ color ("foreground: oklab(from red calc(l + 7) calc(a - 11%) calc(b * 13%))" , "foreground: oklab(from red calc(l + 7) calc(a - 11%) calc(b * 13%))" );
82+ color ("foreground: oklab(from red calc(l + 7) calc(a - 11%) calc(b * 13%) / calc(alpha / 2))" , "foreground: oklab(from red calc(l + 7) calc(a - 11%) calc(b * 13%) / calc(alpha / 2))" );
7883 }
7984
8085 /**
Original file line number Diff line number Diff line change @@ -68,13 +68,18 @@ public void oklchMixed() throws Exception {
6868 * @throws Exception in case of failure
6969 */
7070 @ Test
71- public void lchRelative () throws Exception {
71+ public void oklchRelative () throws Exception {
7272 color ("foreground: oklch(from red l c h)" , "foreground: oklch(from red l c h)" );
73+ color ("foreground: oklch(from red l c h / alpha)" , "foreground: oklch(from red l c h / alpha)" );
74+
7375 color ("foreground: oklch(from red 7 11% 13deg)" , "foreground: oklch(from red 7 11% 13deg)" );
76+ color ("foreground: oklch(from red 7 11% 13deg / 0.7)" , "foreground: oklch(from red 7 11% 13deg / 0.7)" );
77+
7478 color ("foreground: oklch(from rgb(200 170 0) 7 11% 13deg)" , "foreground: oklch(from rgb(200 170 0) 7 11% 13deg)" );
7579 color ("foreground: oklch(from var(--base-color) 7 11% 13deg)" , "foreground: oklch(from var(--base-color) 7 11% 13deg)" );
7680
77- color ("foreground: oklch(from red calc(h + 7) calc(w - 11%) calc(b * 13deg))" , "foreground: oklch(from red calc(h + 7) calc(w - 11%) calc(b * 13deg))" );
81+ color ("foreground: oklch(from red calc(l + 7) calc(c - 11%) calc(h * 13deg))" , "foreground: oklch(from red calc(l + 7) calc(c - 11%) calc(h * 13deg))" );
82+ color ("foreground: oklch(from red calc(l + 7) calc(c - 11%) calc(h * 13deg) / calc(alpha / 2))" , "foreground: oklch(from red calc(l + 7) calc(c - 11%) calc(h * 13deg) / calc(alpha / 2))" );
7883 }
7984
8085 /**
Original file line number Diff line number Diff line change @@ -113,11 +113,16 @@ public void rgbMixed() throws Exception {
113113 @ Test
114114 public void rgbRelative () throws Exception {
115115 color ("foreground: rgb(from red r g b)" , "foreground: rgb(from red r g b)" );
116+ color ("foreground: rgb(from red r g b / alpha)" , "foreground: rgb(from red r g b / alpha)" );
117+
116118 color ("foreground: rgb(from red 7 11% 13%)" , "foreground: rgb(from red 7 11% 13%)" );
119+ color ("foreground: rgb(from red 7 11% 13% / 0.7)" , "foreground: rgb(from red 7 11% 13% / 0.7)" );
120+
117121 color ("foreground: rgb(from rgb(200 170 0) 7 11% 13%)" , "foreground: rgb(from rgb(200 170 0) 7 11% 13%)" );
118122 color ("foreground: rgb(from var(--base-color) 7 11% 13%)" , "foreground: rgb(from var(--base-color) 7 11% 13%)" );
119123
120- color ("foreground: rgb(from red calc(h + 7) calc(s - 11%) calc(l * 13%))" , "foreground: rgb(from red calc(h + 7) calc(s - 11%) calc(l * 13%))" );
124+ color ("foreground: rgb(from red calc(r + 7) calc(g - 11%) calc(b * 13%))" , "foreground: rgb(from red calc(r + 7) calc(g - 11%) calc(b * 13%))" );
125+ color ("foreground: rgb(from red calc(r + 7) calc(g - 11%) calc(b * 13%) / calc(alpha / 2))" , "foreground: rgb(from red calc(r + 7) calc(g - 11%) calc(b * 13%) / calc(alpha / 2))" );
121126 }
122127
123128 /**
You can’t perform that action at this time.
0 commit comments