mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
Merge pull request #768 from tailwindcss/split-word-break-plugin
Split wordBreak plugin from whitespace plugin
This commit is contained in:
commit
377c9258e1
@ -67,6 +67,7 @@ module.exports = {
|
||||
verticalAlign: ['responsive'],
|
||||
visibility: ['responsive'],
|
||||
whitespace: ['responsive'],
|
||||
wordBreak: ['responsive'],
|
||||
width: ['responsive'],
|
||||
zIndex: ['responsive'],
|
||||
},
|
||||
|
||||
@ -61,6 +61,7 @@ import userSelect from './plugins/userSelect'
|
||||
import verticalAlign from './plugins/verticalAlign'
|
||||
import visibility from './plugins/visibility'
|
||||
import whitespace from './plugins/whitespace'
|
||||
import wordBreak from './plugins/wordBreak'
|
||||
import width from './plugins/width'
|
||||
import zIndex from './plugins/zIndex'
|
||||
|
||||
@ -131,6 +132,7 @@ export default function({ corePlugins: corePluginConfig }) {
|
||||
verticalAlign,
|
||||
visibility,
|
||||
whitespace,
|
||||
wordBreak,
|
||||
width,
|
||||
zIndex,
|
||||
})
|
||||
|
||||
@ -7,19 +7,6 @@ export default function() {
|
||||
'.whitespace-pre': { 'white-space': 'pre' },
|
||||
'.whitespace-pre-line': { 'white-space': 'pre-line' },
|
||||
'.whitespace-pre-wrap': { 'white-space': 'pre-wrap' },
|
||||
|
||||
'.break-normal': {
|
||||
'overflow-wrap': 'normal',
|
||||
'word-break': 'normal',
|
||||
},
|
||||
'.break-words': { 'overflow-wrap': 'break-word' },
|
||||
'.break-all': { 'word-break': 'break-all' },
|
||||
|
||||
'.truncate': {
|
||||
overflow: 'hidden',
|
||||
'text-overflow': 'ellipsis',
|
||||
'white-space': 'nowrap',
|
||||
},
|
||||
},
|
||||
config('variants.whitespace')
|
||||
)
|
||||
|
||||
21
src/plugins/wordBreak.js
Normal file
21
src/plugins/wordBreak.js
Normal file
@ -0,0 +1,21 @@
|
||||
export default function() {
|
||||
return function({ addUtilities, config }) {
|
||||
addUtilities(
|
||||
{
|
||||
'.break-normal': {
|
||||
'overflow-wrap': 'normal',
|
||||
'word-break': 'normal',
|
||||
},
|
||||
'.break-words': { 'overflow-wrap': 'break-word' },
|
||||
'.break-all': { 'word-break': 'break-all' },
|
||||
|
||||
'.truncate': {
|
||||
overflow: 'hidden',
|
||||
'text-overflow': 'ellipsis',
|
||||
'white-space': 'nowrap',
|
||||
},
|
||||
},
|
||||
config('variants.wordBreak')
|
||||
)
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user