Live data from Hacker News

CSS Grid Lanes

webkit.org

31–40 of 237 posts

Re: CSS Grid Lanes

#31

I don't understand all the busywork goes behind new browser updates, just to retain their market share (since they can afford more engineers, than say Ladybird). Is this needed? It's not rocket science, folks.

Psh, rocket science only has to contend with physics, which generally doesn't change much, if at all. The equations used to get humans to the moon didn't change because someone discovered you can send a specially crafted packet and escape the sandbox and steal money from everybody on the Internet.

Re: CSS Grid Lanes

#33
post #4

Is this increasing complexity in the Web layout world worth it? Anyone who wants to use this is going to drop support for older browsers (and, in so doing, older machines that can't run newer OSes and newer browsers). Personally, I use an 11-year-old machine and have had to add userscript hacks to certain major Web sites to work around bugs in CSS grid (not the "lanes" described here). At least new JavaScript feature…

> Personally, I use an 11-year-old machine and have had to add userscript hacks to certain major Web sites to work around bugs in CSS grid (not the "lanes" described here).

The version of CSS Grid we're using today didn't ship until 2017; a browser from 11 years ago would be using one of the non-standard versions of Grid. For example, Internet Explorer 11 was the first browser to ship a grid implementation.

> At least new JavaScript features can be "polyfilled" or whatever. Maybe sites could check for CSS feature support too?

First, not every site needs to look exactly the same in every browser; that's why progressive enhancement is a thing.

Second, there are multiple ways to create masonry-style layouts that don't require masonry support in the browser using multi-column layout or flexbox.

Third, masonry can be polyfilled using JavaScript [1].

[1]: https://masonry.desandro.com/

Re: CSS Grid Lanes

#34

I've run the masonry layout (for my personal bookmark website) ever since I've found it in the browser settings. grid-template-rows: masonry; is going to be outdated then?

I still prefer the layout look from something like justifiedGallery.js where the heights of each row are the same. Actual masonry with stacking stones would never stack directly on top of each other like this. Calling it masonry just feels unnatural as anything stacked like that would easily be knocked over. "Lanes" is definitely more appropriately named than "masonry". The layout look of a justifiedGallery would be more masonry than the grid-template-rows:masonry setting. yeah yeah, raw css vs js library blah blah

Re: CSS Grid Lanes

#35

I've run the masonry layout (for my personal bookmark website) ever since I've found it in the browser settings. grid-template-rows: masonry; is going to be outdated then?

Yeah, there was a years long debate that effectively ended with: “We held a vote that you weren’t aware of and decided that masonry was out. If you cared, you should have participated in the vote that you were not aware was happening. It’s too late to change it.” https://m.youtube.com/watch?v=yikbSQ6tvlE

Masonry was never “in”, no? Mozilla proposed it and were the only ones to implement it, behind a feature flag. Then WebKit proposed an alternative that was discussed at length:

https://github.com/w3c/csswg-drafts/issues/10233

Re: CSS Grid Lanes

#36

Earlier quoted context omitted.

> How do you expect things to ever change if no one ever updates? Maybe things should stop changing. We don't really need ten new CSS attributes every year. Things work. The elegant solution is to announce the project is done. That would bring some much-needed stability. Then we can focus on keeping things working.

11 years ago we had Python 2.7.8 and 3.4.0 so no type hints, no async await, no match syntax, no formatted string literals, large number couldn’t be written like this 13_370_000_000, etc. Developers deserve nice things.

> Developers deserve nice things.

I agree they do. But Python is a bad counterexample. You can upgrade your Python on your server and no one has to know about it. But if you want to use new CSS features, then every browser has to implement that feature and every user has to upgrade their browser.

The intent of my comment was to express a desire to stabilize the web API in particular, not to freeze all software development in its tracks.

Re: CSS Grid Lanes

#37
Maybe this will be an unpopular opinion, but I really dislike the lane layout, because it is not possible to efficiently take a glance at all elements in the list, one by one.

If you try to go left-to-right, you will quickly realize that at the end of each "line" it is really difficult to know where the next line starts. It is easy to accidentally start again on the same line (and inspect the same elements), or skip one accidentally. Then navigating through the elements one by one requires a considerable amount of cognitive effort, your eyes bounce up and down constantly, and you end up inspecting the same elements multiple times.

If you try to go top-to-bottom, lane by lane, you will then realize that the page also has infinite scroll and you will never go past the first lane.

Re: CSS Grid Lanes

#38
I have often thought layouts should be done by a constraint solver. Then there could be libraries that help simplify specifying a layout, which feed constraints to the solver.

Re: CSS Grid Lanes

#39

How would you query the location where you need to load more data when scrolling down (the highest empty spot)?

You just append new elements to the in the example and it will automatically put them in the appropriate column.

Re: CSS Grid Lanes

#40
post #39

How would you query the location where you need to load more data when scrolling down (the highest empty spot)?

You just append new elements to the in the example and it will automatically put them in the appropriate column.

Your answer doesn't appear to relate to what I asked. You need to know when to query the backend for more data if it's an infinite scrolling setup.
Post reply on HN