DEV Community

Discussion on: Never make your text container a flexbox container

Collapse
 
oenonono profile image
Junk

Yeah. You can think of the default display type for letters, words, and phrases as inline (but those are
layout-implementation-detail boxes being rendered, not explicit elements), just like the default display type for anchor elements is inline.

When you make an element a flexbox container, that has an explicit impact on the layout. Namely, all direct descendants are rendered as blocks, according to the flexbox algorithms and configured properties.

So each phrase and the anchor element become blocks in a flexbox row and that's exactly how it's supposed to work.

Some comments have been hidden by the post's author - find out more