Top
Best
New

Posted by frizlab 3 days ago

CSS Grid Lanes(webkit.org)
744 points | 226 comments
culi 3 days ago|
Props to the Safari team. They surprised us all when they suddenly shot to the top of interop-2025 this October

https://wpt.fyi/interop-2025

ChadNauseam 3 days ago||
I didn't realize it was tracked like this, but I have noticed that as of iOS 26, Safari has gotten a huge number of great web features. It has WebGPU of course, but many small things like fixing up missing parts of the OPFS API that make it actually usable now. Now they even have the field-sizing CSS property [0], fixing imo the most glaring ommission from CSS: the inability to make text input boxes grow to fit the input text!

[0]: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/P...

rendaw 3 days ago||
I thought that was supposed to be fixed by contenteditable plaintext-only. Why was field sizing still necessary?
extra88 3 days ago|||
`contenteditable` is an HTML attribute but it depends on JavaScript to do anything useful. This problem is one of layout, CSS's domain, so `field-sizing` solves it while leaving HTML form elements to do the actual job of taking input.
hombre_fatal 3 days ago|||
At least recreate their demo for us to showcase the fix. But I feel like it would be a let down that answers your question.
al_borland 3 days ago|||
This seems like a bit of a trend with Safari. Around big releases Apple will announce how Safari is the best at X, but other times of the year it gets a lot of flack. I assume this is due to Safari’s more traditional release schedule vs other browsers continuously shipping feature updates.
concinds 3 days ago|||
Cool stuff they're working on tends to take a very long time to reach customers' hands compared to other browsers. Just compare the "stable" and "experimental" graphs on wpt.fyi for Safari.

I can't think of a single good reason why they don't adopt an "evergreen" 4/6-week update model except Not Invented Here syndrome or "it's not Apple-like, we prefer the OS team (and therefore Marketing) dictating our release schedule, users be damned".

It's an own-goal for no reason.

simondotau 3 days ago|||
The web platform doesn’t need to move this fast. Google is, often unilaterally, pushing new features and declaring them standards. In my opinion, the web should not be changing so fast that a truly open source community project couldn’t keep up. I don’t like how the web has become reliant on the largesse of billion dollar corporations.

I recognise that this is a controversial take, but in my opinion what Google is doing is a variant of “embrace and extend”. Traditionally, this meant proprietary extensions (e.g. VBScript) but I think this a subtle variant with similar consequences.

concinds 3 days ago|||
I know it's fashionable to forcefully shove the same pet peeves about Chromium into any topic even loosely related, but here I'm talking about Safari webcompat fixes, bug fixes, and improvements having very long delays between being written and landing in customers' hands. I would make the same argument if Chrome never existed. Thank you for presenting the 10,001st reissue of this "controversial take".
simondotau 3 days ago|||
The behaviour of entities that WebKit is ostensibly told to be compatible with isn't a "loosely related" topic, it's precisely on-point. It's certainly no less on-point than nebulous criticisms of Apple for assumed NIH syndrome or marketing priorities. You criticise Apple for not having a rapid release schedule; I am criticising the very notion of rapid release schedules (other than security patches).

The web platform doesn't need to move so fast.

hu3 3 days ago||
How can you defend Safari rendering broken sites for long periods due to lack of frequent updates as a good thing?

The ever current adage of distortion field applies here.

Just like Safari not having webgpu was touted as a feature and now that it has support, webgpu suddenly turned into a feature. Apple can do no wrong to some. Whatever they do is a feature. And if they don't do, it's a feature too.

simondotau 3 days ago|||
I agree that numerous companies inspire occasional weird reflexive defences from their most enthusiastic supporters. Thankfully, bad arguments have no transitive value.

Implying otherwise is itself a bad argument.

It is true that Safari sometimes lagged in ways that are legitimately open to criticism. There are instances where Safari had incomplete or broken feature implementations. But many claims of “broken sites” are really just evidence of lazy developers failing to test beyond Chrome or to implement graceful fallback. Relying on bleeding-edge Chromium features before they've been broadly adopted by browsers is, IMHO, a infatuation with novelty over durability. It's also, IMHO, a callous disregard for the open web platform in favour of The Chrome Platform. Web developers are free to do whatever they like, but it's misleading to blame browsers for the bad choices and/or laziness of some web developers.

concinds 3 days ago|||
> But many claims of “broken sites” are really just evidence of lazy developers failing to test beyond Chrome or to implement graceful fallback.

Correct. People test Chrome first and often only. That'll never change because people are lazy and you have a humongously long tail of websites with varying levels of giving a shit and no central authority that can enforce any standards. Even if another browser takes other, they'll only test that one.

The solution is formal tests and the wpt.fyi project. It gives a path to perfectly compatible implementations of agreed-upon standards, and a future where *the only* differences between browsers will be deliberate (e.g. WebMIDI). Brilliant.

That's why I wish the gap between Safari TP's wpt.fyi score and Safari stable's score was shorter. Simple!

saagarjha 3 days ago|||
Why do you keep conflating bug fixes with new platform features?
simondotau 3 days ago||
Because such bugs were predominantly associated with then-new platform features.

As a web developer myself, I appreciate the frustration with Safari's flexbox bugs of a decade ago and viewport bugs more recently. I also remember being endlessly frustrated by Chrome bugs too, like maddening scroll anchoring behaviours, subpixel rounding inconsistencies, and position:fixed bugs which were broken for so long than the bugs became the de-facto standard which other browsers had to implement. All browsers have bugs. To suggest that Safari was uniquely bad is to view history with Chrome-tinted glasses.

saagarjha 2 days ago||
I'm not saying that other browsers don't have bugs. This thread is about how Safari doesn't fix them for a long time because it ships slowly.
simondotau 1 day ago||
You are assuming that Safari didn’t fix bugs for a long time because it “ships slowly.” Maybe some bugs are just complicated and take time to fix. It took Google years to fix the bugs I mentioned earlier (and many others) despite having the largest budget of any browser project and a VERY rapid release cadence.
saagarjha 18 hours ago||
No a lot of them are pretty straightforward, this is why I’m upset. I’m talking about, like, “SVGs with this feature don’t render correctly due to an oversight in size calculation” not “can you please implement WebGPU in the next release cycle”.
alwillis 3 days ago|||
> How can you defend Safari rendering broken sites for long periods due to lack of frequent updates as a good thing?

That hasn't been true for a few years now.

Even now, when a site breaks in Safari, more often than not, it's because that particular site is using a Chrome-only feature that hasn't shipped in Safari or Firefox yet. These developers need to be reminded that progressive enhancement is a thing.

There are web developers who only test their sites on Chrome, which makes no sense, given mobile Safari has around 50% marketshare in the US [1] and about 21% globally [2].

> Just like Safari not having webgpu was touted as a feature and now that it has support, webgpu suddenly turned into a feature.

I must have missed this one, but anyone paying attention would have noticed WebGPU had been available in Safari (behind a flag) long before it became official; it was always on track to becoming a real feature.

[1]: https://gs.statcounter.com/browser-market-share/mobile/unite...

[2]: https://gs.statcounter.com/browser-market-share/mobile/world...

troupo 3 days ago||||
"Google learned from Microsoft’s mistakes and follows a novel embrace, extend, and extinguish strategy by breaking the web and stomping on the bits. Who cares if it breaks as long as we go forward." https://www.quirksmode.org/blog/archives/2021/08/breaking_th...
simondotau 3 days ago||
That's a good article. Thanks for surfacing.
runlaszlorun 3 days ago||||
VBScript is a word I hadn't heard in quite a while! Brings back memories of editing 5k line .asp files to find an if statement and then a 1000 lines of html and such. Sadly, I dont' think web development is actual better 20+ years later, just different...
kyle-rb 3 days ago|||
The web platform on your device needs to be locked to a specific version because the OS stopped being updated. Once the OS stops being updated, you're supposed to buy a new device.

You shouldn't be allowed to use an old device with an updated browser, especially not a browser from a 3rd party, because that doesn't help Apple sell more iPads.

alwillis 3 days ago|||
> I can't think of a single good reason why they don't adopt an "evergreen" 4/6-week update model except Not Invented Here syndrome or "it's not Apple-like, we prefer the OS team (and therefore Marketing) dictating our release schedule, users be damned".

There's a new version of Safari Technology Preview [1] for macOS every two weeks.

There's a new version of Safari released every September for macOS, iOS, iPadOS, and visionOS. This has been the schedule for several years. Since Safari 26 shipped on September 15, 2025, there have been two updates for these platforms:

Safari 26.1 on November 3rd and 26.2 on December 12th.

The Safari team shipped 7 releases this year, averaging 7½ weeks between releases; not a significant difference from 4–6 weeks. Each major release of Safari for macOS runs on the current macOS version (Tahoe) and the two preceding ones—Sequoia and Sonoma.

BTW, there were 9 Safari releases in 2024, averaging 5.8 weeks apart.

It's not the first time Safari shipped a significant new feature before other browsers; :has(), Display P3 color support, JPEG-XL come to mind. At the end of the day, there's no NIH or Marketing team dictating the release schedule.

[1]: https://webkit.org/downloads/

concinds 3 days ago||
The Safari/WebKit people are doing good work, yes.

I use Safari as my default, and like every Firefox/Safari user I still get some bugs that don't occur in Chrome (not talking about WebMIDI obviously), so watching that 30 point gap between stable Safari and bleeding-edge WebKit (longer than 7½ weeks) on wpt.fyi was quite frustrating. The average Safari user would have a better browsing experience with a shorter fix delay, that's just the truth. Having to wait for macOS updates holds back the browser, unnecessarily.

alwillis 3 days ago|||
> Having to wait for macOS updates holds back the browser, unnecessarily.

Safari is an operating system component, which lots of people don't seem to understand; hundreds of thousands of 3rd party apps rely on Safari's WebKit engine.

I've never heard a normie Safari user complain that Safari updates aren't being released quickly enough; that's something web and app developers care about… which is why Safari Technical Preview is released every two weeks.

Even the release versions of Safari on iOS, iPadOS and macOS allow you to enable web features that are still in development.

wpm 3 days ago|||
The bugs aren’t necessarily the browsers fault.
halapro 3 days ago|||
Safari has been releasing a lot more often than it used to. My personal gripe with Safari is how they decided to deal with extensions, forcing every developer through their hellish App Store submission experience.
alwillis 3 days ago|||
> They surprised us all when they suddenly shot to the top of interop-2025 this October

Not all of us were surprised; some of us have been watching the Safari team shipping the latest HTML and CSS features for a few years now.

madeofpalk 3 days ago|||
This is not all that surprising. While the Chrome team is out there evangelising things like WebPCIe or whatever, Safari's been shipping features clients actually want, like blurred backgrounds for years before anyone else.
cosmic_cheese 3 days ago||
Imagine if the literal army of Chromium/Blink engineers threw their entire weight into making the fundamental building blocks that everybody uses better instead of niche things that only a tiny fraction sites and web apps will ever need.
MintPaw 3 days ago|||
Hm, I know that Safari doesn't support 64bit wasm, which is a very important feature that Chrome and Firefox both have, but this seems to say they have "100% webassembly support".

https://webassembly.org/features/

culi 3 days ago||
interop is a subset of tests chosen beforehand (nowadays, mostly by devs voting in the github issues). This says Safari has reached 100% on the subset of tests agreed upon for interop-25. Those specific tests can be expanded by clicking it in the menu. It'll take you here:

https://wpt.fyi/results/wasm/jsapi?label=experimental&label=...

The full test-suite of wasm tests are here:

https://wpt.fyi/results/wasm

neo_doom 3 days ago|||
Fascinating tracker. So we started 2025 with nearly every browser under 80% and ending the year with every browser with >98% interop? That's a lot of amazing work done by a lot of teams. Incredible!
TheCoreh 3 days ago||
Just to clarify the meaning of the measurement, it doesn't mean they're 98% interoperable across everything, it's across the specific set of goals for 2025. (Which is still really good!)

I think they realized that shipping the features out of sync meant nobody could use them until all browsers adopted them, which took years, so now they coordinate

lelandfe 3 days ago||
All of the above and even more so to have those features behave identically across the member browsers.
65 3 days ago|||
Safari became the new IE for a while, the amount of problems I've had with Safari CSS animations and SVGs is endless.

It's good they're trying to not make Safari suck as much.

Unai 3 days ago|||
Safari is still the new IE. Well, not really "new", it has been IE all along. It's the only non-evergreen browser that remains, and I don't get why this isn't mentioned every time Safari is brought up. All of their spec implementations are meaningless when the only version that matters is the one forever stuck in whichever oldest iPhone n% of people still use.

Caniuse is pointless, their new "baseline" score is pointless; as long as enough people keep using their (perfectly fine and working) iPhones after official support stops and as long as they are not allowed to install a different browser (engine), that's the only data point you need to look at when choosing which browser features to use.

robertoandred 3 days ago|||
The only people who think Safari is the new IE are people who weren’t around for IE.
culi 2 days ago|||
it's also not possible for Safari to be the new IE because they don't have 95% marketshare. And IE's unique problem was that they pushed features that only they supported. Safari's problem is it doesn't support certain features

Also the thing is that there are plenty of features supported by Safari and Firefox that Chrome is slacking on. Nobody every complains about those features though because nobody would try to use a feature not supported by Chrome in the first place

alwillis 3 days ago|||
> The only people who think Safari is the new IE are people who weren’t around for IE.

Absolutely true! I've said the same thing many times myself.

Stating that Safari is the new IE is one of the answers to:

"Tell me you didn't do web development in '90s and have no idea what you're talking about without telling me you didn't do web development in '90s and have no idea what you're talking about."

meowface 3 days ago|||
I hope they add WebTransport support soon.
culi 3 days ago||
voting for interop 2026 is active now. I see somebody has already submitted a proposal for it

https://github.com/web-platform-tests/interop/issues/1121

pie_flavor 3 days ago|||
My favorite is finally supporting `arbitrary-subdomain.localhost`. Been a real pain in the neck to add Safari-specific fallbacks for my usage of that.
jhogervorst 2 days ago||
Oh, that's nice for sure! Has it been announced anywhere?
zwnow 3 days ago|||
Does it still expand an svg to full size if u omit width and height attributes because u control the size in a parent container? Fuck safari
socalgal2 2 days ago|||
interop-2025. It does not mean Safari supports all the latest stuff. It means, "for some small subset of stuff here's the percent that's supported".

Of course Safari pushes to have anything they don't want to support not in that subset.

hoten 3 days ago||
I wonder if Ladybird has explored running these interop tests yet. Or maybe these are just a subset of WPT?
open592 3 days ago|||
You can edit the "products" represented in the table and add "Ladybird" to the list. [1]

Their result is: 1974740 / 2152733 (91%)

They also have their own dashboards tracking this [2]

[1] https://wpt.fyi/results/?product=ladybird

[2] https://grafana.app.ladybird.org/public-dashboards/2365098a1...

culi 3 days ago||||
Here's a comparison including the big 3, ladybird, servo, and flow

https://wpt.fyi/results/?label=master&product=chrome&product...

To answer your question, yes. Apple requires 80% test passage of all the tests on web-platforms-test in order to be considered as a valid browser for iOS so they specifically targeted this suite to reach that milestone

It's a pretty silly requirement because wpt is not really meant to be representative of all web platform standards. It includes tests for non-standard features and the majority of tests are simple unicode glyph rendering tests.

nextaccountic 3 days ago||
I thought that no other browser engine could be provided on iOS. so no ladybird's engine, no servo, no gecko, no blink, only webkit
extra88 3 days ago|||
Some geographic regions have declared that not allowing other OS engines on iOS is anticompetitive so they're requiring Apple to allow them.

Apple is fighting it tooth and nail and coming up with requirements for other engines is a small way of doing that.

culi 2 days ago|||
that was true until a few months ago due to a ruling in the EU. It's still currently the case that only WebKit can run on iOS but they're gearing up to change that
nicoburns 3 days ago|||
They are indeed just a subset of WPT. Although the way subtests are weighted in the score calcustion is slightly different for the "interop" score.
wackget 3 days ago||
I wish they'd release CSS Gap Decorations: https://developer.chrome.com/blog/gap-decorations

I'm tired of having to use stupid hacks to get nice-looking borders between flex/grid items.

rahkiin 3 days ago|
Have you considered using tables?

It is funny how we keep asking more and more and more even though we already have it so much better than before. Can we never be happy with what we have?

j-krieger 3 days ago|||
> It is funny how we keep asking more and more and more even though we already have it so much better than before.

I've been developing web stuff for 15 years now and sometimes I can't believe comments like these. We didn't have it "so much better before". CSS sucked hard and getting things right for three devices was an incredible pain in the ass.

Tables have semantic meaning. They don't support fractional units. Reflowing for mobile is impossible and you need JS hacks like splitting tables. You can't reorder natively.

perardi 3 days ago|||
I have been developing web stuff for 20 years now and I also can’t believe comments like these.

Flex and grid enable layouts that are far beyond anything we could do with table layouts. Anyone who claims otherwise has obviously not done any amount of serious, production FE UI design and development.

Are there bits of DX ergonomics I’d like in flex and grid? Of course. Does the syntax sometimes feel a bit arcane? Yeah. But the raw power is there, and anyone who claims the contrary is either a gormless backend developer, or some troll who is trying to design things in MS Word.

spencerflem 3 days ago||||
Tbf it said “we have it so much better Than before” I think they agree with you
alwillis 3 days ago||||
I saw a similar comment on HN recently that CSS was "better" back in the day and what we have today is either unnecessary or too hard.

I reminded that person we had to use floats and positioning hacks and abuse HTML tables for page layout before flexbox and CSS Grid were created.

There was no way simple method to center a div!

dormento 1 day ago|||
> we already have it so much better than before

They meant now. "we have it so much better than how it used to be."

sabellito 3 days ago|||
How would tables solve the issue they're talking about?
docmars 3 days ago||
Borders can be applied to table cells independent of the content inside cells.

Gap decorations allow you to add borders between flex/grid items, but without the woes of dealing with table quirks and behavior.

Common use cases would include mimicking design patterns found in print layouts, particularly newspapers and menus, to help divide groups of items or info.

Examples: https://developer.chrome.com/blog/gap-decorations

jonah 3 days ago||
This is exciting to see! I just used Masonry for a project this past week. While it works quite well and is pretty performant, it is pretty hacky using absolute positioning, wanting to know the aspect ratios of objects beforehand for smoother layout, and having to recalculate everything on resize. I'm looking forward to having a generally available native option one of these days.
aag 3 days ago||
Me, too. I like masonry layout too much to wait for CSS to solve the problem, so I've been waiting to remove the last 1.3KB of Javascript from my home page since 2019.

Thank you to everyone who is making this happen.

mmis1000 3 days ago|||
There is way to create masonry without specifying x,y position of every element though. https://codepen.io/mmis1000/pen/gOyZJqE

Adding a new element still need dimension of the element and a bit JavaScript.(The whole page use < 100loc unobfuscated JavaScript) But resizing can be handled by css naturally.

I think the issue here is most people don't really have a good way to specify how masonry should work. And thus don't have a good implementation either.

Zardoz84 2 days ago||
There is ways of create a basic masonery layouts using only pure CSS grid. But dependes on the use case. Take this example where are mixed cards without images, only text, and with images plus text.

https://codepen.io/zardoz89/pen/KKVEGbw

nehalem 3 days ago||
There is an element of tragic comedy to those announcement. While remarkable on their own, everybody knows that one cannot use any new browser feature reliably any time soon due to Apple not shipping continuous updates to the browsers they force upon their users.
hu3 3 days ago||
iOS from 2 versions prior don't get latest Safari?

I can't check because my wife's iPhone is, regrettably according to her, "updated to the latest glAss version".

8n4vidtmkvmk 3 days ago||
I know one of my clients complained something didnt work on their few year old iPad. So.. I don't know what the cutoff is but clearly not everything updates regularly. He did try updating it manually too but couldn't.
robertoandred 3 days ago||
Safari got a big update last week.
mrgoldenbrown 2 days ago||
Safari in general got an update, or Safari on only the devices Apple deems worthy? Usually Apple limits Safari updates to new phones.
robertoandred 2 days ago||
Do you consider six-year-old phones new? What about seven-year-old Macs?
culi 2 days ago||
I think the iPhone X is the newest model that is no longer receiving iOS updates. That came out in 2017. So 8 years ago
emilbratt 3 days ago||
I always thought that the masonry layout looked good but made it harder to get a good overview of the images.
halapro 3 days ago||
A lot of web "design" is about how it looks rather than how usable it is. At no point any stakeholder stops and actually uses the product, they scroll up and down, enjoy the pointless "scroll in" animations and say "kewl". Never mind the text that is at 50% opacity until you scroll to the exact intended point, because nobody actually attempted to read it.
satvikpendem 3 days ago||
> At no point any stakeholder stops and actually uses the product, they scroll up and down, enjoy the pointless "scroll in" animations and say "kewl".

Actually that's exactly what they do. They like the animations while some people, especially devs, do not. But they don't use it multiple times, because they would be able to see how it gets annoying after the first time.

Sharlin 3 days ago||
The biggest problem is that it's good if your images are all landscape or all portrait, but not when mixed.
SahAssar 3 days ago|||
The whole point of a masonry layout is if you have different aspect ratios. Otherwise a masonry layout is just a normal grid.
Sharlin 3 days ago||
Masonry layout fixes one of the dimensions. That means either portrait or landscape images will look visibly smaller than those of the inverse aspect ratio, because their longer side must be the same length as the latter’s shorter side.

Masonry works well if you have different aspect ratios of the same orientation.

powersnail 3 days ago||
Just curious, what algorithm is good for laying out images of arbitrary orientations, sizes, and aspect ratios? That seems like a pretty difficult problem. Some sort of variation of knapsack problem maybe?
bfgeek 3 days ago|||
You can exploit flexbox for this type of layout: https://bfgeek.com/flexbox-image-gallery/
emilbratt 3 days ago|||
I dont know what would be the best way, but I personally want each image to be represented correctly in relation to all other image. This means that the way images are laid out will looked jagged. However, as a consequence of that, it is easy to find back to a specific image. Its like when you are coding, you look at the "shape" of the code when scrolling to find that specific function definition etc..

Here is an example of the layout of a photostream that I was satisfied with.

https://frifoto.emilbratt.no/?view_mode=photo-stream&tag=All...

ethmarks 3 days ago|||
What?

The defining feature of masonry is that it supports mixed aspect ratios. That's its whole thing. If you aren't mixing landscape and portrait images, you shouldn't be using masonry layout.

Sharlin 3 days ago||
Masonry layout fixes one of the dimensions. That means either portrait or landscape images will look visibly smaller (less detailed, more ignorable, etc) than those of the inverse aspect ratio, because their longer side must be the same length as the latter’s shorter side. This has real UX consequences. What masonry works best with is images of different aspect ratios but the same orientation.
ethmarks 3 days ago|||
Pointing out that masonry isn't as good with mixed-orientation content as it is with uniform-orientation content is all well and good, but we still need a way to display mixed orientation content. What alternatives to masonry do you propose?

- If you stretch all images into a uniform aspect ratio, they get all squashed and look terrible.

- If you crop all images into a uniform aspect ratio, you lose potentially the majority of the content in some images.

- If you display all images at their natural aspect ratio and their full size, there will be huge swathes of empty space in between them because they don't pack tightly.

Masonry layouts allow you to preserve aspect ratio without wasting a massive portion of your user's screen space. It's not perfect, but it's the best layout mixed-orientation content that I know of.

If you know of a better method to handle mixed orientations, I'd love to hear it and would gladly rescind by remarks.

anonymous908213 3 days ago|||
Danbooru[1] and Danbooru-derived image boards handle this perfectly, and are a genuine pleasure to browse relative to the awful experience that is pinterest. There is empty space between images, and that is fine. You don't need to occupy every pixel in the screen to begin with, that's why we have these magical things called "margins", elements need room to breathe in the first place.

[1]https://safebooru.donmai.us/ (note: this is a "safe" subset of danbooru for reference, but it is still not safe for work)

satvikpendem 3 days ago||
How is that better? It's still a grid of images that seem to be constrained to a more or less rectangular grid. I'm thinking more of a dynamic grid where there is a mix of sizes of horizontal and vertical images.
anonymous908213 3 days ago||
The point being raised is that dynamic image grids don't actually make for a good UX. They might look more visually interesting at a superficial glance, but when you're actually using the interface to browse images, predictability wins out. Even having mixed-orientation images, where there is some degree of extra whitespace between images, does not change this. It is way easier to digest the content when your eyes can reliably scan one line at a time without having to bounce around everywhere to track the flow of the dynamic grid.
satvikpendem 3 days ago||
What is it with commenters in this thread and wanting to "reliably scan one line at a time?" When users use image galleries, they generally do jump around because they're looking at all the options on screen all at once. The eyes absorb everything and then they pinpoint what looks good. I've never seen or heard anyone go line by line in an image gallery or a newspaper layout and doing so I'd find to be highly abnormal to average users.
anonymous908213 3 days ago||
I suspect if data from eye-tracking tests were available, there would be an extremely clear revealed preference from users. I read image galleries the exact same way I skim text, in an ordered fashion that allows me to "read" every image without reading an image twice, stopping if my attention is caught by something in particular. Splotting garbage over the screen haphazardly makes it blend together annoyingly and results in my eyes traversing the same areas multiple times both to try to pick out details and to try to keep my place in what I have/haven't skimmed yet. It is a layout that itself demands my attention, rather than letting my attention be absorbed naturally by the actual images.
satvikpendem 3 days ago||
From actual eye tracking data via Hotjar and similar, people do skip around the page. Those that scan linearly are in the minority but probably are more highly represented on HN, just as a matter of course.
hannasm 3 days ago|||
Well I think this is a great step forward but it would be great if we could mix aspect ratios even better...

Consider a similar layout to OP but the landscape images will span multiple columns as well as everything it already does.

The thing about masonry is that it adapts to the size of the images. You could already do masonry using flexbox if you know the image sizes (https://github.com/hannasm/masonflexjs). Doing it as a true mosaic layout would be a step above current capabilities. At that point it's probably pretty easy to create configurations that don't fit perfectly/ require lots of empty space to layout nicely though.

ethmarks 3 days ago||
Kind of random but why, in the linked repo, are you using dotnet core for minifying a Javascript file? I'm just curious. It seems like overkill to me.
jrgd 3 days ago|||
With Masonry and using the bin packing algorithm/layout, according to your visual requirements, you can (should?) use a system for sizes for the sizing element and get different widths for the underlying columns of the ‘grid’; ie: if the sizing element is a quarter of base width, you scale down some of the widest image to bring more homogeneity-or on the contrary balance it with some enlarged elements that brings some rythm.

Edit: doc has this first example https://masonry.desandro.com/layout that you could use but have to imagine images to be twice the size, similar to a Müller Brockmann grid

uniq7 3 days ago||
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.

ethmarks 3 days ago||
But if you don't need to systematically examine every element one-by-one, lane layouts are pretty good. Sites like Pintrest use lane layouts because their content isn't meant to by systematically examined, but rather absorbed at a glance. If your content is meant to be systematically examined, using a lane layout would be a bad UX choice. But just because lane layouts can be misused doesn't mean they're a bad layout.
aidenn0 3 days ago|||
I think it's one of those things that looks good, but is annoying to use non-superficially.
j_w 3 days ago||
IMO it's annoying to use at all. It just looks "good" (subjective).

Larger images dominate and flashy images become more important to get attention (if bringing focus to an image is the idea). An extremely poor way to present information.

sippeangelo 3 days ago|||
Thankfully the feature is just in time for it to fall out of fashion! It really is an awful layout, UX wise. But at least it looks pretty at a glance!
satvikpendem 3 days ago|||
It's not meant to be "efficient," it's meant to allow your eyes to look at the entire page at once to find what you're looking for. A newspaper or photo gallery comes to mind.
Tempest1981 3 days ago||
Feels very "right-brain". I'm a brain-hemisphere equality advocate. Good for sites like Pinterest. But also Home Assistant.
ray_v 3 days ago||
If I ever encounter, and need to read a webpage with arbitrarily sized and placed grids of text, please somebody just shoot me. https://webkit.org/wp-content/uploads/Grid-Lanes-newspaper-d...
satvikpendem 3 days ago||
Never read a newspaper?
netsharc 3 days ago|||
(Not GP poster.) I don't really have a problem with masonry layouts, but a newspaper is limited by the paper size and they have incentive to squeeze everything in there (to maximize the spread of "information"). The screen is theoretically infinite (although not for kiosks).

I do have a website with a lot of images, and at the moment everything is in a 3-across grid layout...

satvikpendem 3 days ago||
The screen is infinite but information should still be prioritized, that is why newspapers use different sizes of headings. If they truly wanted to jam everything in there, they'd use the same small font size and save on paper, but that's not what people like because they want to see at a glance what is important and what's not, and that's done by the font size initially. This is no different on an infinite screen, the design principle of information prioritization still holds.
ray_v 3 days ago|||
Yes, I have. Printed, which is fundamentally, and literally a different media type with different properties
satvikpendem 3 days ago||
Someone else said the same thing which I addressed here: https://news.ycombinator.com/item?id=46331586#46334242

TLDR: in the user's eyes, a newspaper and this sort of layout are not very different, if the average user can navigate the former for hundreds of years, they can navigate the latter.

ray_v 3 days ago||
Ok, but the fact of the matter is that a digital display rendering a webpage and a physical format of a newspaper are fundamentally different media and should be treated as such. A wall of text isn't fundamentally a bad thing, but on a display monitor (or god help you, a cellphone or tablet) that's a terrible user experience.
satvikpendem 3 days ago||
Sure, you can treat them differently, but for certain use cases and layouts, you can treat them the same. It all depends on what you're trying to do.
meesles 3 days ago|||
I agree, this seems to violate some of the most fundamental concepts of design like least-surprise and using grouping + alignment to give context to readers.
jlaternman 3 days ago|||
I think this looks great too. Finally replicating the efficiency of newspaper layouts. No enforced symmetry, just content in an optimal space. I want.
snackbroken 3 days ago|||
It looks pretty, but fails at basic usability.

After reading the top-left block of text titled "Optimizing Webkit & Safari for Spedometer 3.0", what the fuck am I supposed to read next? Am I meant to go recursively column by column, or try to scrutinize pixels to determine which of the blocks are further up than the others, skipping haphazardly left and right across the page? A visual aid: https://imgur.com/a/0wHMmBG

Columnar layout is FUNDAMENTALLY BROKEN on media that doesn't have two fixed-size axes. Web layouts leave one axis free to expand as far as necessary to fit the content, so there is no sane algorithm for laying out arbitrary content this way. Either you end up with items ordered confusingly, or you end up having to scroll up and down repeatedly across the whole damn page, which can be arbitrarily long. Either option is terrible. Don't even get me started on how poorly this interacts with "infinite scroll".

atoav 3 days ago|||
Well not all content is meant to be read in order. A layout like this is good for content where you want to incentivise users to read in whichever order you like. So if the order is confusing you, chances are there wasn't meant to be any order at all. E.g. if you search google images google guesses some relevant order for you, but it is layed out in a dense way so you can scan with your eyes and decide which thing is most relevant for you. Whether you scan the screen left-right, top-down, randomly, bottom up, or ehatever is totally your choice.

Using such a layout for a novel or something like this would be really bad UX. But using it for an image gallery? Or a series of random articles that aren't priorized? Why not?

zozbot234 3 days ago||||
> Columnar layout is FUNDAMENTALLY BROKEN on media that doesn't have two fixed-size axes.

You can use plain old CSS columns (which don't have the automated "masonry" packing behavior of this new Grid layout, they just display content sequentially) and scroll them horizontally. But horizontal scrolling is cumbersome with most input devices, so this new "packed" columnar layout is a good way of coping with the awkwardness of vertical scrolled fixed-width lanes.

satvikpendem 3 days ago|||
> what the fuck am I supposed to read next?

What a weird comment. You read whatever you want next, ever read a newspaper? You scan it all and pick the article you are interested in, then read that. I don't understand these comments, they work perfectly well in real life (and fixed size is arbitrary, I can make a super wide or super long newspaper too, the axis size does not affect this sort of layout, see infinite scroll for example, as there is only a fixed amount of content on the screen at any given time).

snackbroken 3 days ago|||
> You scan it all and pick the article you are interested in

Okay. What order am I supposed to scan in so I don't lose my place and accidentally skip a block? Scanning column by column gets me cut off partial boxes that I'll have to remember to check again later, while scanning side to side forces me to keep track of each individual block I've already looked at, as opposed to a single pointer to "this is how far I've scanned". Alternatively, I can scan roughly left to right, top to bottom and just live with missing some blocks. That's not ideal either, because hopefully if you didn't think I'd like to look at all of them you wouldn't have included them on the page.

You're right that you can make a newspaper that's really inconvenient to read, but you wouldn't, because the failure case you'd end up with is CSS Grid Lanes.

satvikpendem 3 days ago||
This is so funny that I'm not even sure what to say. You can ask your exact questions about a newspaper but somehow 99% of people manage to read them just fine. I think it's just a you problem that you are looking for an exact algorithm on how to scan a page with multiple sizes of content; in reality, people just look over it all and keep track of what they have or haven't looked at all in their heads.
snackbroken 3 days ago||
In a newspaper the answer is simple. You linearly scan the leftmost column to the bottom of the page, then the next column, then the next, and so on until you get to the end of the page. At no point do you ever need to keep track of anything other than "this is how far I've gotten" to make sure you haven't missed anything. Columnar layout make sense in newspapers because both axes are fixed in size, so all you ever do is one long linear scan with wraparound.
satvikpendem 3 days ago||
If one axis is fixed, and it is in the case of grid lanes (it's not a fully pannable infinite canvas like Figma after all), you just keep reading the content that's on the current screen, then you scroll. I really don't see how it's any different to, for example as I mentioned previously, a long newspaper with many pages; each "page" is one "screen" worth, analogously. It's like infinite scroll, either vertically or horizontally, where instead of just one item in the list, you have a few. And if we're being really pedantic, Figma users do perfectly fine keeping the context of the content in their minds even in an infinitely pannable canvas. And also, generally newspaper readers do not do what you say, scanning column by column, they instead glance their eyes over all of the headlines then pick which one looks good then they read the article attached to that, it is a free form process.

So again, I will contend that this is not a problem for the average reader. I really cannot see where the difficulty you seem to say lies.

2cynykyl 3 days ago|||
Funny, I think that looks gorgeous!
65 3 days ago|||
NYTimes.com comes to mind...
arewethereyeta 3 days ago||
what's your problem?
ThatMedicIsASpy 3 days ago||
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?

miiiiiike 3 days ago||
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

JimDabell 3 days ago|||
> 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.

I think that’s an exceptionally uncharitable description of what happened. This is a decision the WebKit team has been repeatedly publicly asking people to participate in for over 18 months.

> Help us invent CSS Grid Level 3, aka “Masonry” layout

> P.S. About the name

> It’s likely masonry is not the best name for this new value. […] The CSSWG is debating this name in [this issue]. If you have ideas or preferences for a name, please join that discussion.

— https://webkit.org/blog/15269/help-us-invent-masonry-layouts...

> Help us choose the final syntax for Masonry in CSS

> We also believe that the value masonry should be renamed.

> As described in our previous article, “masonry” is not an ideal name, since it represents a metaphor, and not a direct description of its purpose. It’s also not a universally used name for this kind of layout. Many developers call it “waterfall layout” instead, which is also a metaphor.

> Many of you have made suggestions for a better name. Two have stood out, collapse and pack as in — grid-template-rows: collapse or grid-template-rows: pack. Which do you like better? Or do you have another suggestion? Comment on [this issue] specifically about a new value name (for the Just Use grid option).

— https://webkit.org/blog/16026/css-masonry-syntax/#footnote-1

> [css-grid-3] Renaming masonry keyword

— https://github.com/w3c/csswg-drafts/issues/9733

miiiiiike 3 days ago||
The debates went on for years and following it closely became a poor use of time. Even the subgrid conversation seemed completely stalled. I think a lot of people tuned out long before any vote was discussed. I did.
dagmx 3 days ago||
But if you were the one who tuned out, then isn’t it uncharitable to describe it as their failing to make you aware of the vote? Isn’t it on you to stay in the loop?

Surely they can’t start just pinging everyone who might have cared at some point during the time to get involved.

miiiiiike 3 days ago||
I get what you're saying but making interminable arguments and keeping the "debate" going is a tactic. There's that CIA sabotage manual with the section about meetings and conferences, it can feel like that. The duration of these debates aren't usually measured in hours, days, or weeks, but years. And the people who dragging them on and staying in the fights are employed full-time to do exactly that.

It got to the point where I believed that subgrid was dead. FF implemented it but absolutely no one else did, for years.

Is it our fault for tuning out of the debate? Yep. But tactics were employed to achieve that exact outcome. I'm fine admitting that I tuned out. But it was a battle of attrition waged by people who were fine holding up progress indefinitely.

Is that how you want decisions to be made?

Ultimately I'm not too concerned what you call the masonry feature. However the debate over what to call it was an extreme case of bikeshedding. I would have rather given up the fight over semantics to resolve the non-issues and ship the feature years ago. As it stands we're still years away from actually being able to use the feature in production.

I've stopped waiting for companies, committees, or projects to change course. I don't have an incentive to build consensus within a group of people who fundamentally disagree that the thing I need should exist. Why bother? I have an incentive to spend my time building features that users will use.

dagmx 2 days ago||
This feels very much tinfoil.

There’s no incentive to the companies or the employees to draw out the discussion, especially over something so trivial. It’s much more preferable to try and speed through things to get things done in a time frame that can be adopted.

And regardless, if you don’t feel it’s worth your time, then why cast aspersions that it was something clandestine and intentionally hidden? You could have shown up and kept up with it, just like everyone else involved presumably did.

miiiiiike 2 days ago||
Eh, you’re trying to put words in my mouth.

I didn’t ascribe a motive to anyone. Their reasons are their own and it only makes sense that the people who stay in these fights do it because it’s part of their jobs.

There are people who, for whatever reason, keep debates going over small points of disagreement and prevent issues from being settled. Sometimes for years. Right?

The older I get, the more likely I am to recognize and route around or ignore interminable debates. Especially if it’s not for a company, project, or initiative under my direct control.

Remember, the question at the top of this thread was essentially “What happened to ‘masonry’?” Well, there were quibbles over the descriptors.

I don’t care about quibbles. “masonry”, “grid-lanes”, “grid-masonry”, pick one, they’re equivalent. I don’t like it when quibbles block progress.

Sometimes people and companies do want to block things. You’d have to ask them why. Like I said earlier:

> I don't have an incentive to build consensus within a group of people who fundamentally disagree that the thing I need should exist.

Pick your battles… Actually, no, it’s usually better to ignore the fights and just get what you need to get done so you can move on.

culi 3 days ago||||
Wasn't Firefox the only browser that actually implemented `grid-template-rows: masonry` anyways?

It sucks whenever browsers backtrack on a W3C standard that reached "Working Draft" status but it doesn't seem like it's gonna impact many people

Besides, it's not being "deprecated". It will continue to work as it does. We just have a better alternative that the big 3 all agreed on.

afavour 3 days ago|||
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

miiiiiike 3 days ago||
People have been dragging their feet on subgrid, masonry, etc for almost a decade. I followed it pretty closely for years but stopped when it started turning into a Christopher Guest mockumentary.

Masonry or grid-lanes, who cares? I’m just glad masonry (the feature, Baseline 20XX) and subgrid (Baseline 2023) are finally here.

dylan604 3 days ago|||
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
Doxin 1 day ago|||
One hack to almost get a justified gallery like that with no javascript is to lay them out with flexbox, setting their width to a percentage or vw value which your backend calculates based on image aspect ratio and desired image height, use flex-grow to stretch them to fill remaining space, and then using background-position: cover to make the images fit the slightly wrong aspect ratio containers.

This will of course slightly crop all your images to make it fit, but in practice as long as you keep your image aspect ratios reasonable and the images small enough on the page it's really quite subtle.

I had hoped that this feature would provide for masonry like that, but one has to make do.

karlshea 3 days ago|||
What you’re looking for is described in the article as “bricks” (vs “waterfall”) and is also supported.
notpushkin 3 days ago||
Not quite – “bricks” would have a jagged edge on the right side, while “justified gallery” libraries produce even rows of the same length (but slightly different height), e.g. https://justifiedgallery.com/ or https://miromannino.github.io/Justified-Gallery/
rhdunn 2 days ago||
The following should be compatible with both approaches:

    .masonry {
      display: grid;
      display: grid-lanes;
      grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
      grid-template-rows: masonry;
    }
Firefox and browsers supporting the old syntax will ignore the `display: grid-lanes` as it doesn't recognize it and fall back to the grid+masonry.

Browsers supporting the new syntax will override the `display: grid` with `display: grid-lanes` and ignore the `grid-template-rows: masonry` syntax.

acjohnson55 3 days ago||
Very cool! I wonder, will it be easy to build interactive interfaces on this primitive, like animations and drag-and-drop?
jbritton 3 days ago|
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.
eurleif 3 days ago||
Recently discussed on HN: https://news.ycombinator.com/item?id=46144039
hansvm 3 days ago|||
I've done that for desktop apps before. You have to be careful with the effects of sub-pixel rendering and whatnot if your math is continuous, but it's a viable path that I quite like.
marcosdumay 3 days ago||
Don't use continuous math in either a design system nor a constraint solver that you expect random developers to use. Either case will only lead to problems.
hansvm 2 days ago||
I largely agree, but there's a little nuance insofar as "interior-point" methods are very powerful. You can go a long way by encoding your goals as error functions and letting a gradient-based optimizer do the rest.
jacobp100 3 days ago||
iOS used to do this using the Cassowary constraint solver pre-SwiftUI. It’s the worst thing to work with. So much code turning on and off constraints, dynamically adding constraints when you have new views. And that’s before you get into conflicts
More comments...