Skip to content

Commit 31464a8

Browse files
committed
[css-color-adjust-1] Restore the commits I accidentally wiped in the 8103c85 commit, phew
1 parent f227f9f commit 31464a8

File tree

1 file changed

+48
-11
lines changed

1 file changed

+48
-11
lines changed

css-color-adjust-1/Overview.bs

Lines changed: 48 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ Title: CSS Color Adjustment Module Level 1
33
Shortname: css-color-adjust
44
Level: 1
55
Status: ED
6-
Work Status: exploring
6+
Work Status: refining
77
Group: CSSWG
88
TR: https://www.w3.org/TR/css-color-adjust-1/
99
ED: https://drafts.csswg.org/css-color-adjust-1/
10-
Previous Version: https://www.w3.org/TR/2020/WD-css-color-adjust-1-20200402/
10+
Previous Version: https://www.w3.org/TR/2020/WD-css-color-adjust-1-20201109/
1111
Editor: Elika J. Etemad / fantasai, Invited Expert, http://fantasai.inkedblade.net/contact, w3cid 35400
1212
Editor: Rossen Atanassov, Microsoft, ratan@microsoft.com, w3cid 49885
1313
Editor: Rune Lillesveen, Google, futhark@google.com, w3cid 45291
@@ -130,7 +130,7 @@ Opting Into a Preferred Color Scheme: the 'color-scheme' property {#color-scheme
130130
Name: color-scheme
131131
Value: normal | [ light | dark | <<custom-ident>> ]+
132132
Initial: normal
133-
Applies to: all elements
133+
Applies to: all elements and text
134134
Inherited: yes
135135
Computed Value: the keyword ''normal'', or an ordered list of specified color scheme keywords
136136
Animation type: discrete
@@ -365,7 +365,7 @@ Forced Color Schemes {#forced}
365365
intended to increase the readability of text through color contrast.
366366
Individuals with limited vision
367367
often find it more comfortable to read content
368-
when there is a a particular type of contrast
368+
when there is a particular type of contrast
369369
between foreground and background colors.
370370

371371
Operating systems can provide built-in color themes,
@@ -414,7 +414,7 @@ Forced Color Schemes {#forced}
414414
when '@media/forced-colors' is ''active'',
415415
reducing effects such as shadows, fades, blurs, filters, gradients,
416416
and image or pattern fills
417-
that add complexity to discerning shape outlin
417+
that add complexity to discerning shape outline
418418
-->
419419

420420
Properties Affected by Forced Colors Mode {#forced-colors-properties}
@@ -438,10 +438,14 @@ Properties Affected by Forced Colors Mode {#forced-colors-properties}
438438
<li>'scrollbar-color'
439439
<li>'-webkit-tap-highlight-color'
440440
<li>'background-color'
441+
<li>'caret-color'
442+
<li>'flood-color'
443+
<li>'lighting-color'
444+
<li>'stop-color'
441445
</ul>
442446

443-
if its [=computed value=] would be a color other than a [=system color=],
444-
it is instead forced to a [=system color=] as follows:
447+
if its [=computed value=] is a color other than a [=system color=],
448+
its [=used value=] is instead forced to a [=system color=] as follows:
445449

446450
* If the color value indicates a “fallback” color
447451
(as in the ''color()'' function in [[CSS-COLOR-5]])
@@ -462,11 +466,34 @@ Properties Affected by Forced Colors Mode {#forced-colors-properties}
462466
whenever all of the element’s affected properties
463467
are likewise UA-determined.
464468

469+
<div class="note">
470+
UAs need to be careful about inheritance when forcing colors.
471+
For example,
472+
suppose the UA’s button 'color' and 'background-color'
473+
are the opposite of its canvas 'color' and 'background-color'.
474+
Given markup such as
475+
476+
<xmp highlight=html>
477+
<button>Push <em>this</em> button</button>
478+
</xmp>
479+
480+
Normally, <{em}> will inherit from <{button}>,
481+
ensuring its readability.
482+
However in [=forced colors mode=],
483+
the 'color' of both <{button}> and <{em}> will need to be forced.
484+
It's easy to see that <{button}>’s color should be forced to the button color,
485+
but <{em}> also needs to be forced to the button color;
486+
if it were forced to the canvas 'color' like it is everywhere else in the document,
487+
its text will be unreadable.
488+
</div>
489+
465490
Additionally:
466-
* 'box-shadow' and 'text-shadow' compute to to ''box-shadow/none''
491+
* 'box-shadow' and 'text-shadow' compute to ''box-shadow/none''
467492
* 'background-image' computes to ''background-image/none''
468493
unless the original value contains a ''url()'' function
469494
* 'color-scheme' computes to ''light dark''
495+
* 'scrollbar-color' computed to ''scrollbar-color/auto''
496+
* 'accent-color' computed to ''accent-color/auto''
470497

471498
UAs may further tweak these <a>forced colors mode</a> heuristics
472499
to provide better user experience.
@@ -478,7 +505,7 @@ Opting Out of a Forced Color Scheme: the 'forced-color-adjust' property {#forced
478505
Name: forced-color-adjust
479506
Value: auto | none
480507
Initial: auto
481-
Applies to: all elements
508+
Applies to: all elements and text
482509
Inherited: yes
483510
Animation type: not animatable
484511
</pre>
@@ -602,11 +629,12 @@ Performance-based Color Adjustments: the 'color-adjust' property {#perf}
602629
when distracted in a car.
603630
</dl>
604631

605-
Privacy and Security Considerations {#privsec}
632+
Privacy and Security Considerations {#priv-sec}
606633
===================================
607634

608635
Applying user color preferences via [=color schemes=] or [=forced colors mode=]
609-
expose the user's color preferences to the page,
636+
exposes the user's color preferences to the page
637+
via {{getComputedStyle()}},
610638
which can increase fingerprinting surface.
611639

612640
Additionally, it may be possible for an embedded document
@@ -631,6 +659,15 @@ Acknowledgements {#acknowledgements}
631659
Changes {#changes}
632660
=======
633661

662+
Changes since the <a href="https://www.w3.org/TR/2020/WD-css-color-adjust-1-20201109/">9 NOvember 2020 Working Draft</a>:
663+
664+
* Added 'scrollbar-color', 'caret-color', 'flood-color', 'lighting-color', 'stop-color', and 'accent-color'
665+
resets to [=forced colors mode=].
666+
(<a href="https://github.com/w3c/csswg-drafts/issues/5778">Issue 5778</a>,
667+
<a href="https://github.com/w3c/csswg-drafts/issues/5873">Issue 5873</a>,
668+
<a href="https://github.com/w3c/csswg-drafts/issues/5987">Issue 5987</a>)
669+
670+
634671
Changes since the <a href="https://www.w3.org/TR/2019/WD-css-color-adjust-1-20190523/">23 May 2019 Working Draft</a>:
635672

636673
<ul>

0 commit comments

Comments
 (0)