light-dark function not working with color-scheme set in :root #1683
corydeppen
started this conversation in
General
Replies: 1 comment
-
|
This reference might help. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
From what I'm seeing, using
light-darkdoesn't work as expected unless thecolorSchemeis specified in a StyleX style object. Based on this comment, I was under the impression thelight-darkfunction could be used after setting thecolor-schemein:root, but the following example shows that doesn't appear to work. If I add the--lightningcss-lightand--lightningcss-darkcustom properties manually to:rootthe StyleX variable will be set to the correct color value.https://stackblitz.com/edit/vitejs-vite-tuzt8ccj?file=src%2FApp.tsx
Is there a config option(s) I'm missing that would enable the Lightning custom properties to be added?
Edit: This seems similar to what's been discovered in porsche-design-system/porsche-design-system#4257.
Beta Was this translation helpful? Give feedback.
All reactions