25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

16 lines
381 B

  1. var postcss = require('postcss')
  2. module.exports = postcss.plugin('postcss-replace-overflow-wrap', function (opts) {
  3. opts = opts || {}
  4. var method = opts.method || 'replace'
  5. return function (css) {
  6. css.walkDecls('overflow-wrap', function (decl) {
  7. decl.cloneBefore({ prop: 'word-wrap' })
  8. if (method === 'replace') {
  9. decl.remove()
  10. }
  11. })
  12. }
  13. })