- From: Mats Palmgren via GitHub <sysbot+gh@w3.org>
- Date: Tue, 24 Apr 2018 23:10:12 +0000
- To: public-css-archive@w3.org
MatsPalmgren has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-align][css-grid-2] Add new value 'meet' to align-content/justify-content == Issue #2285 discusses the possibility of allowing the author to re-distribute the track sizes locally in a subgridded axis. In that case, it would be nice to be able distribute them so that the subgrid's grid gap is center-aligned with the corresponding gap in the parent grid when possible. This is what the proposed `meet` value is for. For example, using `gap: 40px` in the parent grid (and all rows are `auto`-sized) and `row-gap: 10px` on the subgrid: ![rachel_andrew_subgrid_example-meet-40-to-10-gap](https://user-images.githubusercontent.com/4010828/39216222-144f5662-481b-11e8-8adc-ac4b5549bf55.png) (I've included our devtools grid overlay on the first subgrid for clarity) A few notes on my prototype implementation of this: - `align-content/justify-content: normal` behaves as `meet` in a subgridded axis - `align-content/justify-content: meet` behaves as `stretch` in a non-subgridded axis - if the tracks would overflow the subgrid content area then it is treated as overflowing and fallback alignment occurs instead, the same as content-distribution in a non-subgridded axis would. (This implies that a subgrid gap value that is larger than its parent's triggers fallback alignment (unless the subgrid box has a definite size that makes it not overflow) and that tracks never shrinks in the subgrid.) - tracks with a fixed track-sizing function are not stretched and may thus cause the adjacent gap to be unaligned (the subgrid's gap value is always honored), gap alignment then snaps back after the next resizable track Here's the same example, but with the first row having a `100px` sizing function: ![rachel_andrew_subgrid_example-100px-fixed-row1](https://user-images.githubusercontent.com/4010828/39218436-036b51e8-4825-11e8-9b35-bee91f935eed.png) Note how the first gap can't be aligned with the parent due to the fixed track size and how the second row grows to align the next gap. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2610 using your GitHub account
Received on Tuesday, 24 April 2018 23:10:19 UTC