postcss-replace-overflow-wrap

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

MIT 4 个版本
安装
npm install postcss-replace-overflow-wrap
yarn add postcss-replace-overflow-wrap
pnpm add postcss-replace-overflow-wrap
bun add postcss-replace-overflow-wrap
README

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.

版本列表
4.0.0 2020-09-16
3.0.0 2018-08-09
2.0.0 2017-05-29
1.0.0 2016-05-17