@@ -1848,7 +1848,7 @@ test "compile: plugin_css colors work with opacity modifiers" {
18481848 const result = try compile (alloc , & candidates , null , false , true , null , null , plugin );
18491849 defer alloc .free (result );
18501850 // Should use color-mix with the raw oklch value
1851- try std .testing .expect (std .mem .indexOf (u8 , result , "background-color:color-mix(in srgb,oklch(62.3% 0.214 259.815) 50%,transparent)" ) != null );
1851+ try std .testing .expect (std .mem .indexOf (u8 , result , "background-color:color-mix(in srgb, oklch(62.3% 0.214 259.815) 50%, transparent)" ) != null );
18521852}
18531853
18541854test "compile: plugin_css null is no-op" {
@@ -2029,37 +2029,37 @@ test "compile: bg color with opacity uses color-mix" {
20292029 const result = try compile (alloc , & candidates , null , false , true , null , null , null );
20302030 defer alloc .free (result );
20312031 // Base: color-mix in srgb with raw value
2032- try std .testing .expect (std .mem .indexOf (u8 , result , "background-color:color-mix(in srgb,#fff 10%,transparent)" ) != null );
2032+ try std .testing .expect (std .mem .indexOf (u8 , result , "background-color:color-mix(in srgb, #fff 10%, transparent)" ) != null );
20332033 // Enhanced: @supports with color-mix in oklab using var()
2034- try std .testing .expect (std .mem .indexOf (u8 , result , "@supports (color:color-mix(in lab,red,red))" ) != null );
2035- try std .testing .expect (std .mem .indexOf (u8 , result , "background-color:color-mix(in oklab,var(--color-white) 10%,transparent)" ) != null );
2034+ try std .testing .expect (std .mem .indexOf (u8 , result , "@supports (color: color-mix(in lab, red, red))" ) != null );
2035+ try std .testing .expect (std .mem .indexOf (u8 , result , "background-color:color-mix(in oklab, var(--color-white) 10%, transparent)" ) != null );
20362036}
20372037
20382038test "compile: border color with opacity uses color-mix" {
20392039 const alloc = std .testing .allocator ;
20402040 const candidates = [_ ][]const u8 {"border-cyan-400/20" };
20412041 const result = try compile (alloc , & candidates , null , false , true , null , null , null );
20422042 defer alloc .free (result );
2043- try std .testing .expect (std .mem .indexOf (u8 , result , "border-color:color-mix(in srgb," ) != null );
2044- try std .testing .expect (std .mem .indexOf (u8 , result , "border-color:color-mix(in oklab,var(--color-cyan-400) 20%,transparent)" ) != null );
2043+ try std .testing .expect (std .mem .indexOf (u8 , result , "border-color:color-mix(in srgb, " ) != null );
2044+ try std .testing .expect (std .mem .indexOf (u8 , result , "border-color:color-mix(in oklab, var(--color-cyan-400) 20%, transparent)" ) != null );
20452045}
20462046
20472047test "compile: gradient from with opacity uses color-mix" {
20482048 const alloc = std .testing .allocator ;
20492049 const candidates = [_ ][]const u8 {"from-violet-500/10" };
20502050 const result = try compile (alloc , & candidates , null , false , true , null , null , null );
20512051 defer alloc .free (result );
2052- try std .testing .expect (std .mem .indexOf (u8 , result , "--tw-gradient-from:color-mix(in srgb," ) != null );
2053- try std .testing .expect (std .mem .indexOf (u8 , result , "--tw-gradient-from:color-mix(in oklab,var(--color-violet-500) 10%,transparent)" ) != null );
2052+ try std .testing .expect (std .mem .indexOf (u8 , result , "--tw-gradient-from:color-mix(in srgb, " ) != null );
2053+ try std .testing .expect (std .mem .indexOf (u8 , result , "--tw-gradient-from:color-mix(in oklab, var(--color-violet-500) 10%, transparent)" ) != null );
20542054}
20552055
20562056test "compile: ring color with opacity uses color-mix" {
20572057 const alloc = std .testing .allocator ;
20582058 const candidates = [_ ][]const u8 {"ring-white/10" };
20592059 const result = try compile (alloc , & candidates , null , false , true , null , null , null );
20602060 defer alloc .free (result );
2061- try std .testing .expect (std .mem .indexOf (u8 , result , "--tw-ring-color:color-mix(in srgb,#fff 10%,transparent)" ) != null );
2062- try std .testing .expect (std .mem .indexOf (u8 , result , "--tw-ring-color:color-mix(in oklab,var(--color-white) 10%,transparent)" ) != null );
2061+ try std .testing .expect (std .mem .indexOf (u8 , result , "--tw-ring-color:color-mix(in srgb, #fff 10%, transparent)" ) != null );
2062+ try std .testing .expect (std .mem .indexOf (u8 , result , "--tw-ring-color:color-mix(in oklab, var(--color-white) 10%, transparent)" ) != null );
20632063}
20642064
20652065test "compile: space-y uses :where() CSS nesting" {
@@ -2109,7 +2109,7 @@ test "compile: shadow-color enhanced uses --tw-shadow-alpha" {
21092109 const result = try compile (alloc , & candidates , null , false , true , null , null , null );
21102110 defer alloc .free (result );
21112111 // Enhanced value should wrap with --tw-shadow-alpha
2112- try std .testing .expect (std .mem .indexOf (u8 , result , "color-mix(in oklab,color-mix(in oklab,var(--color-black) 10%,transparent) var(--tw-shadow-alpha),transparent)" ) != null );
2112+ try std .testing .expect (std .mem .indexOf (u8 , result , "color-mix(in oklab, color-mix(in oklab, var(--color-black) 10%, transparent) var(--tw-shadow-alpha), transparent)" ) != null );
21132113}
21142114
21152115test "compile: --font-sans and --font-mono appear in theme output with preflight" {
@@ -2362,7 +2362,7 @@ test "compile: theme() in shadow arbitrary value resolves" {
23622362 try std .testing .expect (std .mem .indexOf (u8 , result , "theme(" ) == null );
23632363 try std .testing .expect (std .mem .indexOf (u8 , result , "oklch(76.5% 0.177 163.223)" ) != null );
23642364 // The resolved color should be wrapped in var(--tw-shadow-color, ...)
2365- try std .testing .expect (std .mem .indexOf (u8 , result , "var(--tw-shadow-color,oklch(76.5% 0.177 163.223))" ) != null );
2365+ try std .testing .expect (std .mem .indexOf (u8 , result , "var(--tw-shadow-color, oklch(76.5% 0.177 163.223))" ) != null );
23662366}
23672367
23682368test "compile: theme() with opacity in shadow arbitrary value wraps color in shadow-color var" {
@@ -2372,7 +2372,7 @@ test "compile: theme() with opacity in shadow arbitrary value wraps color in sha
23722372 defer alloc .free (result );
23732373 try std .testing .expect (std .mem .indexOf (u8 , result , "theme(" ) == null );
23742374 // The color-mix result should be wrapped in var(--tw-shadow-color, ...)
2375- try std .testing .expect (std .mem .indexOf (u8 , result , "var(--tw-shadow-color,color-mix(in oklab, oklch(76.5% 0.177 163.223) 50%, transparent))" ) != null );
2375+ try std .testing .expect (std .mem .indexOf (u8 , result , "var(--tw-shadow-color, color-mix(in oklab, oklch(76.5% 0.177 163.223) 50%, transparent))" ) != null );
23762376}
23772377
23782378// ─── Format parity tests (issues #1-7) ──────────────────────────────────────
0 commit comments