From 72b942a9ed9956944c0b5d46021664a76d25cb61 Mon Sep 17 00:00:00 2001 From: Kaiido Date: Tue, 6 Aug 2024 09:23:01 +0900 Subject: [PATCH] fix tarcking-vector image in dark-mode Since https://github.com/whatwg/whatwg.org/pull/444 *tracking-vector.svg* is now darkmode-aware, i.e. its fill color will be dependent on the user's darkmode settings. However from https://github.com/whatwg/whatwg.org/pull/439 `` 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 `` 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. --- 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();