soflyy / oxygen-bugs-and-features

Bug Reports & Feature Requests for Oxygen
https://oxygenbuilder.com/
315 stars 29 forks source link

Add flex-basis to child layout controls. #528

Open wplit opened 5 years ago

wplit commented 5 years ago

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.

cvladan commented 4 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.

jwurmitzer commented 4 years ago

Has this been implemented? This is missing.