Add safe alignment utilities#14607
Merged
philipp-spiess merged 1 commit intotailwindlabs:mainfrom Mar 17, 2025
Merged
Conversation
021ad12 to
adddc3a
Compare
d80a4a4 to
43fda0b
Compare
43fda0b to
76966de
Compare
philipp-spiess
approved these changes
Mar 17, 2025
Contributor
philipp-spiess
left a comment
There was a problem hiding this comment.
Hey! I've updated your PR and added the new utilities behind a feature flag. The idea is that we release these with 4.1 but we might change the exact names (although current thinking is that the -safe suffix is nice because we can educates users to use these new utilities when they start typing items-en… and we show IntelliSense suggestions).
Thanks for the PR!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #7929 and #12916
This PR adds safe alignment utilities to Tailwind 4. I opted to include them for every justify/align content/items/self property, but only for the
endandcentervalues. I know that it doesn't make sense forstart(as the point of safe alignment is to fall back tostartwhen it overflows), but I'm not sure aboutspace-between,space-around, or other values. I certainly never encountered a situation where I neededsafewith those.