Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How could flex work without the ability to deform anything not explicitly nailed down? You need to specify the relative sizes of things, some of those things might be rigid, and the division of how much each item is deformed is dynamic. You would need all new flexi-units like fpx, fem, f% or you could just say everything in flex is now flexi- unless you say it’s rigid and use the same units which is more sane to me.


This

   div {
     width:100px; 
     height:100px; 
     margin:1fx; // all margins, horizontal and vertical
   }
will place div in the middle/center of its container.

a) is significantly easier to understand b) is more flexible than bunch of flexbox props and c) does not break CSS box model and d) has clear physical model, see : https://terrainformatica.com/2018/12/11/10-years-of-flexboxi...

Just try to define same thing using flexbox...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: