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 justify-items and justify-self without flexbox or grid #1037
justify-self should work for block-level boxes and justify-items should work for block containers.
This is implemented in Chromium-based browsers since version 130 (it was not mentioned in any release notes but is mentioned here). In Firefox and Safari, justify-items can only be used in conjunction with display: grid and justify-self can only be used for absolutely positioned boxes or grid items.
Several updates to alignment have been implemented across all browsers over the last few years:
The self-alignment properties align-self and justify-self work for absolutely positioned elements.
align-content works without the need for flexbox or grid.
Reacted by Nilesh Prajapati, Luke Warlow, jsnkuhn, Andreu Botella, Oriol Brufau, Ana Tudor, Vladimir Agafonov, Bruno Heridet, Valtteri Laitinen, Ziad El Khoury Hanna and 15 more
This comment was automatically generated based on the information you provided. Please don't edit it.
No web features (from the web-features project) were found in your proposal. If your proposal doesn't correspond to a web feature, that is fine.
Otherwise, please update your initial comment to include web-features: <feature-id>.
To find feature IDs, use the web-features explorer.
Implementing justify-self on block-level boxes definitely makes sense. I'm a little concerned about justify-items, however, because if it is interpreted strictly it would violate the block-box transparency principle. ("Inserting an unstyled block in a block formatting context (as sibling, parent, child or intermediary), or an unstyled inline in an inline formatting context, should have no effect on rendering.")
@Loirooriol How did you address this issue in Servo? We probably need to open a CSSWG issue to clarify the spec one way or another.
Yes, I guess the principle is violated. But that already happens with percentage resolution, adding a parent with height: auto can make percentages indefinite.
Basically I just implemented what CSS Align says, and what Blink had shipped beforehand, modulo some issues that I reported (e.g. the resolution from w3c/csswg-drafts#11462 is in my TODO list)
Thank you for proposing CSS justify-items and justify-self without flexbox or grid for Interop 2026.
We want to let you know it was not selected to be part of Interop this year.
On behalf of the entire Interop team, thank you for submitting it for consideration. We got many more proposals than we could include in this year's project, necessitating some difficult choices. Please note this should not be taken as a comment on the technology as a whole, or our willingness to consider it for Interop in the future. We appreciate the work you put into your proposal, and would welcome your participation in future rounds of Interop.
Activity
github-actions commentedon Sep 6, 2025
This comment was automatically generated based on the information you provided. Please don't edit it.
No web features (from the web-features project) were found in your proposal. If your proposal doesn't correspond to a web feature, that is fine.
Otherwise, please update your initial comment to include
web-features: <feature-id>.To find feature IDs, use the web-features explorer.
[-]CSS justify-items and justify-self[/-][+]CSS `justify-items` and `justify-self`[/+][-]CSS `justify-items` and `justify-self`[/-][+]CSS `justify-items` and `justify-self` without flexbox or grid[/+]Loirooriol commentedon Sep 6, 2025
For what it's worth, this works in Servo too, and was quite straightforward to implement (servo/servo#36595).
jgraham commentedon Sep 19, 2025
@Loirooriol do you happen to have a link to the right set of wpt tests to cover this proposal?
Loirooriol commentedon Sep 19, 2025
@jgraham https://wpt.fyi/results/css/css-align/blocks?q=justify-self|justify-items
fantasai commentedon Dec 2, 2025
Implementing
justify-selfon block-level boxes definitely makes sense. I'm a little concerned aboutjustify-items, however, because if it is interpreted strictly it would violate the block-box transparency principle. ("Inserting an unstyled block in a block formatting context (as sibling, parent, child or intermediary), or an unstyled inline in an inline formatting context, should have no effect on rendering.")@Loirooriol How did you address this issue in Servo? We probably need to open a CSSWG issue to clarify the spec one way or another.
Loirooriol commentedon Dec 2, 2025
Yes, I guess the principle is violated. But that already happens with percentage resolution, adding a parent with
height: autocan make percentages indefinite.Basically I just implemented what CSS Align says, and what Blink had shipped beforehand, modulo some issues that I reported (e.g. the resolution from w3c/csswg-drafts#11462 is in my TODO list)
wpt-interop commentedon Feb 12, 2026
Thank you for proposing CSS
justify-itemsandjustify-selfwithout flexbox or grid for Interop 2026.We want to let you know it was not selected to be part of Interop this year.
On behalf of the entire Interop team, thank you for submitting it for consideration. We got many more proposals than we could include in this year's project, necessitating some difficult choices. Please note this should not be taken as a comment on the technology as a whole, or our willingness to consider it for Interop in the future. We appreciate the work you put into your proposal, and would welcome your participation in future rounds of Interop.
Posted on behalf of the Interop team.