You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
381 B
16 lines
381 B
4 years ago
|
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()
|
||
|
}
|
||
|
})
|
||
|
}
|
||
|
})
|