New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 705300 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Feature



Sign in to add a comment

new spec defines serialisation of calc() expressions (revisit when Values and Units Level 4 is published)

Project Member Reported by eco...@igalia.com, Mar 26 2017

Issue description

Chrome 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.
 
testcase.html
138 bytes View Download
testcase-2.html
142 bytes View Download
Labels: Needs-Bisect

Comment 2 by ajha@chromium.org, Mar 27 2017

Labels: Needs-Triage-M57
Labels: -Type-Bug -Needs-Bisect -Needs-Triage-M57 Type-Feature
Owner: tabatkins@chromium.org
Status: Assigned (was: Untriaged)
Summary: new spec defines serialisation of calc() expressions (revisit when Values and Units Level 4 is published) (was: calc() is not preserved on integer expressions of specified values.)
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.


Labels: Update-Quarterly
Labels: -Update-Quarterly

Comment 6 by e...@chromium.org, Feb 5 2018

Status: WontFix (was: Assigned)
Closing due to lack of feedback. Our behavior is reasonable and as per spec.

Sign in to add a comment