UNPKG

vcc-ui

Version:

A React library for building user interfaces at Volvo Cars

12 lines (11 loc) 353 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.sizeToRem = exports.pxToRem = void 0; const REM_TO_PX = 0.0625; const GRID_SIZE = 8; const sizeToRem = size => `${size * GRID_SIZE * REM_TO_PX}rem`; exports.sizeToRem = sizeToRem; const pxToRem = px => `${(px * REM_TO_PX).toFixed(3)}rem`; exports.pxToRem = pxToRem;