Repository navigation
<
10BC8
h1 class="lh-condensed inlineTitle__2vo_uR prc-Heading-Heading-MtWFE" data-component="Heading">feat: apply SVG prefers-color-scheme styles by theme - #41
Merged
Merged
Conversation
micahhausler
force-pushed
the
svg-color-scheme
branch
3 times, most recently
from
December 2, 2026 06:50
9561cac to
e74a70d
Compare
micahhausler
marked this pull request as ready for review
December 2, 2026 06:50
qu8n
approved these changes
Dec 2, 2026
An SVG image's @media (prefers-color-scheme: dark) and (light) blocks now apply when they match the theme's color-scheme, and a block for the other scheme is dropped, so one SVG with both palettes draws the right one. A <style media="..."> attribute is read the same way. Other media queries stay skipped, as before.
qu8n
force-pushed
the
svg-color-scheme
branch
from
December 2, 2026 10:52
e74a70d to
d0a075a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An SVG image with
@media (prefers-color-scheme: …)styles now draws the palette that matches the theme'scolor-scheme, as a browser does. Closes #38. Builds on #40, so until that merges this PR also shows its commit.<style media="…">is read the same way.@supports,light-dark()and thecolor-schemeproperty stay skipped, as before.fixtures/color-scheme/logo.svgis one SVG with both palettes.