conic-gradients wont render if a color-hint is used
Reported by
keithjcl...@gmail.com,
Sep 5
|
|||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.81 Safari/537.36 Steps to reproduce the problem: Visit https://keithclark.co.uk/articles/single-element-pure-css-pie-charts/ and scroll through the examples What is the expected behavior? Every examples should contain a pie chart What went wrong? The examples aren't rendering because a color-hint is being used to create a "hard" colour stop. Removing the color-hint fixes examples but results in gradient interpolation from the previous color-stop. This does NOT work: background-image: conic-gradient(#d44 72deg, #fc3 0 234deg, #ac0 0); This does work: background-image: conic-gradient(#d44 72deg, #fc3 234deg, #ac0 0); Did this work before? Yes 68, when the feature was behind a flag Does this work in other browsers? N/A Chrome version: 69.0.3497.81 Channel: stable OS Version: OS X 10.13.6 Flash Version:
,
Sep 6
,
Sep 6
Thanks for filing the issue! Unable to reproduce the issue on reported chrome version 69.0.3497.81 using Mac 10.13.1 with the below mentioned steps. 1. Launched Chrome 2. Navigated to https://keithclark.co.uk/articles/single-element-pure-css-pie-charts/ 3. Scrolled down the page We were able to see the Conic gradients i.e., pie charts in the page. As mentioned in C#0, that a version prior to this release was working fine, hence checked in chrome version 68.0.3440.106. Attaching the behaviour of both the versions. @Reporter: Could you please have a look at the screen cast and let us know if anything missed from our end, It would be helpful if clarified on the behaviour of M68(68.0.3440.106) shown in screen cast, where it says, "Conic-gradients are not supported in this browser". Providing a screencast/screenshot of the expected/actual behaviour would be more helpful in triaging the issue further in better way.
,
Sep 6
TE@, those are just empty circles, not conical gradients. You need to enable chrome://flags/#enable-experimental-web-platform-features
,
Sep 6
M68 is behaving correctly in your case. You'll need the experimental web platform features flag enabled to see the examples because they are wrapped in a CSS feature query which detects conic-gradient support...
@supports (background: conic-gradient(red, blue)) {
/* hide the "not supported message" and show examples */
}
,
Sep 6
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Sep 6
Here's how the those discs should look in M69
,
Sep 6
The reason for this is that the following feature didn't ship yet: https://www.chromestatus.com/feature/5712111258828800 (It did appear to have gotten 3 LGTM's though, so it ought to be no problem shipping.) So when you tested this (conic-gradient) while it was behind a flag, it may have been that case that you got this other feature too (if you didn't specifically enable one or the other.) +fmalita
,
Sep 6
Yep, that's it! If I enable enable experimental web platform features in M69 the pie charts work as expected. It's confusing to have two linked features exposed behind the same flag. The majority of community articles I've seen documenting conic-gradient make reference to these colour stops so shipping conical gradient support without them may well cause confusion for other developers. The take away here for me is when using @supports to feature test, use the *exact* syntax you're intending to apply in the block test. Doing that would have kept the page looking like M68. That said, I would have raised the same bug anyway as I hadn't noticed/considered that CSS gradient colour stops were a separate feature.
,
Sep 6
Yes, we should get this out the door ASAP. IIRC there were some tests that needed writing/exporting to WPT - I do see some tests like that at [1] though, so maybe we managed that already (in which case it's just a matter of flipping the switch.) [1] https://wpt.fyi/results/css/css-images/gradient/color-stops-parsing.html?complete=true
,
Sep 6
FYI: I'm planning to fix my examples with something along the lines of:
@supports (background: conic-gradient(red, blue)) {
.pie {
background-image: conic-gradient(#d44 72deg, #fc3 0 234deg, #ac0 0);
}
/* This is a fallback for browsers that DON'T yet support the double-position colour stop syntax */
@supports not (background: conic-gradient(red, blue 0 0)) {
.pie {
background-image: conic-gradient(#d44 72deg, #fc3 72deg, #fc3 234deg, #ac0 0);
}
}
}
This will obviously make the examples I linked to above work. I'm happy to create a standalone test case if you need one.
,
Sep 6
I think we have coverage for this already, but thanks anyway! =)
,
Sep 7
Removing the Needs-Bisect label as this is already being investigated and root cause is already identified in C#8, please add it back if this still requires bisect.
,
Sep 10
,
Sep 17
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/eb572e75298d39013f472d2d4b4641dd391d4cf1 commit eb572e75298d39013f472d2d4b4641dd391d4cf1 Author: Fredrik Söderquist <fs@opera.com> Date: Mon Sep 17 17:12:07 2018 Add basic tests for multiple position gradient stops Tests rendering for the the case where <color-stop-length> or (or <color-stop-angle>) is two <length-percentage> (or <angle-percentage>.) Spec: https://drafts.csswg.org/css-images-4/#color-stop-syntax Bug: 707047 , 880733 Change-Id: I56bc9b43858b37c003e081ea0ef8588f3da78627 Reviewed-on: https://chromium-review.googlesource.com/1228120 Commit-Queue: Fredrik Söderquist <fs@opera.com> Reviewed-by: Florin Malita <fmalita@chromium.org> Cr-Commit-Position: refs/heads/master@{#591717} [add] https://crrev.com/eb572e75298d39013f472d2d4b4641dd391d4cf1/third_party/WebKit/LayoutTests/external/wpt/css/css-images/multiple-position-color-stop-conic.html [add] https://crrev.com/eb572e75298d39013f472d2d4b4641dd391d4cf1/third_party/WebKit/LayoutTests/external/wpt/css/css-images/multiple-position-color-stop-linear.html [add] https://crrev.com/eb572e75298d39013f472d2d4b4641dd391d4cf1/third_party/WebKit/LayoutTests/external/wpt/css/css-images/multiple-position-color-stop-radial.html [add] https://crrev.com/eb572e75298d39013f472d2d4b4641dd391d4cf1/third_party/WebKit/LayoutTests/external/wpt/css/css-images/support/100x100-blue-green.html
,
Sep 18
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/50689e69f63fb991c09387f486d4105abfa91988 commit 50689e69f63fb991c09387f486d4105abfa91988 Author: Fredrik Söderquist <fs@opera.com> Date: Tue Sep 18 13:58:52 2018 Ship CSS gradient color stop double-position syntax Intent-to-Ship thread: https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/8B9FbeTBIK0/DNkC2pz-AAAJ Also removing the actual feature and corresponding check, because it's only used in a single spot, so if the feature should need to be unshipped it ought to be a fairly trivial revert. Bug: 707047 , 880733 Change-Id: Ie854d7fd9f7a22e9c6144668a37f694dd1c508ee Reviewed-on: https://chromium-review.googlesource.com/1230018 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Fredrik Söderquist <fs@opera.com> Cr-Commit-Position: refs/heads/master@{#592028} [modify] https://crrev.com/50689e69f63fb991c09387f486d4105abfa91988/third_party/blink/renderer/core/css/parser/css_property_parser_helpers.cc [modify] https://crrev.com/50689e69f63fb991c09387f486d4105abfa91988/third_party/blink/renderer/platform/runtime_enabled_features.json5
,
Sep 18
,
Sep 19
Tried checking the issue on reported chrome version 69.0.3497.81 using Mac 10.13.1, Observed the conic-gradients rendered properly with out any issues. Attaching the screen cast of the same for reference. @Fredrik Söderquist: As we couldn't reproduce the issue from our end, Please help us in verifying the fix. Thanks!
,
Sep 19
As indicated in c#11, the author "fixed" the site, so it would work in M69 as well. So to verify one needs to check that the expected rule applies. I verified that the correct rule was used on trunk.
,
Sep 19
|
|||||||||||
►
Sign in to add a comment |
|||||||||||
Comment 1 by gov...@chromium.org
, Sep 5