|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
1.4 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 | ### Installation
|
|---|
| 38 | `npm install --save-dev postcss postcss-replace-overflow-wrap`
|
|---|
| 39 |
|
|---|
| 40 | For Postcss 7 or earlier use Version 3 or earlier:
|
|---|
| 41 |
|
|---|
| 42 | `npm install --save-dev postcss-replace-overflow-wrap@3`
|
|---|
| 43 |
|
|---|
| 44 |
|
|---|
| 45 | ## Usage
|
|---|
| 46 |
|
|---|
| 47 | ```js
|
|---|
| 48 | /* default usage, with no options (method = replace) */
|
|---|
| 49 | postcss([ require('postcss-replace-overflow-wrap') ])
|
|---|
| 50 | ```
|
|---|
| 51 |
|
|---|
| 52 | ```js
|
|---|
| 53 | /* add word-wrap, but keep overflow-wrap */
|
|---|
| 54 | postcss([ require('postcss-replace-overflow-wrap') ])({ method: 'copy' })
|
|---|
| 55 | ```
|
|---|
| 56 | See [PostCSS] docs for examples for your environment.
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.