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.
 
 
 

15 lines
381 B

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()
}
})
}
})