News for hackers. Stuff that matters.
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by matsemann on Tuesday April 23, 2024 @02:00PM (#40134996)
I think one additional point to consider when adding it as a new display mode vs re-using grid, is that currently these demo's fallback quite nicely now when it's re-using grid. Instead of showing it as masonry (since my browser doesn't support it), it at least behaves as a grid. If it's a new display: X property, it will fallback to div behavior with the content all over the place in unsupported browsers.
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by laszlokorte on Tuesday April 23, 2024 @02:12PM (#40135165)
you could simply do: "display: grid; display: masonry;" and all not-supporting browsers would skip the second declaration.
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by yurishimo on Tuesday April 23, 2024 @04:24PM (#40136830)
This is assuming there isn’t any cross pollution of shared properties either.
Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout by danielheath on Tuesday April 23, 2024 @08:08PM (#40138870)
`@supports masonry { shared-property: 1; }`