Skip to content

Commit 48f5483

Browse files
committed
[css-color-adjust-1] Rewrite color forcing based on rewriting author declarations instead of 'revert' keywords. #4020
1 parent 2e55fef commit 48f5483

File tree

1 file changed

+24
-23
lines changed

1 file changed

+24
-23
lines changed

css-color-adjust-1/Overview.bs

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -367,26 +367,30 @@ Properties Affected by Forced Colors Mode {#forced-colors-properties}
367367
and 'forced-color-adjust' is ''forced-color-adjust/auto'' (see below),
368368
colors must be force-adjusted to the user’s preferred color palette.
369369

370-
The following <a>user origin</a> declarations [[!CSS-CASCADE-4]]
371-
are applied to the element:
370+
Any [=author origin=] declaration of the following properties
371+
on any element
372+
(including any declarations representing a non-CSS presentational hint)
373+
is rewritten to specify ''revert'':
372374

373-
<pre>
374-
color: revert !important;
375-
fill: revert !important;
376-
stroke: revert !important;
377-
text-decoration-color: revert !important;
378-
text-emphasis-color: revert !important;
379-
border-color: revert !important;
380-
outline-color: revert !important;
381-
column-rule-color: revert !important;
382-
scrollbar-color: revert !important;
383-
-webkit-tap-highlight-color: revert !important; /* ISSUE: This is not in a spec anywhere! */
384-
385-
box-shadow: none !important;
386-
text-shadow: none !important;
375+
<ul>
376+
<li>'color'
377+
<li>'fill'
378+
<li>'stroke'
379+
<li>'text-decoration-color'
380+
<li>'text-emphasis-color'
381+
<li>'border-color'
382+
<li>'outline-color'
383+
<li>'column-rule-color'
384+
<li>'scrollbar-color'
385+
<li>'-webkit-tap-highlight-color'
386+
<li>'box-shadow'
387+
<li>'text-shadow'
387388
</pre>
388389

389-
Based on its resulting [=computed value|computed=] 'color' value,
390+
Additionally, on <em>on user input controls (except button-like controls) only</em>,
391+
'background-image'.
392+
393+
Based on the resulting [=computed value|computed=] 'color' value,
390394
the [computed|used] 'background-color' of an element is forced
391395
by matching all channels other than alpha
392396
to the appropriate forced background color;
@@ -395,16 +399,13 @@ Properties Affected by Forced Colors Mode {#forced-colors-properties}
395399
(see [[!CSS-COLOR-4]]),
396400
and ''Canvas'' otherwise.
397401

398-
Additionally, on <em>on user input controls (except button-like controls) only</em>:
399-
<pre>
400-
background-image: none !important;
401-
</pre>
402-
403402
UA may further tweak these <a>forced colors mode</a> heuristics
404403
to provide better user experience.
405404

406405
Note: See [[CSS-CASCADE-4]] for information about
407-
[=cascade origins=] and the ''revert'' keyword.
406+
[=cascade origins=],
407+
[[css-cascade-4#preshint|non-CSS presentational hints]],
408+
and the ''revert'' keyword.
408409

409410
Opting Out of a Forced Color Scheme: the 'forced-color-adjust' property {#forced-color-adjust-prop}
410411
-----------------------------------------------------------------

0 commit comments

Comments
 (0)