You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[css-grid-3][masonry] For align-items/justify-items, should fill-reverse affect the definition of start and end? #14052
When using grid-lanes-direction: column/row fill-reverse, should we adjust our definitions of "start" and "end" for content alignment?
In the case of regular stacking axis alignment, if an item has align-self: end, it aligns to the bottom of the container:
In the case that we have fill-reverse enabled, items would fill up the container starting from the bottom. If we were to specify align-self: end to an item, should it still align to the bottom of the container:
Or align to the top of the container, which is technically near the "end" of where items are placed:
In CSS Flex, if we try to align items along the main axis where things are placed in reverse:
Using justify-content: flex-end moves items along the main axis to the TOP of the container:
I do think that fill-reverse should only be changing the behavior of auto-placed items, and align-self/items: start in columns should still align items to the original start of the container. It would be confusing if align-content: start moved all (fill-reversed) items to the bottom of the container in the column direction, and it would be confusing if align-items didn't have the same direction as align-content.
The same question applies to track-reverse -- when that's enabled, do we change where alignment for the grid-axis should be as well? ie, if we have track-reverse on a column container, would justify-items center items to the left or to the right?
changed the title [-][css-grid-3][masonry] For `align-items`/`justify-items`, should `fill-reverse affect the definition of `start` and `end`?[/-][+][css-grid-3][masonry] For `align-items`/`justify-items`, should `fill-reverse` affect the definition of `start` and `end`?[/+]on Jun 16, 2026
Flex layout has flex-start and flex-end. It would seem inconsistent to redefine start and end for masonry. But adding new keywords for each reversable layout doesn't seem great either.
I think I would like to come up with a name that is not layout-specific, alias flex-* to that, and keep start/end/self-start/self-end purely based on writing mode.
@Loirooriol It sounds like we're in agreement to keep start and end consistent with writing mode -- so start would be the top of the container in column layout and left of the container in row layout.
I also agree that we don't want to be adding new keywords for each reversable layout.
Can you elaborate on what you mean about coming up with a name? What were you thinking to use that new name for?
Given that flex-start is technically defined for non-flex containers as well, what are your thoughts on just re-using flex-start/end in grid-lanes and having that have the same behavior that you outline:
In flex layout with flex-wrap: wrap-reverse, behave like end
In waterfall grid lanes layout with fill-reverse, behave like end
I'm not sure if we resolved to add a reversal mechanism for plain grids, if so, analogous
Per spec, flex-start is supposed to work like start in everything but flex (see https://drafts.csswg.org/css-align-3/#positional-values) so I think whatever we decide should happen for start in grid lanes with fill-reverse, flex-start should match that (regardless of what flex-start does with reversals in flexbox).
Activity
celestepan commentedon Jun 15, 2026
cc @alisonmaher @mhochk @KurtCattiSchmidt @yanlingwang23
[-][css-grid-3][masonry] For `align-items`/`justify-items`, should `fill-reverse affect the definition of `start` and `end`?[/-][+][css-grid-3][masonry] For `align-items`/`justify-items`, should `fill-reverse` affect the definition of `start` and `end`?[/+]Loirooriol commentedon Jun 16, 2026
Flex layout has
flex-startandflex-end. It would seem inconsistent to redefinestartandendfor masonry. But adding new keywords for each reversable layout doesn't seem great either.I think I would like to come up with a name that is not layout-specific, alias
flex-*to that, and keepstart/end/self-start/self-endpurely based on writing mode.celestepan commentedon Jun 16, 2026
@Loirooriol It sounds like we're in agreement to keep
startandendconsistent with writing mode -- sostartwould be the top of the container in column layout and left of the container in row layout.I also agree that we don't want to be adding new keywords for each reversable layout.
Can you elaborate on what you mean about coming up with a name? What were you thinking to use that new name for?
Loirooriol commentedon Jun 17, 2026
I was thinking that e.g.
align-self: something-startwould:flex-wrap: wrap-reverse, behave likeendfill-reverse, behave likeendstartAnd
flex-startwould become an alias ofsomething-start.celestepan commentedon Jun 18, 2026
Thank you for clarifying!
Given that
flex-startis technically defined for non-flex containers as well, what are your thoughts on just re-usingflex-start/endin grid-lanes and having that have the same behavior that you outline:alisonmaher commentedon Jun 18, 2026
Per spec,
flex-startis supposed to work likestartin everything but flex (see https://drafts.csswg.org/css-align-3/#positional-values) so I think whatever we decide should happen forstartin grid lanes withfill-reverse,flex-startshould match that (regardless of whatflex-startdoes with reversals in flexbox).Loirooriol commentedon Jun 18, 2026
I think it would be too confusing to let
flex-startdiffer fromstarton layouts other than flex.[Masonry] Implement stacking axis alignment with fill-reverse and tra…
[Masonry] Implement stacking axis alignment with fill-reverse and tra…
[Masonry] Implement stacking axis alignment with fill-reverse and tra…
9 remaining items
[Align] Parse `flow-start` and `flow-end` keyword
[Align] Parse `flow-start` and `flow-end` keyword
Bug 2070631 [wpt PR 62469] - [Align] Parse `flow-start` and `flow-end…
[FlexLayout] Ensure `flow-start` and `flow-end` have the same behavio…
[FlexLayout] Ensure `flow-start` and `flow-end` have the same behavio…
[FlexLayout] Ensure `flow-start` and `flow-end` have the same behavio…
[flex] Use `kFlowStart/End` instead of `kFlexStart/End`
Bug 2071177 [wpt PR 62612] - [FlexLayout] Ensure `flow-start` and `fl…
[Align] Parse `flow-start` and `flow-end` keyword
Bug 2051791 [wpt PR 61010] - [Masonry] Implement stacking axis alignm…
Bug 2053322 [wpt PR 61132] - [Masonry] Fix content alignment's `start…
Bug 2070631 [wpt PR 62469] - [Align] Parse `flow-start` and `flow-end…
Bug 2071177 [wpt PR 62612] - [FlexLayout] Ensure `flow-start` and `fl…
[css-align-3][css-grid-3] Define flow-start/end alignment aliases (#1…
chore: update playwright to 1.65.0 and accept the flow-start spelling (…