1 | # postcss-page-break [![Build Status][ci-img]][ci]
|
---|
2 |
|
---|
3 | [PostCSS] plugin to fallback `break-` properties with `page-break-` alias.
|
---|
4 |
|
---|
5 | [PostCSS]: https://github.com/postcss/postcss
|
---|
6 | [ci-img]: https://travis-ci.org/shrpne/postcss-page-break.svg
|
---|
7 | [ci]: https://travis-ci.org/shrpne/postcss-page-break
|
---|
8 |
|
---|
9 | ```css
|
---|
10 | /* before */
|
---|
11 | .foo {
|
---|
12 | break-inside: avoid;
|
---|
13 | break-after: page;
|
---|
14 | }
|
---|
15 |
|
---|
16 | /* after */
|
---|
17 | .foo {
|
---|
18 | page-break-inside: avoid;
|
---|
19 | break-inside: avoid;
|
---|
20 | page-break-after: always;
|
---|
21 | break-after: page;
|
---|
22 | }
|
---|
23 | ```
|
---|
24 |
|
---|
25 | Available fallbacks:
|
---|
26 | ```
|
---|
27 | break-inside: auto => page-break-inside: auto
|
---|
28 | break-inside: avoid => page-break-inside: avoid
|
---|
29 | break-inside: avoid-page => page-break-inside: avoid
|
---|
30 | break-inside: inherit => page-break-inside: inherit
|
---|
31 | break-inside: initial => page-break-inside: initial
|
---|
32 | break-inside: unset => page-break-inside: unset
|
---|
33 |
|
---|
34 | break-before: auto => page-break-before: auto;
|
---|
35 | break-before: avoid => page-break-before: avoid;
|
---|
36 | break-before: avoid-page => page-break-before: avoid;
|
---|
37 | break-before: page => page-break-before: always;
|
---|
38 | break-before: always => page-break-before: always;
|
---|
39 | break-before: left => page-break-before: left;
|
---|
40 | break-before: right => page-break-before: right;
|
---|
41 | break-before: recto => page-break-before: recto;
|
---|
42 | break-before: verso => page-break-before: verso;
|
---|
43 | break-before: inherit => page-break-before: inherit;
|
---|
44 | break-before: initial => page-break-before: initial;
|
---|
45 | break-before: unset => page-break-before: unset;
|
---|
46 |
|
---|
47 | break-after: auto => page-break-after: auto;
|
---|
48 | break-after: avoid => page-break-after: avoid;
|
---|
49 | break-after: avoid-page => page-break-after: avoid;
|
---|
50 | break-after: page => page-break-after: always;
|
---|
51 | break-after: always => page-break-after: always;
|
---|
52 | break-after: left => page-break-after: left;
|
---|
53 | break-after: right => page-break-after: right;
|
---|
54 | break-after: recto => page-break-after: recto;
|
---|
55 | break-after: verso => page-break-after: verso;
|
---|
56 | break-after: inherit => page-break-after: inherit;
|
---|
57 | break-after: initial => page-break-after: initial;
|
---|
58 | break-after: unset => page-break-after: unset;
|
---|
59 | ```
|
---|
60 |
|
---|
61 |
|
---|
62 | ## Usage
|
---|
63 |
|
---|
64 | ```js
|
---|
65 | postcss([ require('postcss-page-break') ])
|
---|
66 | ```
|
---|
67 |
|
---|
68 | See [PostCSS] docs for examples for your environment (webpack, gulp, grunt).
|
---|