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.

48 lines
1.2 KiB

  1. # PostCSS Replace Overflow Wrap [![CSS Standard Status][css-img]][css] [![Build Status][ci-img]][ci]
  2. [PostCSS] plugin to replace overflow-wrap with word-wrap. May optionally retain both declarations.
  3. [PostCSS]: https://github.com/postcss/postcss
  4. [css-img]: https://jonathantneal.github.io/css-db/badge/css-text-overflow-wrap-property.svg
  5. [css]: https://jonathantneal.github.io/css-db/#css-text-overflow-wrap-property
  6. [ci-img]: https://travis-ci.org/MattDiMu/postcss-replace-overflow-wrap.svg
  7. [ci]: https://travis-ci.org/MattDiMu/postcss-replace-overflow-wrap
  8. ```css
  9. /* before */
  10. .foo {
  11. overflow-wrap: break-word;
  12. }
  13. /* after */
  14. .foo {
  15. word-wrap: break-word;
  16. }
  17. ```
  18. ```css
  19. /* before, when the option { method: 'copy' } is passed */
  20. .foo {
  21. overflow-wrap: break-word;
  22. }
  23. /* after */
  24. .foo {
  25. word-wrap: break-word;
  26. overflow-wrap: break-word;
  27. }
  28. ```
  29. ## Usage
  30. ```js
  31. /* default usage, with no options (method = replace) */
  32. postcss([ require('postcss-replace-overflow-wrap') ])
  33. ```
  34. ```js
  35. /* add word-wrap, but keep overflow-wrap */
  36. postcss([ require('postcss-replace-overflow-wrap') ])({ method: 'copy' })
  37. ```
  38. See [PostCSS] docs for examples for your environment.