/Font-Awesome-Stylus

Stylus port for font-awesome 4.6.2

Primary LanguageCSSGNU General Public License v2.0GPL-2.0

Font Awesome Stylus

Stylus Port for Font Awesome

Installation

Import index.styl in your project and configure fonts path correctly ($fa-font-path)

Usage

// Set font path
$fa-font-path = "../fonts"
// OR
$fa-font-path = "http://netdna.bootstrapcdn.com/font-awesome/4.6.2/fonts"

// Import component
@import "../bower_components/Font-Awesome-Stylus/stylus/index"

// Include icon using mixin
.my-icon
  fa(user)

Webpack

// add as entry
    "font-awesome": Array.from(glob.sync("./node_modules/font-awesome-stylus/fonts/*\*/*", {nodir: true}), file => '.' + file),

// add loader
      {
        test: /\.(otf|ttf|eot|svg|woff(2)?)/,
        loader: "file?name=fonts/[name].[ext]",
      },

// add to stylus
  stylus: {
    use: [
//      ...    
      require("font-awesome-stylus")(),
    ],
  },

Bower support

bower install font-awesome-stylus

NPM support

npm install font-awesome-stylus

Original source

http://fortawesome.github.io/Font-Awesome