0.1.2 • Published 7 years ago
@gera2ld/rem v0.1.2
@gera2ld/rem
Adapt to different screens using rem.
Installation
$ yarn add @gera2ld/remUsage
import { scaleWidth } from '@gera2ld/rem';
scaleWidth();
// or
scaleWidth({
mode: 'px',
resize: false,
});Options
mode'vw'Use
vwas root unit if supported.'px'Use
pxas root unit.
By default, if
vwis supported,modeis set to'vw', otherwise'px'.resizeWhether the font size of root should be updated on resize. By default,
resizeis set totrueifvwis not supported, otherwisefalse.