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

Was thinking about this a bit more as well, and wanted to flag something for the group.

Adding a value to `forced-color-adjust` seems like a simple/elegant/implementable solution, and doesn't add much work for authors who are aware of and want their users to have a great experience with forced color modes. What we do lose as of previous resolutions (and don't regain with the current solution) is the ability to propagate the appropriate color across color schemes in cases where the author has _not_ put any care or consideration into forced color modes.

Take this common practice, for example: https://codepen.io/somelaniesaid/pen/Yzqxogg. "Light mode" is the default style, where the SVG parts are set to `currentColor`. Contextual colors are updated in "dark mode", and propagate automagically to the SVG part. In previous implementations, no work at all is required in forced color modes to pix up the contextual semantic colors. The result of this behavior is that people who use forced color modes can have a better experience with (very common) simple SVGs across more web applications, **built by FCM-unaware authors.**

Given that SVGs can be used in so many different ways, it might not be possible to find a solution that appropriately balances potential breakages between use cases without adding just a tiny bit more work for authors. Adding a new value might still be the best way to go at this point if it minimizes breakage.* I just want to make sure that in considering the paths forward, we're aware that SVG icons will be broken on some sites given more recent `currentColor` behaviors, and are likely to stay broken.

\* As active members of the CSSWG are probably aware, I pivoted to some other projects before some of the more recent resolutions and haven't been part of the discussions for awhile. So I will to defer to Alison, who is still active in this work and may have data/insights that I don't. :)

-- 
GitHub Notification of comment by melanierichards
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6310#issuecomment-859114189 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 22:12:55 UTC