new spec defines serialisation of calc() expressions (revisit when Values and Units Level 4 is published) |
||||||
Issue descriptionChrome Version: 57.0.2987.110 (Developer Build) (64-bit) OS: All What steps will reproduce the problem? (1) Open testcase.html What is the expected result? The expression "calc(3)" appears in an alert window. This is per https://drafts.csswg.org/css-values/#calc-serialize. We don't preserve the calc-ness of number values. We do if the units are others, for example, we output "calc(3px)" in testcase-2.html. What happens instead? "3" is alerted. Note that Gecko also fails this test (it preserves the "calc()" expression, but doesn't simplify it, so it alerts "calc(1 + 2)" and "calc(1px + 2px)" respectively. I haven't checked in other engines.
,
Mar 27 2017
,
Apr 5 2017
Thanks for the report. The current published version of the spec (Level 3 - https://www.w3.org/TR/2016/CR-css-values-3-20160929/#calc-serialize) says "The serialization of calc() values is undefined in this level". The new spec you've linked to (Level 4) in under discussion, but I think returning '3' may be the correct behaviour. Tab - assigning this to you to confirm the intended behaviour.
,
Apr 6 2017
,
Dec 6 2017
,
Feb 5 2018
Closing due to lack of feedback. Our behavior is reasonable and as per spec. |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by bugsnash@chromium.org
, Mar 26 2017