0.0.1 • Published 8 years ago

postcss-prefixer-font-face v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
8 years ago

PostCSS Prefixer font-face

PostCSS plugin to prefix font-faces.

/* Input example */

@font-face {
  font-family: MyWebFont;
}

div {
  width: 100px;
  background: red;
  position: relative;
  font-family: Arial;
}

a {
  color: green;
  position: relative;
  font-family: MyWebFont;
}
/* Output example */

@font-face {
    font-family: myWebsite-MyWebFont;
}

div {
    width: 100px;
    background: red;
    position: relative;
    font-family: Arial;
}

a {
    color: green;
    position: relative;
    font-family: myWebsite-MyWebFont;
}

Usage

var prefix = require('postcss-prefixer-font-face');
postcss([ prefix({prefix: 'myWebsite-'}) ])

See PostCSS docs for examples for your environment.