Fitty
fitty
Makes text fit perfectly.
Fitty, Snugly text resizing: Scales up (or down) text so it fits perfectly to its parent container.
The crux is of fitty is the fit
method which marks the fitty as dirty and requests a redraw (this will also redraw any other fitty marked as dirty).
Get it: npm install fitty
Sample usage:
1 2 3 |
|
Default options:
1 2 3 4 5 6 |
|
Yes, it uses MutationObserver
.
GIF FTW!