katoikia-app/web-ui/web-react/node_modules/postcss-replace-overflow-wrap/index.js

16 lines
381 B
JavaScript
Raw Normal View History

2022-07-06 04:15:11 +00:00
var postcss = require('postcss')
module.exports = postcss.plugin('postcss-replace-overflow-wrap', function (opts) {
opts = opts || {}
var method = opts.method || 'replace'
return function (css) {
css.walkDecls('overflow-wrap', function (decl) {
decl.cloneBefore({ prop: 'word-wrap' })
if (method === 'replace') {
decl.remove()
}
})
}
})