How does flex-flow property work and what are its advantages?
Experience Level: Junior
Tags: CSSFlexbox
Answer
The flex-flow
property is a shorthand property for flex-direction
property and flex-wrap
property.
So using this property you can define what will be the flow direction of flex items within a flex container and how the flex items will be wrapped.
Thanks to this property you don't need to write that many characters. And the CSS has smaller footprint which means it can be downloaded faster.
div {
display: flex;
flex-flow: row wrap;
}
Related Flexbox job interview questions
Why would you use flex-wrap CSS property and what values can it have?
CSSFlexbox JuniorWhen would you use flex-flow property and what is it good for?
CSSFlexbox JuniorHow can you explicitly reorder items in a flexbox container?
CSSFlexbox JuniorWhat is a flex-direction property used for and what values can it have?
CSSFlexbox JuniorWhat is a difference between display: flex and display: inline-flex?
CSSFlexbox Junior