fluidfont

0.4.1 • Public • Published

fluidfont

Build Status Coverage Status GitHub version License

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> 

View on RequireBin

view on requirebin

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

MIT

© sugarshin

Readme

Keywords

none

Package Sidebar

Install

npm i fluidfont

Weekly Downloads

1

Version

0.4.1

License

MIT

Last publish

Collaborators

  • sugarshin