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

Dark mode is ignored by interactive-examples #12879

Open
3 tasks done
danielzgtg opened this issue Apr 6, 2025 · 0 comments
Open
3 tasks done

Dark mode is ignored by interactive-examples #12879

danielzgtg opened this issue Apr 6, 2025 · 0 comments
Labels
needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened.

Comments

@danielzgtg
Copy link

Summary

The examples should be inverted just like as if Dark Reader is enabled. The iframe ending with mdnplay.dev/runner.html?blank=&theme=dark has theme=dark, so whatever it's supposed to do isn't working.

URL

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button

Reproduction steps

  1. Set OS to dark mode
  2. Open https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button
  3. Look at the Output at the bottom right of the "Try it" section, and be blinded by the light

Expected behavior

At least the background should be dark like those for interactive-example-choice:

hue rotate try it

With a simple hue rotate, which looks ugly but isn't the uncomfortable white from before:

invert hue rotate dark mode on element button try it

With Dark Reader without "Detect dark theme":

dark reader element button try it

Actual behavior

There is a patch of blinding white on the page:

element button try it blinding white

Device

Desktop

Browser

Firefox

Browser version

Stable

Operating system

Linux

Screenshot

See above

Anything else?

I suggest something like either adding filter: invert(1) hue-rotate(180deg); to the iframe, or adding the same background color and text color CSS from the rest of the page.

Validations

@github-actions github-actions bot added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Apr 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened.
Projects
None yet
Development

No branches or pull requests

1 participant