Last change
on this file since 76712b2 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | # PostCSS Replace Overflow Wrap [![CSS Standard Status][css-img]][css] [![Build Status][ci-img]][ci]
|
---|
2 |
|
---|
3 | [PostCSS] plugin to replace overflow-wrap with word-wrap. May optionally retain both declarations.
|
---|
4 |
|
---|
5 | [PostCSS]: https://github.com/postcss/postcss
|
---|
6 | [css-img]: https://jonathantneal.github.io/css-db/badge/css-text-overflow-wrap-property.svg
|
---|
7 | [css]: https://jonathantneal.github.io/css-db/#css-text-overflow-wrap-property
|
---|
8 | [ci-img]: https://travis-ci.org/MattDiMu/postcss-replace-overflow-wrap.svg
|
---|
9 | [ci]: https://travis-ci.org/MattDiMu/postcss-replace-overflow-wrap
|
---|
10 |
|
---|
11 |
|
---|
12 | ```css
|
---|
13 | /* before */
|
---|
14 | .foo {
|
---|
15 | overflow-wrap: break-word;
|
---|
16 | }
|
---|
17 |
|
---|
18 | /* after */
|
---|
19 | .foo {
|
---|
20 | word-wrap: break-word;
|
---|
21 | }
|
---|
22 | ```
|
---|
23 |
|
---|
24 | ```css
|
---|
25 | /* before, when the option { method: 'copy' } is passed */
|
---|
26 | .foo {
|
---|
27 | overflow-wrap: break-word;
|
---|
28 | }
|
---|
29 |
|
---|
30 | /* after */
|
---|
31 | .foo {
|
---|
32 | word-wrap: break-word;
|
---|
33 | overflow-wrap: break-word;
|
---|
34 | }
|
---|
35 | ```
|
---|
36 |
|
---|
37 | ## Usage
|
---|
38 |
|
---|
39 | ```js
|
---|
40 | /* default usage, with no options (method = replace) */
|
---|
41 | postcss([ require('postcss-replace-overflow-wrap') ])
|
---|
42 | ```
|
---|
43 |
|
---|
44 | ```js
|
---|
45 | /* add word-wrap, but keep overflow-wrap */
|
---|
46 | postcss([ require('postcss-replace-overflow-wrap') ])({ method: 'copy' })
|
---|
47 | ```
|
---|
48 | See [PostCSS] docs for examples for your environment.
|
---|
Note:
See
TracBrowser
for help on using the repository browser.