I noticed in the flexbox specification that flex-basis can be set to content.
I\'m trying to use that in the html. But it\'s not working in
Note that the content value is not yet supported by most major browsers.
Here's a screenshot from MDN:
For an explanation about what content does, MDN is also helpful:
contentIndicates 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
autotogether with a main size (width or height) ofauto.Note: Brief history
- Originally,
flex-basis: automeant "look at my width or height property".- Then,
flex-basis: autowas changed to mean automatic-sizing, and "main-size" was introduced as the "look at my width or height property" keyword.- Then, that change was reverted, so
autoonce again means "look at my width or height property"; and a newcontentkeyword is being introduced to trigger automatic sizing.source: https://developer.mozilla.org/en-US/docs/Web/CSS/flex-basis#Values