From 49e7807a32a36d7d957f1153b229534672e66ed9 Mon Sep 17 00:00:00 2001 From: Tristan Fraipont Date: Tue, 6 Aug 2024 11:59:30 +0900 Subject: [PATCH] Fix tracking-vector image in dark mode Since https://github.com/whatwg/whatwg.org/commit/4aebf36f067dddf5f2238c317049511d8ac260b2 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 https://github.com/whatwg/whatwg.org/commit/dd2b988fa55c8aee71f46aab646ec7356c95b9bb, 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 element. --- src/wattsi.pas | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wattsi.pas b/src/wattsi.pas index d7643f4..542fd3f 100644 --- a/src/wattsi.pas +++ b/src/wattsi.pas @@ -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();