iconfont-sass-style
v0.0.2
Published
Sass generator for iconfont.
Downloads
3
Readme
iconfont-sass-style
Sass generator for gulp-iconfont
Simple Usage
// You can get scss for libsass < 3.2 or ruby-sass < 3.4.
var scss = iconfontSass(iconfontGlyphs, "myFontName", "/path/to/font", {
iconPrefix: ".myIcon-"
})
// And if you want get css, you can compile like this
var nodeSass = require("node-sass")
var css = nodeSass.renderSync({
data: scss
}).css.toString()
API
iconfontSass(glyphs, fontName, fontPath, options)
glyphs
Iconfont codepoint glyphs
fontName
Font name.
fontPath
Font path.
options
Enable below options
iconPrefix
- default
.icon-
- You can set icon css selector prefix.
- Icon selector output like
.icon-foo
- default
fontVariable
- default
font
- You can set font variable name like
$font
- default
useDefaultFlag
- default
true
- Append variable
!defualt
- default
includes
- default:
["map", "mixins", "loader"]
- Output css partials
map
- Map variables
mixins
- Font generator mixins
loader
- Font mixin loader
- default: