PromoCursed/node_modules/postcss-replace-overflow-wrap/index.js

20 lines
459 B
JavaScript
Raw Normal View History

2024-08-20 23:25:37 +04:00
// @ts-check
module.exports = function (opts) {
opts = opts || {}
var method = opts.method || 'replace'
return {
postcssPlugin: 'postcss-replace-overflow-wrap',
Declaration: {
'overflow-wrap': decl => {
decl.cloneBefore({ prop: 'word-wrap' })
if (method === 'replace') {
decl.remove()
}
}
}
}
}
module.exports.postcss = true