CSS conic-gradient color-stops doesn't support calc() with percentages in angles
Reported by
yio...@gmail.com,
Apr 8 2017
|
||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36 Steps to reproduce the problem: 1. Open http://jsbin.com/corawafite/edit?html,css,output background-image: conic-gradient(green calc(100%), transparent 0 100%); What is the expected behavior? The background color is green What went wrong? No background color Did this work before? N/A Chrome version: 59.0.3066.0 Channel: canary OS Version: OS X 10.11.6 Flash Version: Shockwave Flash 25.0 r0
,
Apr 10 2017
Able to reproduce this issue on Mac 10.12.4, Windows 10 and Ubuntu 14.04 with chrome #57.0.2987.133, canary #59.0.3066.0 and also in earlier version M30 - #30.01549.0. This is a non-regression issue, hence marking it as untriaged Observed background of circle has no color. Attaching a screen-cast for reference. Thank You...
,
Apr 10 2017
Please make sure "chrome://flags/#enable-experimental-web-platform-features" flag is enabled.
,
Apr 10 2017
,
Apr 10 2017
I started on a fix for this (too), but might not be able to get all the collateral damage done today =). https://codereview.chromium.org/2813583002
,
Apr 10 2017
Haha - almost identical: https://codereview.chromium.org/2814453002
,
Apr 10 2017
,
Apr 11 2017
,
Apr 11 2017
,
Apr 11 2017
At present, although we resolve this value, but in fact there is no effect (background color is not green) background-image: conic-gradient(green calc(360deg), transparent 0 100%);
,
Apr 11 2017
Add more test cases for reference: conic-gradient(green calc(360deg), transparent 0 100%) conic-gradient(green 0 calc(360deg), red 0 100%) conic-gradient(green 360deg, red 0 calc(100%)) conic-gradient(green 360deg, red calc(0deg) calc(100%)) conic-gradient(green 360deg, red calc(0%) 100%) conic-gradient(#f06, calc(20%), gold) conic-gradient(#f06, calc(20% + 15deg), gold) conic-gradient(#f06, calc(20%), gold, calc(60%), green) conic-gradient(blue calc(10%) calc(20%), blue 30%, white) conic-gradient(blue calc(10%) calc(45deg), blue 30%, white) conic-gradient(blue calc(10%) calc(45deg), blue calc(30%) calc(160deg), white)
,
Apr 11 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/cc50825cf637990a4edfa90c9610ad072885c74d commit cc50825cf637990a4edfa90c9610ad072885c74d Author: fs <fs@opera.com> Date: Tue Apr 11 09:23:43 2017 Support calc(...) in ConsumeAngleOrPercent / for conic-gradient Because of the explicit check for <percentage-token>, calc(...) would not be properly handled for percentages. CSSGradientValue also wasn't checking for calc() values when evaluating stops. Rewrite ConsumeAngleOrPercent in a vein similar to ConsumeLengthOrPercent. Make CSSPrimitiveValue::IsAngle() consider resolved type, and update CSSRotation TypedOM implementation to counter this. BUG=709730 Review-Url: https://codereview.chromium.org/2813583002 Cr-Commit-Position: refs/heads/master@{#463585} [modify] https://crrev.com/cc50825cf637990a4edfa90c9610ad072885c74d/third_party/WebKit/LayoutTests/fast/gradients/conic-gradient-parsing.html [modify] https://crrev.com/cc50825cf637990a4edfa90c9610ad072885c74d/third_party/WebKit/Source/core/css/CSSPrimitiveValue.h [modify] https://crrev.com/cc50825cf637990a4edfa90c9610ad072885c74d/third_party/WebKit/Source/core/css/cssom/CSSRotation.cpp [modify] https://crrev.com/cc50825cf637990a4edfa90c9610ad072885c74d/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp
,
Apr 11 2017
Nice work! There are only conic-gradient(#f06, calc(20% + 15deg), gold) left.
,
Apr 11 2017
Yepp, that combination wasn't directly supported by the calc() machinery, so will need some additional work (==probably a larger patch than the above.)
,
May 12 2017
@fs Is there any progress?
,
May 12 2017
No, unfortunately not, sorry =/
,
Aug 31 2017
,
Dec 6 2017
,
Oct 25
|
||||||||||
►
Sign in to add a comment |
||||||||||
Comment 1 by ajha@chromium.org
, Apr 10 2017