How to use the style-unit.setRpx 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');
  }
github alibaba / rax / packages / driver-universal / src / weex.js View on Github external
beforeRender() {
      // Turn off batched updates
      document.open();
      // Init rem unit
      setRpx(1);
    },
    createElement(type, props = {}) {

style-unit

style-unit

BSD-3-Clause
Latest version published 2 years ago

Package Health Score

62 / 100
Full package analysis

Similar packages