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

Since it wasn't entirely clear from the above:

To avoid breaking existing accessible SVGs, `currentColor` and the system color keywords need to adjust by default for forced-color modes. However, other color values explicitly set on SVG content should not be adjusted.

It is less important if the `color` value adjusts, since it's not directly used in SVG rendering, but to avoid weird bugs it should probably continue to match `currentColor`.

The current spec handles the system color keywords as desired, but not `currentColor`.

There are two ways this could be achieved, that I see:

- Undo the resolution in #4915, so that SVG content inherits adjusted colors. The complications of that approach are discussed in that issue.

- Define a new value/syntax for `forced-color-adjust` that adjusts `color` but not other properties, and make this the default value for SVG content. This is similar to the initial proposal in #4178, but rather than an open-ended syntax of excepted properties, it could just be a single keyword that handles the SVG case.

Given all the past discussion, I would lean towards the second option, adding a `forced-color-adjust: color-only` value.

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


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

Received on Tuesday, 25 May 2021 19:41:33 UTC