-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for text-wrap
property
#11320
Conversation
Update changelog
When will this land ? |
Right now it can be used as arbitrary property: |
You can use it in the npm install tailwindcss@insiders |
Is this still only in the insiders branch? I don't see it in docs, or this ticket number mentioned in release notes. |
You can do this in main.css in laravel like so for nowdays stable release
|
@tremby it's still in the "unreleased" section of the changelog so we'll have to wait a bit ;) Line 26 in dac9cf2
|
Update changelog Co-authored-by: Adam Wathan <[email protected]>
Update changelog Co-authored-by: Adam Wathan <[email protected]>
Update changelog Co-authored-by: Adam Wathan <[email protected]>
I created a plugin as a package for my own use a while ago since I didn't know about this, and I've just updated it to support https://github.com/theleoji/tailwindcss-text-balance |
Tailwind supports text-wrap since 19th of January. They were waiting for Firefox support. |
This PR adds support for the new
text-wrap
CSS property, with the following three utilities:text-wrap
text-wrap: wrap
text-nowrap
text-wrap: nowrap
text-balance
text-wrap: balance
The most interesting one here is
text-balance
that attempts to automatically balance text across multiple lines so that you don't have one really long line and one really short line.With the addition of the new
text-wrap
property, the CSSwhite-space
property now decomposes intotext-wrap
and the newwhite-space-collapse
property, but we are opting to leave explicit support forwhite-space-collapse
to a future improvement for now because none of this stuff is supported anywhere except for the very latest version of Chrome.This still feels useful for now though because
text-balance
gracefully degrades back to regular unbalanced text which doesn't look as nice but doesn't actually break the experience for anyone, so people might want to start using it today even if browser support is still catching up.