News for hackers. Stuff that matters.
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by camillomiller on Tuesday April 23, 2024 @08:19AM (#40131082)
It’s always funny to read people that just never understood CSS trying to convince everyone that CSS is impossible to understand!
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by bryanrasmussen on Tuesday April 23, 2024 @08:30AM (#40131181)
it's better on HN because you can get it combined with snide insinuations that they could have created a better layout system that would do all the things that CSS does, but also fix the various problems that CSS has.

However the glory days are evidently behind us, because these insinuations never end with "in a weekend" anymore.

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by jampekka on Tuesday April 23, 2024 @08:35AM (#40131223)
I'd be surprised to hear anybody with intimate knowledge of CSS claiming to understand CSS.
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by crispyambulance on Tuesday April 23, 2024 @08:36AM (#40131224)
Yes, that's fair.

Sure, today we have grid and vanilla CSS is sane and useable by anyone who takes the time to learn the modern way of doing things.

But let's not forget what a long and tortured road CSS has taken to become what it is today. CSS was a total dumpster fire up until around when flexbox came out. It was SO HARD to make it do what you want for SO LONG.

The MOST BASIC NOTION of layout, putting things in a freaking grid, was missing from CSS for almost two decades. Yet, the grid concept has been around in application layout since the 1980's. I can't explain why it took CSS such a long time, and the explanations I've heard don't seem plausible to me.

It's understandable that folks who were around in the bad days of CSS are still kind of bitter. I was, and if I didn't take the time to see the new ways of using it, I would still be incredulous about CSS.

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by bazoom42 on Tuesday April 23, 2024 @10:30AM (#40132417)
> The MOST BASIC NOTION of layout, putting things in a freaking grid, was missing from CSS for almost two decades

This is not true. CSS have had ‘display:table’ for 25 years, which is a simple grid layout model equivalent to html tables. Content can be aligned in rows and columns.

‘Display:grid’ is much more powerful of course.

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by crispyambulance on Tuesday April 23, 2024 @12:16PM (#40133669)
Yeah, I remember those. It was intended as a way to make "tables" using divs.

That way, we could pretend to do page layout with CSS, while still feeling shitty about repurposing something meant for tables.

There's just no justifiable reason for putting whole-page lay-out on the back-burner for so long. So many other far less important things came out before grid, it feels almost like it was deliberately spiteful to delay it so long.

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by bazoom42 on Tuesday April 23, 2024 @01:33PM (#40134652)
Why would you feel shitty about using ‘display:table’?

It puts things into a freaking grid as you asked for.

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by crispyambulance on Tuesday April 23, 2024 @04:15PM (#40136740)
For a long time, css was a huge step backwards from what we were accustomed to with desktop application layout mechanisms.

Web-apps were "a thing" starting in the very early naughts, yet just getting stuff to stick where you wanted it on web page required a bunch of stupid hacks and accommodations. Of course people resorted to using tables for page layout. The display:table thing was just a continuation of that.

Whole-page layout should have been an absolute top priority for the folks that controlled css, yet it seems they just didn't care until grid finally came out in 2017-ish? I just don't understand why that is.

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by bazoom42 on Wednesday April 24, 2024 @03:10AM (#40141532)
It is still not clear to me why you discount display:table as a valid and useful tool for placing content in a grid.

Sure, it is not as sophisticated as Display:grid eg it doesn’t support changing the number of columns depending on the viewport width and it doesnt support elements overlapping multiple grid cells. But many common “full-page” layouts, like header, sidebar, footer can be expressed using “display:table”.

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by crispyambulance on Wednesday April 24, 2024 @10:16AM (#40144651)
My memory is a bit foggy, but I recall there was an issue with older browsers back in those days not supporting display:table.

So if you wanted to "do right" you could not because IE6 was still "a thing" and did not support display:table. You were forced to use actual tables for layout or do endless tedious workarounds to make things work.

Who to blame? The W3C? Microsoft? I don't know but I glad those kinds of problems are mostly over.

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by bazoom42 on Wednesday April 24, 2024 @12:31PM (#40146446)
Oh yeah, IE 6 did not support display:table. This was the age of hacks. Microsoft basically managed to block any progress on web standards for half a decade.

I’m not sure why you’d blame this on W3C though. IE stasis froze any standard including ECMAScript. It was Microsofts attempt to halt the progress of the web because they considered it a threat to their desktop dominance. Luckily it didn’t work.

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by jampekka on Tuesday April 23, 2024 @03:56PM (#40136541)
There was a huge cargo cult adamantly against using tables back in the day, even though the "true way" of hacking divs with float and clearfixes and invisible images was totally broken. Somehow having bunch of wrapper and empty divs was "more semantic" or something.

I was in the cult. It was totally inane, but seems to carry some effects to this day.

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by bazoom42 on Wednesday April 24, 2024 @06:39AM (#40142727)
The movement was against using html table markup (<table>, <tr> etc.) for layout because of the accessibility issues. It was not against the CSS display:table since that does not affect accessibility.
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by jampekka on Wednesday April 24, 2024 @12:10PM (#40146108)
IE didn't support display:table until version 8.
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by afavour on Tuesday April 23, 2024 @09:20AM (#40131663)
> I can't explain why it took CSS such a long time

It is weird to look back on but the web platform essentially went through a dark ages for a while. You could say the same about why it took us so long to get to ES6 JS, too. The standards bodies were frozen in ice (and I don’t quite know why either), everyone was debating HTML5 vs XHTML and somehow the rest of the platform floundered for years.

Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by marksbrown on Tuesday April 23, 2024 @09:48AM (#40131935)
Microsoft failed to capture the internet. IE6 can still cause sane minds to crack.