lightningcss icon indicating copy to clipboard operation
lightningcss copied to clipboard

@property initial-value parsing error

Open barvian opened this issue 11 months ago • 1 comments

Playground repro

@property --my-color {
  syntax: "<color>";
  inherits: true;
  initial-value: color-mix(in srgb, currentColor 15%, transparent);
}

It seems this may be against the spec, but it works in Chrome/Firefox/Safari and I'm not sure of an alternative 🤔.

barvian avatar Feb 21 '25 00:02 barvian

Thanks, this is a bug. Currently color-mix is only parsed if we can resolve it to a value at build time, and currentColor prevents that. We should preserve the original value as is in that case.

devongovett avatar Mar 06 '25 05:03 devongovett