base-scale
v1.0.0
Published
Scale layout flexibility.
Downloads
4
Readme
base-scale
Scale layout flexibility.
Install
$ npm install base-scale
Usage
Webpack
import { setup, px2rem } from 'base-scale';
// setup
setup(750);
// call px2rem
px2rem(200);
px2rem
must be called after setup.
API
setup(blueprintWidth = 750, gridNumber = 100)
blueprintWidth
: the width of blueprint in pixel.gridNumber
: grid number.
px2rem(pixel)
pixel
: length in pixel.