This repository has been archived on 2020-11-02. You can view files and clone it, but cannot push or open issues or pull requests.
TripSit_Suite/node_modules/postcss-replace-overflow-wrap/index.js
2020-11-01 22:46:04 +00:00

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