-
Notifications
You must be signed in to change notification settings - Fork 672
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-images] Computed gradient colors #4042
Comments
I would expect the color format to be serialized in the same form as Rather than define this every time a property includes an |
Yeah, we just need a definition for "computed |
This also affects lengths (radial-gradient, conic-gradient). Firefox and Edge make lengths absolute, Blink and Safari do not (e.g. getComputedStyle() gives results with ex). |
Test parsing, serialization and computed value for list-style and associated longhand properties. https://drafts.csswg.org/css-lists-3/#list-style-property list-style-image supports image, including gradients https://drafts.csswg.org/css-lists-3/#propdef-list-style-image Colors and lengths in gradients are computed in computed style results. w3c/csswg-drafts#4042 calcs giving negative radii are clamped to 0. list-style uses the new serialization order: list-style-position list-style-image list-style-type w3c/csswg-drafts#2624 w3c/csswg-drafts@8ac1376 symbolic is omitted in shortest serialization https://bugzilla.mozilla.org/show_bug.cgi?id=1560494
Compute colors and lengths in background-image getComputedStyle w3c/csswg-drafts#4042 Test that radii like -10px are rejected. Test that radii like calc(-0.5em + 10px) are clamped to be non-negative. https://drafts.csswg.org/css-images/#radial-gradients
Compute colors and lengths in background-image getComputedStyle w3c/csswg-drafts#4042 Test that radii like -10px are rejected. Test that radii like calc(-0.5em + 10px) are clamped to be non-negative. https://drafts.csswg.org/css-images/#radial-gradients
list-style-image supports image, including gradients https://drafts.csswg.org/css-lists-3/#propdef-list-style-image Colors and lengths in gradients are computed in computed style results. w3c/csswg-drafts#4042 calcs giving negative radii are clamped to 0.
Compute colors and lengths in background-image getComputedStyle w3c/csswg-drafts#4042 Test that radii like calc(-0.5em + 10px) are clamped to be non-negative. https://drafts.csswg.org/css-images/#radial-gradients
list-style-image supports image, including gradients https://drafts.csswg.org/css-lists-3/#propdef-list-style-image Colors and lengths in gradients are computed in computed style results. w3c/csswg-drafts#4042 calcs giving negative radii are clamped to 0.
list-style-image supports image, including gradients https://drafts.csswg.org/css-lists-3/#propdef-list-style-image Colors and lengths in gradients are computed in computed style results. w3c/csswg-drafts#4042 calcs giving negative radii are clamped to 0.
Compute colors and lengths in background-image getComputedStyle w3c/csswg-drafts#4042 Test that radii like calc(-0.5em + 10px) are clamped to be non-negative. https://drafts.csswg.org/css-images/#radial-gradients
Agenda+ to get a resolution, unless @ewilligers would rather we wait until the next APAC-friendly meeting? |
No need to wait. I expect there is simply a browser bug in Blink, Edge 18 and Safari. There appears to be consensus about adding computed image. |
The CSS Working Group just discussed
The full IRC log of that discussion<dael> Topic: Computed gradient colors<dael> github: https://github.com//issues/4042 <dael> TabAtkins: With regards to images we have boiler plate for computed values. That doesn't technically cover things like absolutinzing colors and links. B/c it's boiler plate, things like gradient colors don't turn into consistent versions per spec. <dael> TabAtkins: But we don't want copy/paste from boiler plate to mean something. proposal is we 1) define what a computed image is which does absolutizing and then 2) file bugs to make sure everyone serializes in same way across usages <dael> AmeliaBR: For gradients key things is colors insidegradient should behave like colors everywhere and links like links. We don't have cross browser so need impl to update <gregwhitworth> mozilla folks: do you all have any compat issues from this, I presume not - but thought I'd ask if you've ever had reports <dael> AmeliaBR: Second is having one definition os what should happen to make consistency. I think that goes in replaced images and everywhere references it. <dbaron> I don't know of them off the top of my head -- though that doesn't mean we haven't. <dael> AmeliaBR: gregwhitworth asked on IRC. Mozilla currently is doing things as we want them to be done. They're the only one. Question was on compat complaints on that? <dael> dbaron: I don't know of any. We could search but I haven't heard of any escallated <dael> gregwhitworth: That's good enough for me. Thanks. <dael> dbaron: Is this mostly a gradient thing? <dael> TabAtkins: I believe that's the only thing in image that exposes colors and links. If anyone supports image() like we want that does take a color and would be impacted, but no one impl yet. <dael> AmeliaBR: Also filter image function with I think is in Safari. Will need to be defined. <dael> dbaron: Only compat bugs I find with gradients is 0 vs 0deg and a graphics bug. Doesn't seem relevant here <dael> Rossen_: Okay <dael> Rossen_: Additional thoughts? Sounds like we have consensus on expected behavior and what clarifications to spec are needed. Don't see pushback <fantasai> +1 to the change <dael> Rossen_: Objections? <dael> Prop: Add section to CSS images defining computed value of an image type. This value has colors links and lengths all made absolute per usual computed value rules for those sub types <dael> TabAtkins: and fix specs referring to images to make sure use correct language <dael> RESOLVED: Add section to CSS images defining computed value of an image type. This value has colors links and lengths all made absolute per usual computed value rules for those sub types and fix specs referring to images to make sure use correct language |
…lue, a=testonly Automatic update from web-platform-tests [css-lists] list-style-image computed value (#17441) list-style-image supports image, including gradients https://drafts.csswg.org/css-lists-3/#propdef-list-style-image Colors and lengths in gradients are computed in computed style results. w3c/csswg-drafts#4042 calcs giving negative radii are clamped to 0. -- wpt-commits: 11984f1d160b7454b2d8d1e177d1e48b9db750e1 wpt-pr: 17441
…ive, a=testonly Automatic update from web-platform-tests [css-images] Radii are clamped non-negative (#17442) Compute colors and lengths in background-image getComputedStyle w3c/csswg-drafts#4042 Test that radii like calc(-0.5em + 10px) are clamped to be non-negative. https://drafts.csswg.org/css-images/#radial-gradients -- wpt-commits: b93cbfae1eb9e2a1248fb2d835ac7a7b1dc649cd wpt-pr: 17442
…lue, a=testonly Automatic update from web-platform-tests [css-lists] list-style-image computed value (#17441) list-style-image supports image, including gradients https://drafts.csswg.org/css-lists-3/#propdef-list-style-image Colors and lengths in gradients are computed in computed style results. w3c/csswg-drafts#4042 calcs giving negative radii are clamped to 0. -- wpt-commits: 11984f1d160b7454b2d8d1e177d1e48b9db750e1 wpt-pr: 17441
…ive, a=testonly Automatic update from web-platform-tests [css-images] Radii are clamped non-negative (#17442) Compute colors and lengths in background-image getComputedStyle w3c/csswg-drafts#4042 Test that radii like calc(-0.5em + 10px) are clamped to be non-negative. https://drafts.csswg.org/css-images/#radial-gradients -- wpt-commits: b93cbfae1eb9e2a1248fb2d835ac7a7b1dc649cd wpt-pr: 17442
list-style-image supports image, including gradients https://drafts.csswg.org/css-lists-3/#propdef-list-style-image Colors and lengths in gradients are computed in computed style results. w3c/csswg-drafts#4042 calcs giving negative radii are clamped to 0.
Compute colors and lengths in background-image getComputedStyle w3c/csswg-drafts#4042 Test that radii like calc(-0.5em + 10px) are clamped to be non-negative. https://drafts.csswg.org/css-images/#radial-gradients
…lue, a=testonly Automatic update from web-platform-tests [css-lists] list-style-image computed value (#17441) list-style-image supports image, including gradients https://drafts.csswg.org/css-lists-3/#propdef-list-style-image Colors and lengths in gradients are computed in computed style results. w3c/csswg-drafts#4042 calcs giving negative radii are clamped to 0. -- wpt-commits: 11984f1d160b7454b2d8d1e177d1e48b9db750e1 wpt-pr: 17441 UltraBlame original commit: 151290fe24f003be50293ac1cc4a21e4911fe6e8
…ive, a=testonly Automatic update from web-platform-tests [css-images] Radii are clamped non-negative (#17442) Compute colors and lengths in background-image getComputedStyle w3c/csswg-drafts#4042 Test that radii like calc(-0.5em + 10px) are clamped to be non-negative. https://drafts.csswg.org/css-images/#radial-gradients -- wpt-commits: b93cbfae1eb9e2a1248fb2d835ac7a7b1dc649cd wpt-pr: 17442 UltraBlame original commit: 059a8f834fdf90f64c412f8ccd2de0cdd0910758
…lue, a=testonly Automatic update from web-platform-tests [css-lists] list-style-image computed value (#17441) list-style-image supports image, including gradients https://drafts.csswg.org/css-lists-3/#propdef-list-style-image Colors and lengths in gradients are computed in computed style results. w3c/csswg-drafts#4042 calcs giving negative radii are clamped to 0. -- wpt-commits: 11984f1d160b7454b2d8d1e177d1e48b9db750e1 wpt-pr: 17441 UltraBlame original commit: 151290fe24f003be50293ac1cc4a21e4911fe6e8
…ive, a=testonly Automatic update from web-platform-tests [css-images] Radii are clamped non-negative (#17442) Compute colors and lengths in background-image getComputedStyle w3c/csswg-drafts#4042 Test that radii like calc(-0.5em + 10px) are clamped to be non-negative. https://drafts.csswg.org/css-images/#radial-gradients -- wpt-commits: b93cbfae1eb9e2a1248fb2d835ac7a7b1dc649cd wpt-pr: 17442 UltraBlame original commit: 059a8f834fdf90f64c412f8ccd2de0cdd0910758
…lue, a=testonly Automatic update from web-platform-tests [css-lists] list-style-image computed value (#17441) list-style-image supports image, including gradients https://drafts.csswg.org/css-lists-3/#propdef-list-style-image Colors and lengths in gradients are computed in computed style results. w3c/csswg-drafts#4042 calcs giving negative radii are clamped to 0. -- wpt-commits: 11984f1d160b7454b2d8d1e177d1e48b9db750e1 wpt-pr: 17441 UltraBlame original commit: 151290fe24f003be50293ac1cc4a21e4911fe6e8
…ive, a=testonly Automatic update from web-platform-tests [css-images] Radii are clamped non-negative (#17442) Compute colors and lengths in background-image getComputedStyle w3c/csswg-drafts#4042 Test that radii like calc(-0.5em + 10px) are clamped to be non-negative. https://drafts.csswg.org/css-images/#radial-gradients -- wpt-commits: b93cbfae1eb9e2a1248fb2d835ac7a7b1dc649cd wpt-pr: 17442 UltraBlame original commit: 059a8f834fdf90f64c412f8ccd2de0cdd0910758
Suppose an author sets various
<image>
properties to gradients with color keywords, e.g.linear-gradient(45deg, blue, orange)
. ShouldgetComputedStyle()
results show gradients with color keywords orrgb
functions?Firefox gives
rgb
functions. Blink, Edge 18 and Safari give color keywords.https://jsfiddle.net/ericwilligers/qzp4wy03/
Should we change the "Computed value" text for shape-outside
=>
background-image and border-image-source would need a similar change if they referenced the CSS Images 3 definition of
<image>
, but they currently don't.No change would be needed for list-style-image
The text was updated successfully, but these errors were encountered: