flowtype

keep font-size in proportion with its containers size

npm install flowtype
3 downloads in the last week
5 downloads in the last month

flowtype

keep font-size in proportion with its containers size

Installation

With component, packin or npm

$ {package mananger} install jkroso/flowtype

then in your app:

var flowtype = require('flowtype')

API

flowtype(el:Element, [options]:Object)

set flowtype up on el taking an optional options object. Possible settings are:

  • min: desired font size in pixels when at el's min-width
  • max: desired font size in pixels when at el's max-width
  • minWidth: overrides el's real min-width
  • maxWidth: overrides el's real max-width
  • lineRatio: size of line-height relative to the font-size. defaults to 1.45

Running the example

Just run make and navigate to it.

Thanks

This is based on flowtype.js by simple focus.

npm loves you