jxnblk/fitter-happier-text
À propos
Titres performants à mise à l’échelle entièrement fluide
Autres projetsProgression mesurée des étoiles
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- -1
- in 1 month
- -3
Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.
README.md
OriginalFitter Happier Text
Performant, fully fluid headings
Usage
Include dist/fitter-happier-text.js in your project or install from NPM:
npm install fitter-happier-text
(or download it https://github.com/jxnblk/fitter-happier-text/archive/0.0.1.zip)
Pass it a nodelist.
var nodes = document.querySelectorAll('[data-fitter-happier-text]');
fitterHappierText(nodes);
Fitter Happier Text replaces each node with an SVG text node and sets the viewBox attribute based on its width and height.
To adjust for different fonts, use the baseline and paddingY options. paddingY can be set to a negative value to reduce the height of the SVG container.
fitterHappierText(nodes, { baseline: 14, paddingY: 2 });
Browser support:
Please note: I do not plan on adding any SVG polyfills to handle old browsers.
MIT License
Explorer des projets similaires
Chargement…