Skip to content

Commit 817483a

Browse files
committed
more tests
1 parent b2c8f6f commit 817483a

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

packages/css-color-parser/test/basic/color-mix-function.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,10 @@ const tests = [
140140
['color-mix(in oklch, rgb(200, 100, 50), oklch(none none none))', 'rgb(200, 100, 50)'],
141141
['color-mix(in oklch, rgb(200, 100, 50), lab(none none none))', 'rgb(200, 100, 50)'],
142142
['color-mix(in oklch, lab(40% 20% 10%), lab(40% 20% 10%))', 'rgb(136, 77, 75)'],
143+
144+
// non-unity alpha
145+
['color-mix(in srgb, rgb(100% 0% 0% / 0.7) 25%, rgb(0% 100% 0% / 0.2))', canonicalize('color(srgb 0.53846 0.46154 0 / 0.325)')],
146+
['color-mix(in srgb, rgb(100% 0% 0% / 0.7) 20%, rgb(0% 100% 0% / 0.2) 60%)', canonicalize('color(srgb 0.53846 0.46154 0 / 0.260)')],
143147
];
144148

145149
for (const test of tests) {

0 commit comments

Comments
 (0)