Closed Bug 1180272 Opened 9 years ago Closed 9 years ago

Implement "flex-basis: content" for auto-sizing of flex items


(Core :: Layout, defect)

Not set



Tracking Status
firefox42 --- affected


(Reporter: dholbert, Unassigned)


We should implement the flexbox spec's "content" keyword, described here:
>  Name:  flex-basis
>  Value: content | <‘width’>
>  [...]
> content
>    Indicates automatic sizing, based on the flex item’s content.
>    Note: Note that this value was not present in the initial
>    release of Flexible Box Layout, and thus some older
>    implementations will not support it. The equivalent effect
>    can be had by using auto together with a main size (width
>    or height) of auto.

Brief history:
  * This is the spiritual successor to bug 1032922.
  * "flex-basis:auto" traditionally meant "look at the width or height property.
  * But, in bug 1032922, we implemented a spec change to redefine "flex-basis:auto" to mean "auto-size" [ignoring width/height], and we introduced "flex-basis:main-size" to mean "look at the width or height property".
  * BUT, that broke a lot of websites, so the spec was reverted and we backed out our change, via bug 1093316.
  * The new more-backwards-compatible strategy in the spec is to *keep* "flex-basis:auto" at its traditional definition ("look at the width or height property"), and introduce a new keyword "content" to mean "auto-size".
  * This bug here tracks adding that new keyword.
Gah, I already filed this as bug 1093316. I placed too much trust in my awesomebar-search to find that bug for me. (It did not, which is why I filed a new bug.)
Closed: 9 years ago
No longer depends on: 1032922, 1093316
Resolution: --- → DUPLICATE
Given that bug 1093316 is fixed, does that mean we support the content keyword?
Flags: needinfo?(dholbert)
No. We just backed out the first proposal there. 'content' is the new proposal.
Flags: needinfo?(dholbert)
You need to log in before you can comment on or make changes to this bug.