You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was exploring the guide repo’s theming implementation. We currently rely on the modern light-dark() color function for theme rendering, which is great for supported browsers.
In supported browsers (tested in Chrome), this works correctly. In older browesrs (e.g. Edge) versions, theme colors render incorrectly, and dark mode is not displayed as expected.
I’ve attached screen-video showing:
Correct behavior in a supported browser (CSS.supports(...) returns true)
Incorrect rendering in older Edge where support is missing (CSS.supports(...) returns false)
Why this matters
Most users are on updated browsers, but there are still compatibility gaps in older versions. Without fallback styles, parts of the UI can appear broken.
Proposed solution
Add a fallback block for unsupported browsers, for example:
@supports not (color: light-dark(#000, #fff)) { ... }
Use baseline static light/dark token values in that block.
I tested this fallback approach locally, and it fixes the incorrect rendering in older Edge.
Issue summary
I was exploring the guide repo’s theming implementation. We currently rely on the modern light-dark() color function for theme rendering, which is great for supported browsers.
In supported browsers (tested in Chrome), this works correctly. In older browesrs (e.g. Edge) versions, theme colors render incorrectly, and dark mode is not displayed as expected.
I’ve attached screen-video showing:
Correct behavior in a supported browser
(CSS.supports(...) returns true)Incorrect rendering in older Edge where support is missing
(CSS.supports(...) returns false)screen-recording-2026-03-26-at-115415-pm_jFoyaQec.mp4
Why this matters
Most users are on updated browsers, but there are still compatibility gaps in older versions. Without fallback styles, parts of the UI can appear broken.
Proposed solution
Add a fallback block for unsupported browsers, for example:
@supports not (color: light-dark(#000, #fff)) { ... }Use baseline static light/dark token values in that block.
I tested this fallback approach locally, and it fixes the incorrect rendering in older Edge.
Steps to reproduce
test it with any browser which doesn't support the
light-dark()CSS functionsource: https://caniuse.com/mdn-css_types_color_light-dark
Additional information
No response
Can be reproduced
Not confirmed
Technical details
Working on this
Needs confirmation
Should we add a fallback block for older browser versions?