Hacker News new | ask | show | jobs
by culi 1571 days ago
To be fair, Firefox is the only browser that has implemented subgrid. It's a pretty new feature
1 comments

> It’s a pretty new feature

I’m trying to decide how I feel about that characterisation, and I’m of two minds, but mostly leaning towards “it’s older than you think”.

From an implementation perspective: Firefox has had it for over two years (implemented in early–mid 2019, shipped in December 2019). That’s not especially new in the scheme of things for web features.

From a specification perspective, which certainly doesn’t matter as much but I think should not be completely ignored, it’s even older: CSS Grid started in early 2011, subgrid was added in late 2012, CSS Grid Level 1 became a Candidate Recommendation in September 2016 with subgrid marked as “at risk”, and subgrid was bumped to Level 2 by May 2017, a couple of months after Firefox, Chromium and Safari all shipped Grid in March 2017.

Hmm… Chromium 79 is from about the same time as Firefox 71 which shipped subgrid, did any interesting and quite-visible features land around then? Yeah, there are a few from around that time plus or minus a few releases that I’d be mildly inclined not to call “pretty new”, with a noticeable (though very subjective) correlation with features other browsers have also implemented. My feeling is that if Chromium and Safari had shipped subgrid in December 2019 as well (like all three shipped basic grid in March 2017) it probably wouldn’t be being called “pretty new” now.

That was a fairly useless rabbit hole. :-)

To add a little context to the rabbit hole, I'm fairly certain the reason why subgrid has taken so long on chromium based engines is because it was deemed not worth implementing on their old layout stack and would be much easier to work with in their new layout stack (LayoutNG).

The new layout stack took a little time to get out the door, solving weird issues with certain use cases that just wouldn't be able to be solved with the old layout stack (at least not without becoming a nightmare).

Now that it's out, there's a bunch of commits made from both google and microsoft emails working on reimplementing grid (GridNG) in the new layout system in such a way that grid stage 2 (subgrid) and grid stage 3 (masonry) extensions will be easier to maintain.