postcss-calc icon indicating copy to clipboard operation
postcss-calc copied to clipboard

[Bug]: Does not understand CSS Color level 5 relative color functions

Open lachieh opened this issue 1 year ago • 0 comments

Describe the bug

When using the new(ish) CSS Color level 5 functions with relative colors, I get a warning about 'Unrecognized text'.

Expected behaviour

I'd expect that this be left alone for the browser to calculate at runtime. I imagine there are some cases where its possible to calculate the final value, but taking things like color spaces into consideration to do the calculation seems like it might be a little far out of scope for this project. That's just my opinion, though.

Steps to reproduce

input:

a {
   color(from blue oklab calc(l * 0.9) a b / alpha)
}

warning:

Lexical error on line 1: Unrecognized text.

Erroneous area:
1: l * 0.9
^..^

Version

9.0.1

Environment

System:
    OS: macOS 14.6
    CPU: (10) arm64 Apple M1 Max
    Memory: 496.95 MB / 64.00 GB
    Shell: 5.9 - /bin/zsh

Package details

[email protected]
[email protected]

Additional context

No response

lachieh avatar Aug 09 '24 22:08 lachieh