This repository has been archived on 2026-03-06. You can view files and clone it, but cannot push or open issues or pull requests.
todo/client/node_modules/postcss-replace-overflow-wrap
2025-06-13 14:04:40 +08:00
..
CHANGELOG.md Initial commit 2025-06-13 14:04:40 +08:00
index.js Initial commit 2025-06-13 14:04:40 +08:00
LICENSE Initial commit 2025-06-13 14:04:40 +08:00
package.json Initial commit 2025-06-13 14:04:40 +08:00
README.md Initial commit 2025-06-13 14:04:40 +08:00

PostCSS Replace Overflow Wrap CSS Standard Status Build Status

PostCSS plugin to replace overflow-wrap with word-wrap. May optionally retain both declarations.

/* before */
.foo {
    overflow-wrap: break-word;
}

/* after */
.foo {
    word-wrap: break-word;
}
/* before, when the option { method: 'copy' } is passed */
.foo {
    overflow-wrap: break-word;
}

/* after */
.foo {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

Installation

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

Usage

/* default usage, with no options (method = replace) */
postcss([ require('postcss-replace-overflow-wrap') ])
/* add word-wrap, but keep overflow-wrap */
postcss([ require('postcss-replace-overflow-wrap') ])({ method: 'copy' })

See PostCSS docs for examples for your environment.