2020-10-14 16:54:13 -04:00
|
|
|
import { flagEnabled } from '../featureFlags'
|
|
|
|
|
|
2020-10-16 13:30:06 -04:00
|
|
|
export default function () {
|
|
|
|
|
return function ({ addUtilities, variants, config }) {
|
2020-10-14 15:33:08 -04:00
|
|
|
addUtilities(
|
|
|
|
|
{
|
2020-10-14 16:54:13 -04:00
|
|
|
...(flagEnabled(config(), 'moveTruncateToTextOverflow')
|
|
|
|
|
? {
|
|
|
|
|
'.truncate': {
|
|
|
|
|
overflow: 'hidden',
|
|
|
|
|
'text-overflow': 'ellipsis',
|
|
|
|
|
'white-space': 'nowrap',
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
: {}),
|
2020-10-14 15:33:08 -04:00
|
|
|
'.overflow-ellipsis': { 'text-overflow': 'ellipsis' },
|
|
|
|
|
'.overflow-clip': { 'text-overflow': 'clip' },
|
|
|
|
|
},
|
|
|
|
|
variants('textOverflow')
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
}
|