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

color-scheme selector (light | dark | auto) on CSS spec drafts does not work #11589

Open
dholbert opened this issue Jan 28, 2025 · 0 comments
Open

Comments

@dholbert
Copy link
Member

This might really be a bug that I should file in https://github.com/speced/bikeshed/ ; not sure, but CC'ing @tabatkins since this is probably in Tab's wheelhouse one way or another.

Steps to Reproduce:

  1. Visit either of these specs in a desktop browser:
    https://drafts.csswg.org/css-flexbox-1/
    https://drafts.csswg.org/css-lists-3/
    https://drafts.csswg.org/css-grid-2/

  2. Click the sun/moon icon at bottom left to pop out the <input name="color-scheme" type="radio"> menu.

  3. Click among the options there (light, dark, auto) and see if the page changes.

ACTUAL RESULTS: The page doesn't change its look/color-scheme at all.

EXPECTED RESULTS: Page should presumably change its look/color-scheme in response to user choices there. Or, this menu should be removed.

I see these actual-results in Firefox, Chrome, and WebKit. I tested with my browser's own color-scheme preference set to light and to dark -- that browser color-scheme difference does make a difference for the page's rendering, but the in-page menu seems to make no difference.

(Looking in devtools, it looks like this UI just adds the darkmode class to the page's body element, but that class doesn't get used at all in the CSS -- the css uses @media (prefers-color-scheme: dark) { instead.)

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

No branches or pull requests

1 participant