rachelandrew / cssgrid-ama

Ask me anything about CSS Grid Layout
328 stars 12 forks source link

Grid Column as Flex Container #113

Closed preflight closed 7 years ago

preflight commented 7 years ago

...that's part of why I'm collecting these use cases and seeing which things we can't do. As that's how we figure out what we need next.

Here is another use case for a Masonry-style layout discussed here.

Consider this product-page layout:

image

Characteristics of the layout:

Problem analysis:

Proposed solution: Grid Layout enables positioning all items in their correct column and order, but every "row" clears the one above it. If Grid columns could behave like Flex containers, where the items within could be told to align ala flex-start, this Masonry-style layout would be possible with our current toolset.

Caveat: As @rachelandrew said here, this isn't the problem Grid intends to solve. One could argue the layout isn't a "grid" at all.

Postscript: I just finished your two books on grid layout - truly remarkable work. Thanks for helping us all add these valuable tools to our toolboxes.

rachelandrew commented 7 years ago

There is a thread on the CSS WG repo regarding these layouts, which is the best place to post this as a comment https://github.com/w3c/csswg-drafts/issues/945

Thanks for nice comments on the books, I'm glad they were useful :)