Live data from Hacker News

From Bootstrap to CSS Grid

open.nytimes.com

11–20 of 104 posts

Re: From Bootstrap to CSS Grid

#11
I'm a recent convert to CSS grid, absolutely love it. There's no dilemma between flexbox + grid; they're complimentary. Just looking forward to full devtools support in Chrome (although Firefox's grid devtools are mighty fine).

Re: From Bootstrap to CSS Grid

#12
post #3

What is the advantage of using CSS Grid instead of Flexbox? The Bootstrap v4 already uses Flexbox for its grid system.

CSS Grid can handle 2D layout requirements. 1D layout requirements in the 2D layout is managed by the flex-box, though the same can be easily be done with a nested CSS Grid.

Re: From Bootstrap to CSS Grid

#13
It's about time the web got a decent layout system.

Every UI toolkit that I know of (wxWidgets, Tcl/Tk, Qt) has some form of layout mechanism (box layout, grid layout, etc), and they'd had it for years/decades.

On the web though, people have been hacking around this omission for ages with tables and assorted "grid" systems (pure css, bootstrap, etc).

The needs for layout management was there for as long as I can remember, and this isn't a particularly tough problem to solve (Tcl/Tk has had "pack" since the late 90s, IIRC).

Why the hell did it take so long for the web to come up with a decent layout mechanism?

Re: From Bootstrap to CSS Grid

#15
post #2

Completely off-topic: All five people mentioned as experts on CSS Grid towards the end of this post are women. (I don't have anything else to add, just found this interesting.)

Is frontend development generally more dominated by women or just CSS? Any companies driving this in particular?

Re: From Bootstrap to CSS Grid

#17
post #4

"It took about three lines of CSS to write the grid layout I wanted, and I wanted to live in the bright and beautiful future where layout is always that simple." This is so spot on. I've met many developers who tend to think Bootstrap is easier, but that's usually because they haven't experienced this part of CSS Grid. Just add a couple of lines and you have a very powerful grid layout. I wrote an article on Bootstra…

Not arguing the usefulness of CSS Grid, but Bootstrap is a whole bunch more than just a grid. All the components in Bootstrap kinda work together with the .container .row .col classes and that’s still a crazy useful feature.

Re: From Bootstrap to CSS Grid

#18

It's about time the web got a decent layout system. Every UI toolkit that I know of (wxWidgets, Tcl/Tk, Qt) has some form of layout mechanism (box layout, grid layout, etc), and they'd had it for years/decades. On the web though, people have been hacking around this omission for ages with tables and assorted "grid" systems (pure css, bootstrap, etc). The needs for layout management was there for as long as I can reme…

> Why the hell did it take so long for the web to come up with a decent layout mechanism?

Because CSS wasn't originally intended to handle layout (got knows what was but there you are), the W3C was historically a bit of a shit-show (one would argue it still is) and had internal competitors to CSS (hello XSL-FO), then people finally accepted the inevitable but started with something which wasn't quite actually sufficient (flexbox) and still took multiple years to get it not-completely wrong, then there were multiple competing alternatives for whole-page layout (the XUL-derived Template Layout and Microsoft's Grid).

And so we reach 2018, having spent the last 20 years or so doing ad-hoc bits-and-pieces reinventions of half of DSSSL. But it doesn't use S-Expression so I guess that's great.

Re: From Bootstrap to CSS Grid

#19

It's about time the web got a decent layout system. Every UI toolkit that I know of (wxWidgets, Tcl/Tk, Qt) has some form of layout mechanism (box layout, grid layout, etc), and they'd had it for years/decades. On the web though, people have been hacking around this omission for ages with tables and assorted "grid" systems (pure css, bootstrap, etc). The needs for layout management was there for as long as I can reme…

Web development is just starting to catch up to where we were fifteen years ago. Things like type safety, unit testing, and dependency management are still fairly new on the Javascript side of the house, and I'd argue that Maven is lightyears ahead of NPM or pack or gulp or whatever the fuck the kids are using these days.

The UI side is even worse. When you compare $todays_web_framework to QT or Swing, it's like dropping into some terrible alternate timeline where the size of a thing on-screen can only be divined by spraying the proper mixture of cattle bones and chicken entrails on a ouija board beneath a blood moon.

Re: From Bootstrap to CSS Grid

#20

It's about time the web got a decent layout system. Every UI toolkit that I know of (wxWidgets, Tcl/Tk, Qt) has some form of layout mechanism (box layout, grid layout, etc), and they'd had it for years/decades. On the web though, people have been hacking around this omission for ages with tables and assorted "grid" systems (pure css, bootstrap, etc). The needs for layout management was there for as long as I can reme…

Well, some specs have been around for a while, but nobody implemented em. For example, I think the first version of flexbox was being proposed at least 10 years ago, but it took a few years for it to get picked up.

If I recall correctly, the initial grid spec was supported by IE10 and IE11, and those were released quite a while ago.

Making big changes on the web is difficult because it requires multiple independent parties to agree and it cannot break backwards compatibility. So you need to define how it all interacts with all the legacy stuff and additionally consider how things will evolve.

Another issue is that CSS has many poor defaults for applications, so developers end up fighting it often.

There's ongoing work to make things better in the future by allowing you polyfill things. Check out the Houdini spec stuff, which lets you define custom styles, layout, etc.

Post reply on HN