Skip to content

Commit

Permalink
Defensively guard against non-darkmode-aware SVGs by giving them a wh…
Browse files Browse the repository at this point in the history
…ite background.
  • Loading branch information
tabatkins committed Apr 5, 2024
1 parent b24feb2 commit 28cdfdd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions resources.whatwg.org/standard-shared-with-dev.css
Original file line number Diff line number Diff line change
Expand Up @@ -629,3 +629,13 @@ ul.domTree li:not(:last-child)::after {
content: '';
border-width: 0.1em;
}

/* Just in case, SVGs that aren't explicitly
marked as darkmode-aware get a white background,
as they might have a transparent background
and are assuming they're rendered against white.
*/
:is(img, iframe)[src$=".svg"]:not(.darkmode-aware),
svg:not(.darkmode-aware) {
background: white;
}

0 comments on commit 28cdfdd

Please sign in to comment.