Font Awesome Stylus
v4.7.1
字體真棒的手寫筆端口
在您的項目中導入字體Awessy並正確配置字體路徑($ fa-font-Path)
bower install font-awesome-stylus
npm install font-awesome-stylus
設置字體路徑
$fa-font-path = "../fonts"
// OR
$fa-font-path = "http://netdna.bootstrapcdn.com/font-awesome/4.7.0/fonts"需要和使用字體知識中間件來創建編譯功能以在其他框架中使用的示例。
var fontAwesome = require ( 'font-awesome-stylus' ) ,
stylus = require ( 'stylus' ) ;
function compile ( str ) {
return stylus ( str )
. use ( fontAwesome ( ) ) ;
}要在您的手寫筆文件中導入整個字體令人陶醉:
@import "font-awesome-stylus"使用Mixin包括圖標
.my-icon
fa(user)
http://fortawesome.github.io/font-awesome