Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

README.md 1.6 KiB

3 anni fa
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. # PostCSS Font-Variant [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS Logo" width="90" height="90" align="right">](https://github.com/postcss/postcss/)
  2. [![CSS Status](https://cssdb.org/badge/font-variant-property.svg)](https://cssdb.org/#font-variant-property)
  3. [![Build Status](https://travis-ci.org/postcss/postcss-font-variant.svg)](https://travis-ci.org/postcss/postcss-font-variant)
  4. PostCSS Font-Variant lets you use `font-variant` in CSS, following the
  5. [CSS Fonts](https://www.w3.org/TR/css-fonts-3/#font-variant-prop) specification.
  6. ## Installation
  7. ```console
  8. $ npm install postcss-font-variant
  9. ```
  10. ## Usage
  11. ```js
  12. // dependencies
  13. var postcss = require("postcss")
  14. var fontVariant = require("postcss-font-variant")
  15. // css to be processed
  16. var css = fs.readFileSync("input.css", "utf8")
  17. // process css using postcss-font-variant
  18. var out = postcss()
  19. .use(fontVariant())
  20. .process(css)
  21. .css
  22. ```
  23. Using this `input.css`:
  24. ```css
  25. h2 {
  26. font-variant-caps: small-caps;
  27. }
  28. table {
  29. font-variant-numeric: lining-nums;
  30. }
  31. ```
  32. you will get:
  33. ```css
  34. h2 {
  35. font-feature-settings: "c2sc";
  36. font-variant-caps: small-caps;
  37. }
  38. table {
  39. font-feature-settings: "lnum";
  40. font-variant-numeric: lining-nums;
  41. }
  42. ```
  43. Checkout [tests](test) for more examples.
  44. ---
  45. ## Contributing
  46. Work on a branch, install dev-dependencies, respect coding style & run tests before submitting a bug fix or a feature.
  47. $ git clone https://github.com/postcss/postcss-font-variant.git
  48. $ git checkout -b patch-1
  49. $ npm install
  50. $ npm test
  51. ## [Changelog](CHANGELOG.md)
  52. ## [License](LICENSE)