Last change
on this file since e29cc2e was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
381 bytes
|
Line | |
---|
1 | var postcss = require('postcss')
|
---|
2 |
|
---|
3 | module.exports = postcss.plugin('postcss-replace-overflow-wrap', function (opts) {
|
---|
4 | opts = opts || {}
|
---|
5 | var method = opts.method || 'replace'
|
---|
6 |
|
---|
7 | return function (css) {
|
---|
8 | css.walkDecls('overflow-wrap', function (decl) {
|
---|
9 | decl.cloneBefore({ prop: 'word-wrap' })
|
---|
10 | if (method === 'replace') {
|
---|
11 | decl.remove()
|
---|
12 | }
|
---|
13 | })
|
---|
14 | }
|
---|
15 | })
|
---|
Note:
See
TracBrowser
for help on using the repository browser.