Open wplit opened 5 years ago
... we should have flex-basis
, as everything else is already there.
I get the reasoning for not having it:
If no flex-basis is specified, then the flex-basis falls back to the item's width property.
Has this been implemented? This is missing.
Describe the feature you'd like to see included in Oxygen. The CSS property flex-basis to be added to the UI in the child flex layout controls.
What are the use cases for this feature? This may become more important with the repeater component as users will be now visually building flex layouts with dynamic elements, where the number of elements (and therefore the needed widths) could be unknown.
Width or min-width may not be sufficient for dynamic layouts where an unknown number of elements need to fit into a container, for example. - > https://gedd.ski/post/the-difference-between-width-and-flex-basis/
This is where using the shorthand flex or 'flex-basis, flex-grow and flex-shrink' together is useful.
In Oxygen, currently we have to write CSS for layouts that are like this as the flex-basis is missing from the layout options, we only have flex-grow and flex-shrink.
Just setting flex-grow to 1 isn't the same as setting flex: 1 with CSS, as flex: 1 is also setting the flex-basis automatically.