0.0.4 • Published 9 years ago

scrollfit v0.0.4

Weekly downloads
5
License
MIT
Repository
github
Last release
9 years ago

scrollfit.js

Tiny vanilla js module that fits text inside an HTML Element according to its scrollWidth/scrollHeight compared to its clientWidth/clientHeight.

Installation

npm install scrollfit --save

Usage

Scrollfit = require('scrollfit')

new Scrollfit(document.querySelector('.scrollfit'))

// or use integrated hook lookup:
<div data-hook="scrollfit"> Some text that shoud be fitted</div>

Contributing

Yes, please. See github issues to get started. Needs more documentation and stuff. (As always)

Thanks

Highly inspired by the following awesome projects:

An opensource module brought to you with love from optune.me