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

Support dark mode in tracking-vector.svg #444

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

zcorpan
Copy link
Member

@zcorpan zcorpan commented May 21, 2024

See w3c/tr-design#162 (comment)

Demo: https://software.hixie.ch/utilities/js/live-dom-viewer/saved/12744

This seems to work in Gecko and Chromium, but not WebKit.

@zcorpan
Copy link
Member Author

zcorpan commented May 21, 2024

@zcorpan zcorpan requested a review from annevk May 22, 2024 10:15
Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable. Would be nice if SVG were properly standardized.

@zcorpan zcorpan merged commit 4aebf36 into main Jun 17, 2024
1 check passed
@zcorpan zcorpan deleted the zcorpan/tracking-vector-dark-mode branch June 17, 2024 16:22
Kaiido added a commit to Kaiido/wattsi that referenced this pull request Aug 6, 2024
Since whatwg/whatwg.org#444 *tracking-vector.svg* is now darkmode-aware, i.e. its fill color will be dependent on the user's darkmode settings. However from whatwg/whatwg.org#439 `<img>` tags pointing at svg images that don't have a `"darkmode-aware"` class are given a white background by default. This makes the tracking-vector image fully white when seen in dark-mode.
This PR aims at fixing it by adding the class on the generated `<img>` element.

Note that I'm not entirely sure this is the only source for this image in all the specs, but I tested it with html-build where it already handles a bunch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants