flex-grow: 0
still distributing remaining space, intended behavior?
#41
Labels
flex-grow: 0
still distributing remaining space, intended behavior?
#41
I was wondering if the current flexbox behavior is intended. When you use flexbox on the web, not setting any flex-grow values basically means "distribute the children inside the flexbox without altering their size". You can then use child items that contain text which will nicely show one after the other inside the flexbox, without any extra space between each item or any added "padding" to the text items.
When I'm using azul this doesn't seem to be possible, by default flexbox items are stretched to fill all remaining space. The only way to get around this issue is by explicitly specifying the width or height of the item, but this isn't feasible when you want to use this to "auto size" a text element according to its content.
Here are a few different flex-grow combinations:
All items no flex-grow specified / all items flex-grow: 0 (NOK)
Azul
Web
all items flex-grow: 1 (OK)
Azul
Web
1 item with flex-grow: 2 others flex-grow: 1 (OK)
Azul
Web
1 item with flex-grow: 2 others flex-grow: 0 / 1 item with flex-grow: 2 others no flex-grow specified (NOK)
Azul
Web
1 item without flex-grow others flex-grow: 2 (NOK)
Azul
Web
1 item with flex-grow: 1, others flex-grow: 2 (OK)
Azul
Web
Web reference can be found here: https://jsfiddle.net/Lwm8k5t9/3/
The text was updated successfully, but these errors were encountered: