3 ms·
Yes, flexbox was an old Mozilla XUL's feature (<vbox>/<hbox>) where flexes were defined by attributes. We all agreed at the moment that having presentation attr
by c-smile 9y ago
Yes, flexbox was an old Mozilla XUL's feature (<vbox>/<hbox>) where flexes were defined by attributes. We all agreed at the moment that having presentation attributes in markup is nto that good idea. And that CSS flex was no-brainer port of that thing by replacing DOM attributes by bunch of CSS properties.
Problem is that flexbox ruins CSS box model that mandates that width CSS property is what defines the width of inner box of the element. Now they have flex-basis that if defined in galaxy far, far away overrides that width by something else.
That above already recognized as a mistake: https://wiki.csswg.org/ideas/mistakes https://wiki.csswg.org/ideas/mistakes
As of that 1D ...
grid-auto-flow: row | column;
makes flexbox obsolete at great extent.
- et-al 9y ago> Problem is that flexbox ruins CSS box model that mandates that width CSS property is what defines the width of inner box of the element. Now they have flex-basis that if defined in galaxy far, far away overrides that width by something else. I'm not quite following; may you please explain this? Thanks.
- c-smile 9y agoHaving this CSS: .flex-container { border: 1px solid #555; display : flex; } .flex-container > span { display:block; border: 1px solid #900; flex:1; width:100px; } and this markup: <div class="flex-container"> <span>Foo</span> <span>Bar</span> </div> what would be the width of each <span> there?