New issue
Advanced search Search tips

Issue 823066 link

Starred by 3 users

Issue metadata

Status: Available
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

[css-sizing] Percentage calc() margins are resolved incorrectly during intrinsic sizing

Project Member Reported by mpalmg...@mozilla.com, Mar 17 2018

Issue description

Chrome Version: 67.0.3371.0 (Official Build) dev (64-bit)
OS: Linux
What steps will reproduce the problem?
(1)load the attached testcase
(2)
(3)

What is the expected result?
see test

What happens instead?
see test

According to the spec editor (fantasai), percentage terms in calc() expressions should resolve to zero for intrinsic sizing purposes, for example calc(10px + 20%) should contribute 10px to the intrinsic size (S) in the testcase and then resolve to 10px + 0.2*S during layout, per this comment:
https://github.com/w3c/csswg-drafts/issues/2297#issuecomment-365467459

It's worth noting that you resolve padding correctly though (replacing 'margin-left' with 'padding-left' in the testcase yields the correct results).
 
Chrome-bug-calc-percent-margin.html
908 bytes View Download

Comment 1 by e...@chromium.org, Mar 21 2018

Status: Available (was: Untriaged)

Sign in to add a comment