0.1.2 • Published 7 years ago

@gera2ld/rem v0.1.2

Weekly downloads
3
License
ISC
Repository
github
Last release
7 years ago

@gera2ld/rem

NPM License Downloads

Adapt to different screens using rem.

Installation

$ yarn add @gera2ld/rem

Usage

import { scaleWidth } from '@gera2ld/rem';

scaleWidth();
// or
scaleWidth({
  mode: 'px',
  resize: false,
});

Options

  • mode

    • 'vw'

      Use vw as root unit if supported.

    • 'px'

      Use px as root unit.

    By default, if vw is supported, mode is set to 'vw', otherwise 'px'.

  • resize

    Whether the font size of root should be updated on resize. By default, resize is set to true if vw is not supported, otherwise false.

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago