From d2ffbfa56c0ee3067aa16716277443b680000632 Mon Sep 17 00:00:00 2001 From: Jon Gunderson Date: Tue, 28 Jan 2025 15:50:03 -0600 Subject: [PATCH] added caution for system colors and currentcolor keyword --- .../high-contrast/high-contrast-practice.html | 29 +++++++++++++------ 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/content/practices/high-contrast/high-contrast-practice.html b/content/practices/high-contrast/high-contrast-practice.html index ec3dbef78..91837be22 100644 --- a/content/practices/high-contrast/high-contrast-practice.html +++ b/content/practices/high-contrast/high-contrast-practice.html @@ -59,7 +59,15 @@ } - .support-notice::before { + .support-notice div.caution { + background-color: #FCEBC3; + padding-left: 60px; + padding-top: 1em; + padding-bottom: 1em; + position: relative; + } + + .support-notice div.caution::before { width: 32px; height: 32px; display: block; @@ -648,11 +656,12 @@

System Colors

The following table identifies the current system colors defined in CSS Color Module Level 4. System colors are supported in all major browsers, but the actual colors they render may vary between browsers and operating systems based on default and user theme and contrast settings.

-

- Caution: - Some browsers may render a system color as transparent, for example the Chrome browser for AccentColor and AccentColorText colors. - Avoid using these system colors since the color contrast will be less predictable. -

+
+
Caution: + Some browsers may render a system color as transparent. For example the Chrome browser for AccentColor and AccentColorText colors. + Avoid using these system colors since background color and associated color contrast is less predictable. +
+
@@ -732,9 +741,11 @@

currentcolor Keyword

The currentcolor keyword provides a means for components to use the color value of ancestors to set the color properties of an element. When the user chooses a high contrast theme the browser changes the color and background-color values of text content. The currentcolor value is set to the text color for use in setting the color of other properties including: border and outline on HTML elements, and stroke and fill properties on SVG elements.

-

- Caution: There is no equivalent to the currentcolor value for setting the background color, so when using this technique it is important for the background of the element to be transparent to allow the background color of the page to be visible. -

+
+
Caution: + There is no equivalent to the currentcolor value for setting the background color, so when using this technique it is important for the background of the element to be transparent to allow the background color of the page to be visible. +
+

Current Color Example: Switch