Re: [csswg-drafts] [css-color-adjust-1] Spec currently breaks use of currentColor for SVG icons in WHCM (#6310)

That's a great point, if an SVG has set a `color`, `currentColor` would fail to pick up the correct value using the `forced-color-adjust: color-only` proposal. So I think scoping this down to only when `color` is inherited makes sense.

@fantasai I may be misinterpreting the wording, but I was curious how `preserve-parent-color` would work for the original SVG icon case given the following definition:
> preserve-parent-color
If the 'color' property’s specified value is ''currentColor'',
then it computes to the used color of its parent’s 'color' value.
In all other respects, behaves the same as ''none''.

`color` has a default value of `black` in Chromium, so if an author doesn't set `color: currentColor` on an SVG icon, would this work?

I'm also wondering if this were to be done at computed value time, would this re-raise the issue of handling transitions in forced colors mode: #5419?

-- 
GitHub Notification of comment by alisonmaher
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6310#issuecomment-859033226 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 10 June 2021 20:31:14 UTC