4 ms·
Problem is in another architectural error that authors of the spec have made. In fact flexbox is the worst CSS spec ever produced - too many problems yet bloate
by c-smile 10y ago
Problem is in another architectural error that authors of the spec have made. In fact flexbox is the worst CSS spec ever produced - too many problems yet bloated.
display is a wrong CSS property for that. The display defines requirement of the element to its container.
For example
div { display:inline-block; }
demands that div itself to be placed inside line-box container in a row with other inline elements.
But the flex is about quite different entity: specification of how children of the container shall be replaced.
That's why there is a need for the whole zoo:
display: table | inline-table | flex | inline-flex | grid | inline-grid | etc.
Yet even this does not solve principal problem. What if I want to have display:list-item that uses flexes inside. No way...
It is really should be
display:list-item; // list item
flow:horizontal; // children replaced horizontally
// with flexes if needed
or some as such.
Sigh.