4 ms·
>"taking up a proportion of available space after other siblings have been sized" and >- It could be used for the width/height properties (and potentially other
by bryanrasmussen 3y ago
>"taking up a proportion of available space after other siblings have been sized"
and
>- It could be used for the width/height properties (and potentially other places such as margin/padding/inset)
this to me is essentially what clamp does, although it can't take up size after siblings have been sized.
If at some point clamp can start taking values like inherited then it would be pretty cool, but that would be pretty difficult unfortunately.
- nicoburns 3y ago> although it can't take up size after siblings have been sized The key things about the proposed new unit are: 1. That it takes up space after siblings are sized (i.e. a dedicated syntax for what 90% of flexbox uses are trying to do) 2. It prevents that same node from being "auto" sized (i.e. sized based the size of it's children). This is an important optimisations which greatly improves layout performance. Taken together this could both significantly simplify layout code and significantly improve layout performance.
- bryanrasmussen 3y agohmm, yeah a guy I know recently wasted weeks trying to do a design that was actually undoable if all the ideas implicit in the design were given equal weight, and this would have allowed him to achieve what he was trying to do.