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

[CSS] prefers-color-scheme reflects the color-scheme on the embedding element #19449

Closed
9 of 10 tasks
hamishwillee opened this issue Aug 12, 2022 · 3 comments
Closed
9 of 10 tasks
Assignees
Labels
Content:CSS Cascading Style Sheets docs fx release archive A closed issue relating to firefox release notes for developers.

Comments

@hamishwillee
Copy link
Collaborator

hamishwillee commented Aug 12, 2022

Acceptance Criteria

  • The listed features are documented sufficiently on MDN
  • BCD is updated
  • Interactive example and data repos are updated if appropriate
  • The content has been reviewed as needed

For folks helping with Firefox related documentation

  • Set bugs to dev-doc-complete
  • Add entry to Firefox release notes if feature is enabled in release
    or
  • Add entry to Firefox experimental features page if feature is not yet enabled in release

Features to document

Update prefers-color-scheme CSS media query doc to note that:

prefers-color-scheme reflects the color-scheme on the embedding element in the embedding document, to the extent acceptable from security standpoint (pending security review).
This affects SVG and iframes - both same and cross-origin.

This should include an example like the one at the top of w3c/csswg-drafts#7213 (comment) -

Related Gecko bugs

https://bugzilla.mozilla.org/show_bug.cgi?id=1779457

Other

What does this all mean?

IN summary, previously prefers-color-scheme reflected the user choice of light/dark mode based on the device or OS theme setting. It was possible to have a case where the OS and firefox would have a different mode, and you could get prefers-color-scheme matching the OS rather than browser - so the incorrect media would be displayed.

The change is that prefers-color-scheme in SVG files and iframes will now respect the the color-scheme of the embedder.

Links / tasks

@github-actions github-actions bot added Content:CSS Cascading Style Sheets docs needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Aug 12, 2022
@hamishwillee hamishwillee added Firefox 105 and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Aug 12, 2022
@hamishwillee
Copy link
Collaborator Author

@Rumyra @dipikabh This was one of the draft items in the project to investigate. I have done the initial investigation. It doesn't happen until FF105 so parking for now. I can take it, or someone else with more CSS skill at that point.

@Rumyra
Copy link
Collaborator

Rumyra commented Aug 16, 2022

Great - thank you so much @hamishwillee !

@bsmth bsmth self-assigned this Sep 14, 2022
@bsmth
Copy link
Member

bsmth commented Sep 14, 2022

@hamishwillee just a heads-up, I'm looking into this one now 🔬


notes:
Here are some nice tests demonstrating this: https://phabricator.services.mozilla.com/D151751#change-KuxjvTSyzOBB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:CSS Cascading Style Sheets docs fx release archive A closed issue relating to firefox release notes for developers.
Projects
Archived in project
Development

No branches or pull requests

4 participants