LGTM1
/Daniel
On 2022-06-15 23:33, Sara Tang wrote:
Hi, reviving this thread as the CSSWG resolution at [css-color]
[css-color-adjust] Make system colors fully resolve (but flag they
were system colors) thus reversing the resolution of #3847 · Issue
#6773 · w3c/csswg-drafts (github.com)
<https://github.com/w3c/csswg-drafts/issues/6773> has been reached
(though the standards posiiton for this particular feature hasn't been
updated yet). preserve-parent-color value for forced-color-adjust CSS
property · Issue #591 · mozilla/standards-positions (github.com)
<https://github.com/mozilla/standards-positions/issues/591>.
To summarize,
- If both system colors and forced colors were resolved at compute
time, `preserve-parent-color` would not be needed. This is similar to
Mozilla, which gets the behavior of `preserve-parent-color` "for free".
- The resolution of #6773 is to resolve system colors at compute
time. Forced color are still resolved at used value time.
- Thus, `preserve-parent-color` is still needed.
I believe we should now be unblocked to ship `preserve-parent-color` :)
Sara
On Sunday, November 21, 2021 at 1:10:54 PM UTC-8 Danny Holly wrote:
cause no harm
On Thursday, October 28, 2021 at 4:45:04 PM UTC-5 Sara Tang wrote:
Contact emails
[email protected],[email protected]
Explainer
https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/Accessibility/PreserveParentColor/explainer.md
Specification
https://www.w3.org/TR/css-color-adjust-1/#forced-color-adjust-prop
Summary
Adds the ‘preserve-parent-color' value to the
‘forced-color-adjust' CSS property. When Forced Colors Mode is
enabled, the ‘color’ property is inherited, and we’ve set
‘forced-color-adjust: preserve-parent-color', the ‘color’
property will compute to the used value of its parent.
Otherwise, ‘forced-color-adjust: preserve-parent-color' value
behaves the same as ‘forced-color-adjust: none’.
Contact emails
[email protected],[email protected]
Explainer
https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/Accessibility/PreserveParentColor/explainer.md
Specification
https://www.w3.org/TR/css-color-adjust-1/#forced-color-adjust-prop
Summary
Adds the ‘preserve-parent-color' value to the
‘forced-color-adjust' CSS property. When Forced Colors Mode is
enabled, the ‘color’ property is inherited, and we’ve set
‘forced-color-adjust: preserve-parent-color', the ‘color’
property will compute to the used value of its parent.
Otherwise, ‘forced-color-adjust: preserve-parent-color' value
behaves the same as ‘forced-color-adjust: none’.
*Motivation*
*
‘forced-color-adjust'is a CSS property that allows developers
to opt out ofForcedColorsMode.
Previously, there were twosupportedvalues:‘auto’and‘none’,
which can be used to controlwhether or notan element’s
stylesare adjusted by the UA in Forced Colors Mode.Athird
value,‘preserve-parent-color',has recently been introducedin
the spec, which provides similar behavior to ‘none’,
exceptthatit alsoallowsan elementto inherititsparent's
used‘color’value.In other words,‘preserve-parent-color'
provides the ability foran element to inherit its
parent’sForced Colors Mode adjusted‘color’ value.
The intentionof ‘preserve-parent-color’is to get a reasonable
behavior forSVGicons that utilize ‘currentColor’when
styling‘fill’ and ‘stroke’in Forced Colors Mode,
asdescribedin[css-color-adjust-1] Spec currently breaks use of
currentColor for SVG icons in WHCM · Issue #6310 ·
w3c/csswg-drafts · GitHub
<https://github.com/w3c/csswg-drafts/issues/6310>.
The use of ‘currentColor’when styling anSVG iconis a common
pattern used by authors to ensure an accessible experiencein
Forced Colors Mode.For example,in thissample logo,
<https://codepen.io/somelaniesaid/pen/Yzqxogg>an author would
expectthe logo to automatically adjust to use the‘CanvasText’
system color for ‘fill’ and ‘stroke’ in Forced Colors Mode, as
a result of setting each to ‘currentColor’.
Thisbehavior, however,becamebrokenwhen we movedfrom forcing
colors at computed value time to used value
time:[css-color-adjust-1] Is forced color computed or used
value? · Issue #4915 · w3c/csswg-drafts · GitHub
<https://github.com/w3c/csswg-drafts/issues/4915>.Instead of
inheriting ‘CanvasText’, as before, the abovesample logo
<https://codepen.io/somelaniesaid/pen/Yzqxogg>would inherit
the computed ‘color’ value of its parent,resulting in a logo
that is no longer readable in Forced Colors Mode.
Thenew ‘preserve-parent-color' valuewas added to address this
commonSVGuse case.By changing the default value of
‘forced-color-adjust’for SVGsfrom ‘none’ to
‘preserve-parent-color',SVG icons that make use of
‘currentColor’willnowinherit the used ‘color’ value of its
parent, as expected.
It is important to note that this may break SVGs that expect
the opposite inheritance behavior for the ‘color’ property.
However, thebehavior of `preserve-parent-color` handles the
most commonSVGuse cases, and the behaviorbettermatches legacy
implementations of High Contrast Mode.
*
*
*
Blink component
Blink>CSS
<https://bugs.chromium.org/p/chromium/issues/list?q=component:Blink%3ECSS>
Search tags
css <https://www.chromestatus.com/features#tags:css>,forced
<https://www.chromestatus.com/features#tags:forced>,colors
<https://www.chromestatus.com/features#tags:colors>,forced-colors
<https://www.chromestatus.com/features#tags:forced-colors>,forced-color-adjust
<https://www.chromestatus.com/features#tags:forced-color-adjust>,preserve-parent-color
<https://www.chromestatus.com/features#tags:preserve-parent-color>
TAG review
https://github.com/w3ctag/design-reviews/issues/681
TAG review status
Issues open
Risks
Interoperability and Compatibility
Interoperability Risks Gecko has shipped a version of Forced
Colors Mode without support for ‘forced-color-adjust’.
Although there is an open bug for adding support
(https://bugzilla.mozilla.org/show_bug.cgi?id=1591210),
development has not been started yet. Compatibility Risks We
are updating the default value of ‘forced-color-adjust’ for
SVGs in Forced Colors Mode from ‘none’ to
‘preserve-parent-color'. This means that SVGs will now inherit
the used ‘color’ of their parent at computed value time. The
new behavior will better match author expectation and
historical SVG behavior in IE and legacy Edge.
/Gecko/: In development
(https://bugzilla.mozilla.org/show_bug.cgi?id=1591210)
/WebKit/: No signal
(https://lists.webkit.org/pipermail/webkit-dev/2020-December/031642.html)
/Web developers/: Positive
(https://github.com/w3c/csswg-drafts/issues/6310)
Debuggability
This will be included in the larger effort to emulate Forced
Colors Mode:
https://bugs.chromium.org/p/chromium/issues/detail?id=1130859&q=owner:kahinds%40microsoft.com&can=2
<https://bugs.chromium.org/p/chromium/issues/detail?id=1130859&q=owner%3Akahinds%40microsoft.com&can=2>
Is this feature fully tested byweb-platform-tests
<https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_platform_tests.md>?
Yes
Flag name
--enable-blink-features=ForcedColorsPreserveParentColor
Requires code in //chrome?
False
Tracking bug
https://bugs.chromium.org/p/chromium/issues/detail?id=1242706
Estimated milestones
No milestones specified
Link to entry on the Chrome Platform Status
https://www.chromestatus.com/feature/4887620095049728
This intent message was generated byChrome Platform Status
<https://www.chromestatus.com/>.
Blink component
Blink>CSS
<https://bugs.chromium.org/p/chromium/issues/list?q=component:Blink%3ECSS>
Search tags
css <https://www.chromestatus.com/features#tags:css>,forced
<https://www.chromestatus.com/features#tags:forced>,colors
<https://www.chromestatus.com/features#tags:colors>,forced-colors
<https://www.chromestatus.com/features#tags:forced-colors>,forced-color-adjust
<https://www.chromestatus.com/features#tags:forced-color-adjust>,preserve-parent-color
<https://www.chromestatus.com/features#tags:preserve-parent-color>
TAG review
https://github.com/w3ctag/design-reviews/issues/681
TAG review status
Issues open
Risks
Interoperability and Compatibility
Interoperability Risks Gecko has shipped a version of Forced
Colors Mode without support for ‘forced-color-adjust’.
Although there is an open bug for adding support
(https://bugzilla.mozilla.org/show_bug.cgi?id=1591210),
development has not been started yet. Compatibility Risks We
are updating the default value of ‘forced-color-adjust’ for
SVGs in Forced Colors Mode from ‘none’ to
‘preserve-parent-color'. This means that SVGs will now inherit
the used ‘color’ of their parent at computed value time. The
new behavior will better match author expectation and
historical SVG behavior in IE and legacy Edge.
/Gecko/: In development
(https://bugzilla.mozilla.org/show_bug.cgi?id=1591210)
/WebKit/: No signal
(https://lists.webkit.org/pipermail/webkit-dev/2020-December/031642.html)
/Web developers/: Positive
(https://github.com/w3c/csswg-drafts/issues/6310)
Debuggability
This will be included in the larger effort to emulate Forced
Colors Mode:
https://bugs.chromium.org/p/chromium/issues/detail?id=1130859&q=owner:kahinds%40microsoft.com&can=2
<https://bugs.chromium.org/p/chromium/issues/detail?id=1130859&q=owner%3Akahinds%40microsoft.com&can=2>
Is this feature fully tested byweb-platform-tests
<https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_platform_tests.md>?
Yes
Flag name
--enable-blink-features=ForcedColorsPreserveParentColor
Requires code in //chrome?
False
Tracking bug
https://bugs.chromium.org/p/chromium/issues/detail?id=1242706
Estimated milestones
No milestones specified
Link to entry on the Chrome Platform Status
https://www.chromestatus.com/feature/4887620095049728
This intent message was generated byChrome Platform Status
<https://www.chromestatus.com/>.
--
You received this message because you are subscribed to the Google
Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected].
To view this discussion on the web visit
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/a9a84c55-08c1-4eb6-893d-4447bfbb2e2dn%40chromium.org
<https://groups.google.com/a/chromium.org/d/msgid/blink-dev/a9a84c55-08c1-4eb6-893d-4447bfbb2e2dn%40chromium.org?utm_medium=email&utm_source=footer>.
--
You received this message because you are subscribed to the Google Groups
"blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/cc738e89-8873-2367-c2d7-c36d73260ecb%40gmail.com.