mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-22 16:35:14 +00:00
16 lines
381 B
JavaScript
16 lines
381 B
JavaScript
|
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()
|
||
|
}
|
||
|
})
|
||
|
}
|
||
|
})
|