#1003: CSS Masonry Layout

Visit on Github.

Opened Oct 14, 2024

こんにちは TAG-さん!

I'm requesting an early TAG design review of masonry layout in CSS.

Masonry layout creates grid-based tracks in a single axis, and stacks items tightly in the other, creating rows or columns but not both. It is currently drafted into https://www.w3.org/TR/css-grid-3/ with two possible syntax options: a grid-based syntax that uses a keyword to relax alignment in the stacking axis, and an independent syntax that uses a blend of flex and grid concepts with a new set of properties. The arguments in the debate center over a) which is easier to learn for authors and b) how might this decision impact possible future developments in one or both models (or CSS in general).

I'm opening this issue to ask the TAG to schedule a review of the spec in general and of the syntax question specifically. We are currently collecting feedback, and are hoping to have a CSSWG discussion on this question in late October / early November. We will update this issue as input comes in.

Further details:

You should also know that...

  • Some of the key arguments in the early syntax debate were resolved by the above-linked resolution to adopt mixed track sizing under both options, with some notes/restrictions wrt performance, so if you're doing archaeology keep that in mind.
  • We're hoping to schedule CSSWG discussion of the syntax and overall direction of this module in 2-4 weeks or so. Let us know how we can accommodate the TAG.

Discussions

2024-10-28

Minutes

Tess: we're going to get a design review request for "masonry" - it's not a dispute escalation. They are not asking us to solve their problem. The chairs of the css-wg want the Tag to weigh in on this before they make the decision. We should not treat it like a dispute ...

Martin: we should call a spade a spade

Tess: they want our input by mid-November...

Jeffrey: asked them to talk to each other - Elika and Rachel will do that in the next week.

Tess: masonry layout is (like pinterest) - is it a new kind of thing or is it a flavour of grid? Good arguments on both sides... Not a clear right answer. There is 2 and a half implementations... mozilla, webkit, chrome in progress...

Peter: I'm aware of the issue ... at the end of the day are their behavioural changes?

Tess: basic functionality, use cases, are the same ; all addressable by either. It's not just bikeshedding. It's about extensibility of css over time... That architectural question is non-obvious.

Dan: clear developer complexity thing?

Tess: one of the arguments that's being made - you're doing a responsive layout - if you want to sometimes be doing grid and sometimes be doing masonry then that makes an argument one way... But do people actually want to do that? Don't know because they're not doing it now...

Peter: you could still switch display types - but it might have extra complexity.

Tess: some scenarios might be more complex than the other...

Peter: is there a fundamental arch principle?

Jeffrey: both sides are claiming arch principles support their side.

Tess: they're both right. I don't want to push CSS wg one way or the other...

Martin: only thing we can contribute is being the detached [view]