Re: [csswg-drafts] Alternate masonry path forward (#9041)

Firstly, I want to say that both approaches would be acceptable and the new functionality would be a very welcome change.

I just want to address one of the biggest arguments in favour of `display: masonry`.

> Reusing existing properties is more confusing, not less, if those properties behave in different ways.

I agree with this statement, but I don't think it's fair to say the "properties behave in different ways" when using `grid-template-rows: masonry` within `display: grid`. From everything I have read, using masonry within grid stays completely consistent to grid layout and just adds the option of "don't create rows that span all columns, just stagger them as needed instead". aka. masonry. This feels quite intuitive to me.

Now, I don't think the `display: masonry` solution is any less intuitive, specially because it more or less takes all the same properties from `display:grid` and re-uses them as is or with slightly different property names.

My biggest concern with `display: masonry` is that it might lead unnecessary fragmentation of APIs as the two display modes evolve over time. 
- Features might be added to one display mode and not to the other
- The same features may be added with subtly different APIs to the two display modes

The flipside of this is that this "fragmentation" can also bring some benefits such as:
- better default behaviour
- ability to add features that only make sense for masonry but not grids in general

However, seeing the examples so far, it feels like the fragmentation is leading to more cons than pros. For example, one of the proposed features of `display: masonry` is to have auto-sized columns based on the content. This is currently not a feature of `display: grid`. I don't think this is an argument in favour of `display: masonry` but an argument in favour of bringing the same feature to `display: grid`.


-- 
GitHub Notification of comment by nmn
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9041#issuecomment-2369809406 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 24 September 2024 00:03:45 UTC