mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
Use word-wrap and overflow-wrap since word-wrap is not supported in Chrome et al
This commit is contained in:
parent
038afedfac
commit
6bb7cd4e9e
@ -1,14 +1,18 @@
|
||||
export default function() {
|
||||
return function({ addUtilities, variants, target }) {
|
||||
const wrapPropertyName = target('wordBreak') === 'ie11' ? 'word-wrap' : 'overflow-wrap'
|
||||
|
||||
return function({ addUtilities, variants }) {
|
||||
addUtilities(
|
||||
{
|
||||
'.break-normal': {
|
||||
[wrapPropertyName]: 'normal',
|
||||
// For IE 11, remove 'word-wrap' when we have a 'modern' mode
|
||||
'word-wrap': 'normal',
|
||||
'overflow-wrap': 'normal',
|
||||
'word-break': 'normal',
|
||||
},
|
||||
'.break-words': { [wrapPropertyName]: 'break-word' },
|
||||
'.break-words': {
|
||||
// For IE 11, remove 'word-wrap' when we have a 'modern' mode
|
||||
'word-wrap': 'break-word',
|
||||
'overflow-wrap': 'break-word',
|
||||
},
|
||||
'.break-all': { 'word-break': 'break-all' },
|
||||
|
||||
'.truncate': {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user