PostCSS plugin to replace overflow-wrap with word-wrap. May optionally retain both declarations.
```css / before / .foo { overflow-wrap: break-word; }
/ after / .foo { word-wrap: break-word; } ```
```css / before, when the option { method: 'copy' } is passed / .foo { overflow-wrap: break-word; }
/ after / .foo { word-wrap: break-word; overflow-wrap: break-word; } ```
npm install --save-dev postcss postcss-replace-overflow-wrap
For Postcss 7 or earlier use Version 3 or earlier:
npm install --save-dev postcss-replace-overflow-wrap@3
js
/* default usage, with no options (method = replace) */
postcss([ require('postcss-replace-overflow-wrap') ])
js
/* add word-wrap, but keep overflow-wrap */
postcss([ require('postcss-replace-overflow-wrap') ])({ method: 'copy' })
See PostCSS docs for examples for your environment.