::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
WARNING: This project experienced a major update and has been moved to meUseRem. Please install using meUseRem instead.
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
meFontSize is a small utility script to to track font-resize and convert measurement units.
Currently it supports conversion between rem
and px
.
Additionally a resize
event is triggered when the user resizes the font-size of the browser.
Include me-font-size.min.js
included in the dist
folder in your HTML page.
You can find the original JavaScript file in the src
folder of this package.
meFontSize has AMD support. This allows it to be lazy-loaded with an AMD loader, such as RequireJS.
Convert px to rem:
meFontSize.px2rem(PX-VALUE);
Convert rem to px:
meFontSize.rem2px(REM-VALUE);
Remove the utility
meFontSize.destroy();
Re-initialize the utility
meFontSize.init();
You can install meFontSize using npm or Bower.
$ npm install me-font-size
or
$ bower install me-font-size
meFontSize is licenses under the MIT licence.