npm.io
0.0.1 • Published 10 years ago

postcss-prefixer-font-face

Licence
MIT
Version
0.0.1
Deps
1
Vulns
3
Weekly
0

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.