web 3d图形渲染器
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
2.3 KiB

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