4 ms·
I see that you’re confident in css. Maybe you can help me with a simple task that I struggled with recently. (There’s a mountain of these but this one is fresh.
by wruza 2y ago
I see that you’re confident in css. Maybe you can help me with a simple task that I struggled with recently. (There’s a mountain of these but this one is fresh.)
There’s a flex-row-wrap root with grow-1 containers. Each container is a grid with two columns: fit label, auto control. Visually it’s row of forms of auto-size. Sometimes I want to put a long text into the control column, e.g. as a description of a preceding input. But it participates in size request and makes its grid expand and take all space in a flex row, or more. I want it to request zero space instead, as if it wasn’t there, but take whatever other “controls” received.
In a proper boxing model of a non-web library 15 years ago I’d set the text’s “size request” width to a small value and put all control-column elements into a size group. So they all request the same (max among) width. The predictability of the size request-allocate loop makes it trivial to figure out.
I expect some sort of ad-hoc restriction on either a grid, controls, flex root, whatever. It’s a good chance to disprove me and explode my imagination.