4 ms·
Not if you want the columns to stretch to fill the remaining space, and you also want the number of columns to be dynamic. > Also, I think that tutorials for t
by rossy 7y ago
Not if you want the columns to stretch to fill the remaining space, and you also want the number of columns to be dynamic.
> Also, I think that tutorials for things like flexbox or grid should include fallbacks for older browsers.
Well, a sensible fallback for that grid list example would be to inline-blocks with a fixed number of columns.
- codedokode 7y agoYou make a number of columns dynamic by setting different percentage widths on different page sizes.
- maaaats 7y agoBut then it's responsive to the page size, not the container size. That's a small, but important difference. For instance, I recently made a component to be included on other pages at work. It had to look good no matter the size the page gave it. So they might put it into a 400px wide container, on a 1600px wide page. If I used vw or media queries to draw it based on page size, it would behave wrong.
- SquareWheel 7y agoI was thinking about that problem earlier. Is there not a CSS unit for container size? If not, that seems like a very useful addition. Like a more embedded version of vw/vh.
- ZeikJT 7y agoPercent can be based on container depending on how the container size is set.
- SquareWheel 7y agoAh, of course you're right. Good point thank you.