-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 break-anywhere
utility
#12128
base: next
Are you sure you want to change the base?
Add break-anywhere
utility
#12128
Conversation
break-anywhere
utility (#12127)break-anywhere
utility
cd9b140
to
e02d323
Compare
@serkodev This looks great. Are there any side effects you know of for browsers that do not yet support either of these, or would this work purely, as a progressive enhancement? |
@brandonmcconnell For browsers that do not support Moreover, the |
this is much needed |
Imho it shouldn't use |
There are subtle differences between the behavior of Tailwind states the following regarding browser support:
https://tailwindcss.com/docs/browser-support For example, the support rate for text wrap utilities is lower, but this is not a problem. Whether or not to use those properties should be left to the user’s discretion. |
I agree and think this should just be |
Still very much needed.. It wouldn't be a problem if it was possible to redefine word break classes through tailwind config. |
Meanwhile, you can define a plugin in your config to add this. Here in the simplest variant: import plugin from 'tailwindcss/plugin.js';
plugins: [
plugin(({addUtilities}) => {
addUtilities({
'.break-anywhere': {
'overflow-wrap': 'anywhere',
},
});
}),
], |
Hi. Is there any update on this PR? I need the |
adding in a custom class just like @silverwind 's comment should work for now |
@sadeghi-aa You could also use an arbitrary utility in the meantime, like |
Any update on merging this with base tailwind? Just went down such a huge rabbit hole since I didn't know break-word was deprecated and my iPhone users were complaining. |
ship it! |
Why this pull request is into tailwindlabs:archive/master-2024-02-23 ? |
@danielraab the old |
e02d323
to
13d7eef
Compare
I'd love to see this land for v4. This is the only usage of We're doing this as a workaround for now: plugins: [
plugin(({addUtilities}) => {
addUtilities({
'.break-anywhere': {
'overflow-wrap': 'anywhere',
},
});
}),
], |
Related discussion #12127
Updated 2024-11-30
The new changes remove the original
@supports
because I agree that developers should decide for themselves whether to maintain backward compatibility. Also updated in line with the new changes in thenext
branch.