Skip to content

Commit

Permalink
Fix tracking-vector image in dark mode
Browse files Browse the repository at this point in the history
Since whatwg/whatwg.org@4aebf36 tracking-vector.svg is now dark mode-aware, i.e. its fill color will be dependent on the user's dark mode settings.

However, since whatwg/whatwg.org@dd2b988, <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.

Fix this by adding the class on generated <img> element.
  • Loading branch information
Kaiido authored Aug 6, 2024
1 parent c095851 commit 49e7807
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/wattsi.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1692,6 +1692,7 @@ TCrossReferences = record
'alt', '(This is a tracking vector.)',
'width', '46',
'height', '64',
'class', 'darkmode-aware',
'crossorigin', ''])]);
(Node.ParentNode as TElement).ReplaceChild(TempElement, Node);
Node.Free();
Expand Down

0 comments on commit 49e7807

Please sign in to comment.