Skip to content

Commit 746a943

Browse files
committed
[css-color-adjust-1] fill/stroke also need to be overridden on text (but not on SVG shapes)
1 parent 6269e00 commit 746a943

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

css-color-adjust-1/Overview.bs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,8 @@ Properties Affected by Forced Colors Mode {#forced-colors-properties}
306306

307307
<pre>
308308
color: revert !important;
309+
fill: revert !important;
310+
stroke: revert !important;
309311
text-decoration-color: revert !important;
310312
text-emphasis-color: revert !important;
311313
background-color: revert !important;
@@ -363,6 +365,15 @@ Opting Out of a Forced Color Scheme: the 'forced-color-adjust' property {#forced
363365

364366
ISSUE: Should this property be merged with 'color-adjust' somehow?
365367

368+
In order to not break SVG content,
369+
UAs are expected to add the following rules to their UA style sheet:
370+
371+
<pre>
372+
@namespace "http://www.w3.org/2000/svg";
373+
svg|svg { forced-color-adjust: none; }
374+
svg|text, svg|foreignObject { forced-color-adjust: auto; }
375+
</pre>
376+
366377
Performance-based Color Schemes: the 'color-adjust' property {#perf}
367378
===============================
368379

0 commit comments

Comments
 (0)