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

Issue 778738 link

Starred by 3 users

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: Nov 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

[devtools] when property value is 0, styles pane incorrectly appends a `%`

Reported by kaycebas...@gmail.com, Oct 26 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3245.0 Safari/537.36

Steps to reproduce the problem:
1. open https://codepen.io/kaycebasques/full/eeOzyG/
2. inspect the button
3. expand `flex: 1`

What is the expected behavior?
`flex-basis: 0`

What went wrong?
`flex-basis: 0%`

Did this work before? N/A 

Chrome version: 64.0.3245.0  Channel: canary
OS Version: OS X 10.12.6
Flash Version: 

Eugene says that this is not specific to CSS Grid. So it'd be worth investigating if this issue pops up in other CSS layout models.
 
Screen Shot 2017-10-26 at 11.05.56 AM.png
35.2 KB View Download
Labels: M-64 Needs-Triage-M64 OS-Linux OS-Windows
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on Windows 7,Mac 10.12.6 & Ubuntu 14.04 using chrome stable-62.0.3202.75 & Canary-64.0.3253.0 as per the above steps.

Observed flex-basis as '0%' instead of '0'.Same issues observed from M50 builds to latest Canary. As it is a non regression issue, marking it as 'Untriaged' to get more inputs from dev.

Please find the attached screencast for reference.
Thanks.

778738.png
168 KB View Download
Owner: eostroukhov@chromium.org
Status: Assigned (was: Untriaged)
Status: WontFix (was: Assigned)
I traced this to be an actual value returned by the styles engine. This is working as intended.
I assume that you meant this is W3C specification to return 0% and not 0.
This is working as intended, but the value written by styles engine isn't conform with W3C specification. 
I would encourage you to read this portion of specification - https://www.w3.org/TR/css-flexbox-1/#flex-property

I've also attached screenshots from W3C document which highlight that it should be "0' where as styles engine returning "0%".

Also, there is related bug which shows "flex: 1 1 0" as "flex-basis: 0px" in styles pane. Please refer screenshot.
when_omitted_from_flex_shorthand.png
267 KB View Download
when_passed_positive_integer.png
307 KB View Download
related_bug.png
114 KB View Download

Sign in to add a comment