Comment

Comment by c-smile

"flexbox horrors":

"flex-basis" - defines mysterious "main width" (WTF is wrong with just width?)

"flex-grow" and "flex-shrink" - grow and shrink relative to what?

How to define flexible margins? Like I want left margin to be twice larger than right one and all this to be flexible:

    |---m:2*-------|--1*---|--m:1*-| 
?

Effectively flexbox breaks CSS box model that postulates only width/height to define box dimensions.

Why I cannot say just this:

    { width: 1fr;
      margin-left: 2fr;
      margin-right: 1fr; } 
?

Where 'fr' are flex units introduced in CSS Grid https://developer.mozilla.org/en-US/docs/Web/CSS/flex_value

Why two specifications define the same entity (flex weight) by two different mechanisms - by property and by unit?

CSS looks like Christmas tree where each passer-by (Google and Microsoft here) adds its own shiny stuff ...

Is this what we name as modularity of CSS?

parent c-smile 9 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton