@@ -2624,7 +2624,7 @@ Detecting the desire for reduced transparency on the page: the 'prefers-reduced-
2624
2624
ISSUE: How does this interact with preferences around e.g. pattern fills and backgrounds?
2625
2625
They're not about transparency, but they also interfere with shape recognition.
2626
2626
2627
-
2627
+ oldids="forced-colors" >
2628
2628
Detecting the desire for increased or decreased color contrast from elements on the page: the 'prefers-contrast' feature
2629
2629
2630
2630
@@ -2634,11 +2634,12 @@ Detecting the desire for increased or decreased color contrast from elements on
2634
2634
Type : discrete
2635
2635
2636
2636
2637
- The 'prefers-contrast' media feature is used to detect if the user
2638
- has requested the system increase or decrease the amount of contrast
2639
- between adjacent colors. For example, many users have difficulty
2640
- reading text that has a small difference in contrast to the text
2641
- background and would prefer a larger contrast.
2637
+ The 'prefers-contrast' media feature is used to detect
2638
+ if the user has requested more or less contrast in the page.
2639
+ This could be responded to, for example,
2640
+ by adjusting the contrast ratio between adjacent colors,
2641
+ or by changing how much elements stand out visually,
2642
+ such as by adjusting their borders.
2642
2643
2643
2644
2644
2645
no-preference
@@ -2659,10 +2660,12 @@ Detecting the desire for increased or decreased color contrast from elements on
2659
2660
2660
2661
forced
2661
2662
2662
- Indicates that
forced colors mode is active,
2663
- identically to ''forced-colors: active'' .
2664
- See [[#forced-colors]] and
2665
- [[css-color-adjust-1#forced]] .
2663
+ Indicates that
forced colors mode is active:
2664
+ the user agent enforces a user-chosen limited color palette on the page,
2665
+ in effect also implying a strong preference for the associated contrast.
2666
+ The UA will provide the color palette to authors
2667
+ through the CSS system color keywords.
2668
+ See [[css-color-adjust-1#forced]] for details.
2666
2669
2667
2670
2668
2671
This does not necessarily indicates
@@ -2673,10 +2676,18 @@ Detecting the desire for increased or decreased color contrast from elements on
2673
2676
or some other arrangement that is neither particularly low or high contrast.
2674
2677
2675
2678
2676
- Note: When the User Agent can determine whether the particular forced color scheme
2677
- chosen by the user is high or low contrast,
2678
- one of ''prefers-contrast: more'' or ''prefers-contrast: less'' should match,
2679
+ Additionally, when the user agent can determine
2680
+ whether the forced color palette chosen by the user
2681
+ has a high or low contrast,
2682
+ one of ''prefers-contrast: more'' or ''prefers-contrast: less'' must match
2679
2683
in addition to ''prefers-contrast: forced'' .
2684
+
2685
+ Note:
2686
+ Similarly,
2687
+ if the forced color palette chosen by the user
2688
+ fits within one of the color schemes described by 'prefers-color-scheme' ,
2689
+ the corresponding value will also match.
2690
+ See [[css-color-adjust-1#forced]] for details.
2680
2691
2681
2692
2682
2693
@@ -2702,6 +2713,51 @@ Detecting the desire for increased or decreased color contrast from elements on
2702
2713
result in a high or low contrast (or something else).
2703
2714
2704
2715
2716
+
2717
+ Preference for more or less contrast may arise
2718
+ from a variety of different situations.
2719
+ Here are some examples:
2720
+
2721
+
2722
+
2723
+ Many users have difficulty
2724
+ reading text that has a small difference in contrast to the text
2725
+ background and would prefer a larger contrast.
2726
+
2727
+
2728
+ People suffering from migraine
2729
+ may find strongly contrasting pages
2730
+ to be visually painful
2731
+ and would prefer a low contrast.
2732
+
2733
+
2734
+ Some people with dyslexia find high contrast text hard to read,
2735
+ as they feel that the letters shine / sparkle as if backlit by too bright a light,
2736
+ and find low contrast to be more comfortable.
2737
+
2738
+
2739
+ Environmental factors may also lead
2740
+ a user to prefer more or less contrast.
2741
+ See also [[#auto-pref]] .
2742
+
2743
+
2744
+ Issue: This list should be refined and expanded.
2745
+
2746
+
2747
+ For compatibility with legacy content,
2748
+ the following syntax is also supported:
2749
+
2750
+
2751
+ Name : forced-colors
2752
+ Value : none | active
2753
+ For : @media
2754
+ Type : discrete
2755
+
2756
+
2757
+ active matches
2758
+ when ''prefers-contrast: forced'' matches,
2759
+ otherwise none matches.
2760
+
2705
2761
2706
2762
Detecting the desire for light or dark color schemes: the 'prefers-color-scheme' feature
2707
2763
@@ -2763,36 +2819,6 @@ Detecting the desire for light or dark color schemes: the 'prefers-color-scheme'
2763
2819
please contact the CSSWG to discuss this.
2764
2820
2765
2821
2766
-
2767
- Detecting a forced color palette: the 'forced-colors' feature
2768
-
2769
-
2770
- Name : forced-colors
2771
- Value : none | active
2772
- For : @media
2773
- Type : discrete
2774
-
2775
-
2776
- The 'forced-colors' media feature is used to detect if
2777
- the user agent has enabled a
forced colors mode
2778
- where it enforces a user-chosen limited color palette on the page.
2779
-
2780
-
2781
- none
2782
-
2783
-
2784
- the page's colors are not being forced into a limited palette.
2785
-
2786
- active
2787
-
2788
- Indicates that
forced colors mode is active.
2789
- The UA will provide the color palette to authors
2790
- through the CSS system color keywords
2791
- and, if appropriate, trigger the appropriate value of 'prefers-color-scheme'
2792
- so that authors can adapt the page.
2793
- See [[css-color-adjust-1#forced]] for details.
2794
-
2795
-
2796
2822
2797
2823
Detecting the desire for reduced data usage when loading a page: the 'prefers-reduced-data' feature
2798
2824
@@ -3212,4 +3238,3 @@ Comments from
3212
3238
akklesed,
3213
3239
and 張俊芝
3214
3240
improved this specification.
3215
-
0 commit comments