So we are back to grids after all the years put into css? We had this with html many years ago
/s
41–50 of 104 posts
So we are back to grids after all the years put into css? We had this with html many years ago
/s
Earlier quoted context omitted.
Yes and no. layouts were a hack that solved a real problem but came with massive downsides. People didn’t tell you to not use to lay out content because grids are bad (they are quite handy! take a look at Grid Systems by Josef Müller-Brockmann) but because both posed technical and accessibility problems. A layout grid is not a table (or a ). A table (with and without ) comes with attached semantics, hierarchy, readin…
> A layout grid is not a table Ain't it? Rows and columns get you a table.
is grid intended to replace flex at some point or live side by side
So we are back to grids after all the years put into css? We had this with html many years ago
Have we wrapped all the way around to layouts again?
Yes and no. layouts were a hack that solved a real problem but came with massive downsides. People didn’t tell you to not use to lay out content because grids are bad (they are quite handy! take a look at Grid Systems by Josef Müller-Brockmann) but because both posed technical and accessibility problems. A layout grid is not a table (or a ). A table (with and without ) comes with attached semantics, hierarchy, readin…
I never found it comfortable to work with grids. The syntax and layout just feel off. Flexbox is a much more flexible and easy thing to work with.
There's plenty of overlap, but they solve different problems: flexbox when the content should control element sizing/fit, grid when the container should control element sizing/fit.
A grid really feels like a list flexes to me too, functionally.
Random grid gotcha that drove me crazy some time ago: due to browser bugs we can't use elements with percentage widths or heights as grid items. The grid cell dimensions get blown out to the ones of the original image. Seen in both Firefox and Chromium. Relevant FF bug is probably https://bugzilla.mozilla.org/show_bug.cgi?id=1857365 ' grid item with percentage height, "width: auto", "grid-template-columns: auto", and…
I'm just confused by the "original image's width".