hello
is the flex-basis property is like setting a default width to an item? is there a flex-basis for the height of an item?
thanks
hello
is the flex-basis property is like setting a default width to an item? is there a flex-basis for the height of an item?
thanks
Yes, essentially, and (if the layout is horizontal) it overrides any width
property that has been applied. This explanation is good (starts off full of jargon, but stay with it because the examples make it quite clear) - CSS width vs flex-basis
You specify which way to lay flex items out (the default horizontal row
or the vertical col
). So no, there isn’t a separate declaration because it flex basis is one or the other, it’s going to refer to either width or height - this is the same with most flex properties (justify, align etc), they work along the current axis.