Commit fd948316 authored by Alison Maher's avatar Alison Maher Committed by Commit Bot

Update the name of forced-colors in UA stylesheets

This change updates the name of the forced-colors media query within
the UA stylesheets to ua-forced-colors. This is done to make it clear
that it is a UA-specific hack for forced-colors.

This is based on feedback from
https://chromium-review.googlesource.com/c/chromium/src/+/2211124.

Bug: 970285
Change-Id: Ic99620f7886a82cfbb87d929bf7f985f474714c8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2227098Reviewed-by: default avatarRune Lillesveen <futhark@chromium.org>
Commit-Queue: Alison Maher <almaher@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#774663}
parent efa0a4fa
......@@ -67,9 +67,11 @@ static const MediaQueryEvaluator& PrintEval() {
}
static const MediaQueryEvaluator& ForcedColorsEval() {
// We use "ua-forced-colors" here instead of "forced-colors" to indicate that
// this is a UA hack for the "forced-colors" media query.
DEFINE_STATIC_LOCAL(
Persistent<MediaQueryEvaluator>, forced_colors_eval,
(MakeGarbageCollected<MediaQueryEvaluator>("forced-colors")));
(MakeGarbageCollected<MediaQueryEvaluator>("ua-forced-colors")));
return *forced_colors_eval;
}
......
......@@ -94,7 +94,7 @@ foreignObject {
This is added as to not break SVG content in forced colors mode:
https://drafts.csswg.org/css-color-adjust-1/#forced-colors-properties
*/
@media forced-colors {
@media ua-forced-colors {
svg:root {
color: CanvasText;
}
......
......@@ -14,7 +14,7 @@
@namespace "http://www.w3.org/1999/xhtml"
*/
@media forced-colors {
@media ua-forced-colors {
html {
color: CanvasText;
fill: currentColor;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment