Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LightningCSS doesn't recognize currentcolor as valid value #721

Open
ghost opened this issue Apr 18, 2024 · 1 comment · May be fixed by #722
Open

LightningCSS doesn't recognize currentcolor as valid value #721

ghost opened this issue Apr 18, 2024 · 1 comment · May be fixed by #722

Comments

@ghost
Copy link

ghost commented Apr 18, 2024

Hello.

When I write the following:

box-shadow:
  oklch(100% 0 0deg / 50%) 0 0.63rem 0.94rem -0.19rem,
  currentColor 0 0.44rem 0.8rem -0.58rem;

or

box-shadow:
  oklch(100% 0 0deg / 50%) 0 0.63rem 0.94rem -0.19rem,
  0 0.44rem 0.8rem -0.58rem;

Then, when I run the build process of Vite, it happens this error:

thread '<unnamed>' panicked at src/properties/box_shadow.rs:211:44:
called `Result::unwrap()` on an `Err` value: ()
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Aborted (core dumped)

The error is gone when I write:

box-shadow:
  oklch(100% 0 0deg / 50%) 0 0.63rem 0.94rem -0.19rem,
  gray 0 0.44rem 0.8rem -0.58rem;

There is no equivalent for currentColor/currentcolor. This is a valid syntax. Please support it in Lightning CSS.

https://stackblitz.com/edit/vitest-dev-vitest-flshbv?file=package.json

Reference: vitejs/vite#16461

@mischnic
Copy link
Member

It's apparently that combination of oklch and currentColor that is broken:

oklch and currentColor panics

oklch and simple color is fine

simple color and currentColor is fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant