0.4.1 • Published 9 years ago
fluidfont v0.4.1
fluidfont
FluidFont
small library for responsive font
npm i fluidfont
Usage
FluidFont = require 'fluidfont'
new FluidFont opts
or
<script src="fluidfont.js"></script>
<script>
new FluidFont(opts);
</script>
Config
default options
var options = {
target: document.body, // DOM Element
baseWidth: 640, // Integer
baseSize: '1em', // String, CSS font-size value
delay: 300, // Integer
delayType: 'debounce', // String, 'debounce' or 'throttle'
afterResize: function() {}, // Function
beforeResize: function() {} // Function
};
api
ff.resize(width)
Resize font
ff.off()
Unbind from resize event of window
Alias: ff.unbind()
, ff.rmEvent()
ff.on()
Re add resize event of window
Alias: ff.events()
, ff.addEvent()
Contributing
deps
- bean
- debounce
- throttleit
dev deps
- browserify
- coffee-script
- coffeeify
- derequire
- espower-coffee
- jsdom
- mocha
- power-assert
- uglify-js
npm test
Incomplete is test
License
© sugarshin