extra.less dark mode rules — how to cover System variation (prefers-color-scheme)?

Status
This content is read-only, or is not open for further replies.

Alpha1

Guest
offline
We have a child style of a pixel-exit style with a dark alternate variation. Our custom dark mode CSS in extra.less is scoped to :root[data-variation="alternate"], which works correctly when a user explicitly selects Dark mode.

However, when a user selects System variation and their browser/OS is set to dark mode, data-variation is removed from <html> entirely, so our :root[data-variation="alternate"] rules don't apply. The palette CSS variables are handled correctly by...

Read more

Continue reading...
 
Liked by:
Status
This content is read-only, or is not open for further replies.
Top Bottom