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

Thanks @AmeliaBR for bringing this one up - I do agree that the SVG icon use case is a more common scenario, and it would be helpful for developers to continue to use `currentColor` in that case.  I like your proposal for a newly added `forced-color-adjust: color-only` value - it would be a clever way to achieve that behavior without disrupting how everything else is currently being forced, and I think that it would be straightforward to implement.

The only concern that I have is that if an ancestor of an SVG element has `forced-color-adjust: none` set, and the SVG element by default is set to `forced-color-adjust: color-only`, we would still end up forcing the `color` value on the SVG element even though its ancestor is not (which would probably result in an unexpected value for `curerrentColor`). But perhaps this isn't too concerning given that it's probably not a very likely scenario, and an author could additionally set the SVG to `forced-color-adjust: none` in this case?

(As a side note: authors can currently set `forced-color-adjust: auto` to ensure that an SVG icon's `color` value is forced today, so if for whatever reason we decide to keep the spec as-is, it would probably be a good idea to add an example around this to the spec.)

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


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

Received on Tuesday, 1 June 2021 22:33:14 UTC