@@ -3,11 +3,11 @@ Title: CSS Color Adjustment Module Level 1
3
3
Shortname : css-color-adjust
4
4
Level : 1
5
5
Status : ED
6
- Work Status : exploring
6
+ Work Status : refining
7
7
Group : CSSWG
8
8
TR : https://www.w3.org/TR/css-color-adjust-1/
9
9
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 /
11
11
Editor : Elika J. Etemad / fantasai, Invited Expert, http://fantasai.inkedblade.net/contact, w3cid 35400
12
12
Editor : Rossen Atanassov, Microsoft, ratan@microsoft.com, w3cid 49885
13
13
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
130
130
Name : color-scheme
131
131
Value : normal | [ light | dark | <<custom-ident>> ]+
132
132
Initial : normal
133
- Applies to : all elements
133
+ Applies to : all elements and text
134
134
Inherited : yes
135
135
Computed Value : the keyword ''normal'', or an ordered list of specified color scheme keywords
136
136
Animation type : discrete
@@ -365,7 +365,7 @@ Forced Color Schemes {#forced}
365
365
intended to increase the readability of text through color contrast.
366
366
Individuals with limited vision
367
367
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
369
369
between foreground and background colors.
370
370
371
371
Operating systems can provide built-in color themes,
@@ -414,7 +414,7 @@ Forced Color Schemes {#forced}
414
414
when '@media/forced-colors' is ''active'' ,
415
415
reducing effects such as shadows, fades, blurs, filters, gradients,
416
416
and image or pattern fills
417
- that add complexity to discerning shape outlin
417
+ that add complexity to discerning shape outline
418
418
-->
419
419
420
420
Properties Affected by Forced Colors Mode {#forced-colors-properties}
@@ -438,10 +438,14 @@ Properties Affected by Forced Colors Mode {#forced-colors-properties}
438
438
<li> 'scrollbar-color'
439
439
<li> '-webkit-tap-highlight-color'
440
440
<li> 'background-color'
441
+ <li> 'caret-color'
442
+ <li> 'flood-color'
443
+ <li> 'lighting-color'
444
+ <li> 'stop-color'
441
445
</ul>
442
446
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:
445
449
446
450
* If the color value indicates a “fallback” color
447
451
(as in the ''color()'' function in [[CSS-COLOR-5]] )
@@ -462,11 +466,34 @@ Properties Affected by Forced Colors Mode {#forced-colors-properties}
462
466
whenever all of the element’s affected properties
463
467
are likewise UA-determined.
464
468
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
+
465
490
Additionally:
466
- * 'box-shadow' and 'text-shadow' compute to to ''box-shadow/none''
491
+ * 'box-shadow' and 'text-shadow' compute to ''box-shadow/none''
467
492
* 'background-image' computes to ''background-image/none''
468
493
unless the original value contains a ''url()'' function
469
494
* 'color-scheme' computes to ''light dark''
495
+ * 'scrollbar-color' computed to ''scrollbar-color/auto''
496
+ * 'accent-color' computed to ''accent-color/auto''
470
497
471
498
UAs may further tweak these <a>forced colors mode</a> heuristics
472
499
to provide better user experience.
@@ -478,7 +505,7 @@ Opting Out of a Forced Color Scheme: the 'forced-color-adjust' property {#forced
478
505
Name : forced-color-adjust
479
506
Value : auto | none
480
507
Initial : auto
481
- Applies to : all elements
508
+ Applies to : all elements and text
482
509
Inherited : yes
483
510
Animation type : not animatable
484
511
</pre>
@@ -602,11 +629,12 @@ Performance-based Color Adjustments: the 'color-adjust' property {#perf}
602
629
when distracted in a car.
603
630
</dl>
604
631
605
- Privacy and Security Considerations {#privsec }
632
+ Privacy and Security Considerations {#priv-sec }
606
633
===================================
607
634
608
635
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()}} ,
610
638
which can increase fingerprinting surface.
611
639
612
640
Additionally, it may be possible for an embedded document
@@ -631,6 +659,15 @@ Acknowledgements {#acknowledgements}
631
659
Changes {#changes}
632
660
=======
633
661
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
+
634
671
Changes since the <a href="https://www.w3.org/TR/2019/WD-css-color-adjust-1-20190523/">23 May 2019 Working Draft</a> :
635
672
636
673
<ul>
0 commit comments