New issue
Advanced search Search tips

Issue 620769 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Jun 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

CSS short-hand property "flex" does not apply expected defaults

Reported by haygood...@gmail.com, Jun 16 2016

Issue description

<b>Chrome Version       : <Copy from: 'about:version'></b>
URLs (if applicable) : https://developer.mozilla.org/en-US/docs/Web/CSS/flex
Other browsers tested:
  Add OK or FAIL, along with the version, after other browsers where you
have tested this issue:
     Safari:
    Firefox:
         IE: 11 FAIL, Edge FAIL

What steps will reproduce the problem?
(1) Set css property flex by initializing only the first argument of the shorthand.
(2) Example: <div style="flex: 1"></div>
(3)

What is the expected result?
element.style {
  flex: 1;
  flex-grow: 1;
  flex-shrink: 1;
  flex-basis: auto;
}

What happens instead?
element.style {
  flex: 1;
  flex-grow: 1;
  flex-shrink: 1;
  flex-basis: 0%;
}

Please provide any additional information below. Attach a screenshot if
possible.

 
Cc: cbiesin...@chromium.org
Components: Blink>Layout>Flexbox
Status: WontFix (was: Unconfirmed)
This might be a bug in the MDN documentation but our implementation is correct. See https://drafts.csswg.org/css-flexbox-1/#valdef-flex-flex-basis:
"When omitted from the flex shorthand, its specified value is 0."

(It's actually not quite correct, because we still use 0% following an earlier version of the spec, but that's a smaller difference. A bit of a long story)
Alright, thank you very much!

Sign in to add a comment