-
Notifications
You must be signed in to change notification settings - Fork 666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css-color-adjust-1] Define what happens to SVG in forced colors mode #3855
Comments
Specced that |
Setting That said, I wouldn't recommend that user agents directly adjust any colors on SVG other than for text, and they should only adjust text colors if they are adding in the glyph backplate effect to preserve contrast. (Authors could of course use the media query & system colors to create a color scheme for data viz or icons that respects the user's palette while still going beyond what |
FYI, EdgeHTML currently doesn't do anything with SVG text when WHCM is on: no backplate, and no change to the fill color (unless the author is using |
To sum up my previous comment as a concrete recommendation:
|
Why would that break anything? It doesn't have any effect on |
It resets Currently, if I create an SVG icon and set it |
+1 for |
I was hoping to re-address this issue, specifically regarding what should happen to SVG
Considering this, I would suggest that we do not apply forced colors to SVG |
The CSS Working Group just discussed
The full IRC log of that discussion<dael> Topic: [css-color-adjust-1] Define what happens to SVG in forced colors mode<dael> github: https://github.com//issues/3855 <dael> Rossen_: I can introduce this <dael> Rossen_: This issue defined how forced colors supposed to effect SVG. Previous resolution was that forced colors should apply to text element and foreign object element. foriegn object makes sense b/c switching to HTML and all forced color rules apply <dael> Rossen_: Additonal complication and prop change is what seemed reasonable to expect text element effected by force colors but in effect when text gets forced color applied in addition a background plate should be rendered so overall contrast ratio is as defined through system. THis proved to be ineffective and counter intutive for svg <dael> Rossen_: A few cases where this might make sense but in general since no svg elements except these are effected by forced colors overall effect becomes incongruent. prop revert including font <dael> Rossen_: Computing backplate on a path is hard to define and deterimental. You either get bounding box is is more then necessary or you do per glyph which is bad <dael> Rossen_: Prop: exclude text elemented of svg from being effected by force colors <dael> chris: Agree, makes most sense <dael> AmeliaBR: sgtm <dael> AmeliaBR: Example in spec may be useful about using MQ to make SVG work with high contrast. Default it's best not tot ry and do too much <dael> AmeliaBR: Do we need to call out foreign object or do colors naturally apply to content inside? Do we need ot add colors to the foreign object itself or enough content inside has the rules if it's html <dael> fantasai: We should set force color adjust none on SVG root and switch to auto on foreign object <dael> chris: agree [missed] <AmeliaBR> +1 to fantasai's solution <dael> chris: You don't want color value set outside inheriting in. Need to be explicitly set on foreign object <fantasai> which is what's posted in the issue at https://github.com//issues/3855#issuecomment-485023552 :) <dael> Rossen_: That's the impl we landed on. +1 to fantasai <dael> Rossen_: Other suggestions or objections for that resolution? <dael> RESOLVED: Accept proposed definition |
[css-color-adjust-1] Don't force colors on SVG text by default #3855
As per the following spec resolution, SVG text no longer should be adjusted in forced colors mode by default. w3c/csswg-drafts#3855 Bug: 970285 Change-Id: I11a785f64ca6f7e7840b17d6b59d4ce9b9f8b4e1
As per the following spec resolution, SVG text no longer should be adjusted in forced colors mode by default. w3c/csswg-drafts#3855 Bug: 970285 Change-Id: I11a785f64ca6f7e7840b17d6b59d4ce9b9f8b4e1
As per the following spec resolution, SVG text no longer should be adjusted in forced colors mode by default. w3c/csswg-drafts#3855 Bug: 970285 Change-Id: I11a785f64ca6f7e7840b17d6b59d4ce9b9f8b4e1
As per the following spec resolution, SVG text no longer should be adjusted in forced colors mode by default. w3c/csswg-drafts#3855 Bug: 970285 Change-Id: I11a785f64ca6f7e7840b17d6b59d4ce9b9f8b4e1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2055431 Reviewed-by: Rune Lillesveen <futhark@chromium.org> Commit-Queue: Alison Maher <almaher@microsoft.com> Cr-Commit-Position: refs/heads/master@{#743163}
As per the following spec resolution, SVG text no longer should be adjusted in forced colors mode by default. w3c/csswg-drafts#3855 Bug: 970285 Change-Id: I11a785f64ca6f7e7840b17d6b59d4ce9b9f8b4e1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2055431 Reviewed-by: Rune Lillesveen <futhark@chromium.org> Commit-Queue: Alison Maher <almaher@microsoft.com> Cr-Commit-Position: refs/heads/master@{#743163}
As per the following spec resolution, SVG text no longer should be adjusted in forced colors mode by default. w3c/csswg-drafts#3855 Bug: 970285 Change-Id: I11a785f64ca6f7e7840b17d6b59d4ce9b9f8b4e1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2055431 Reviewed-by: Rune Lillesveen <futhark@chromium.org> Commit-Queue: Alison Maher <almaher@microsoft.com> Cr-Commit-Position: refs/heads/master@{#743163}
…ode, a=testonly Automatic update from web-platform-tests Don't adjust SVG text in forced colors mode As per the following spec resolution, SVG text no longer should be adjusted in forced colors mode by default. w3c/csswg-drafts#3855 Bug: 970285 Change-Id: I11a785f64ca6f7e7840b17d6b59d4ce9b9f8b4e1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2055431 Reviewed-by: Rune Lillesveen <futhark@chromium.org> Commit-Queue: Alison Maher <almaher@microsoft.com> Cr-Commit-Position: refs/heads/master@{#743163} -- wpt-commits: ae1a412839f35155c7b697bcc022e8d2d094dc34 wpt-pr: 21846
…ode, a=testonly Automatic update from web-platform-tests Don't adjust SVG text in forced colors mode As per the following spec resolution, SVG text no longer should be adjusted in forced colors mode by default. w3c/csswg-drafts#3855 Bug: 970285 Change-Id: I11a785f64ca6f7e7840b17d6b59d4ce9b9f8b4e1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2055431 Reviewed-by: Rune Lillesveen <futharkchromium.org> Commit-Queue: Alison Maher <almahermicrosoft.com> Cr-Commit-Position: refs/heads/master{#743163} -- wpt-commits: ae1a412839f35155c7b697bcc022e8d2d094dc34 wpt-pr: 21846 UltraBlame original commit: 0dd994bc04aafb09a3f7c66795f774f06bd3cd2d
…ode, a=testonly Automatic update from web-platform-tests Don't adjust SVG text in forced colors mode As per the following spec resolution, SVG text no longer should be adjusted in forced colors mode by default. w3c/csswg-drafts#3855 Bug: 970285 Change-Id: I11a785f64ca6f7e7840b17d6b59d4ce9b9f8b4e1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2055431 Reviewed-by: Rune Lillesveen <futhark@chromium.org> Commit-Queue: Alison Maher <almaher@microsoft.com> Cr-Commit-Position: refs/heads/master@{#743163} -- wpt-commits: ae1a412839f35155c7b697bcc022e8d2d094dc34 wpt-pr: 21846
It's not clear what should happen to SVG elements in forced colors mode. Do text content elements get backplates? Is anything else affected? What do we need to put in the spec to correctly handle SVG?
The text was updated successfully, but these errors were encountered: