How to use the style-unit.setDecimalPixelTransformer function in style-unit

To help you get started, we’ve selected a few style-unit examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github alibaba / rax / packages / driver-worker / src / Driver.js View on Github external
beforeRender() {
    // Init rem unit
    const rpxRadio = this.getDeviceWidth() / this.getViewportWidth();
    setRpx(rpxRadio);
    setDecimalPixelTransformer((rpx) => Math.floor(parseFloat(rpx) * rpxRadio) + 'px');
  }

style-unit

style-unit

BSD-3-Clause
Latest version published 2 years ago

Package Health Score

59 / 100
Full package analysis