mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-24 09:25:15 +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()
|
|
}
|
|
})
|
|
}
|
|
})
|