Skip to content
This repository has been archived by the owner on Aug 28, 2020. It is now read-only.

dodrio/base-scale

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

base-scale

Dependency Status DevDependency Status NPM Downloads

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.

Inspiration