How to use the style-unit.setRem 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-weex / src / index.js View on Github external
beforeRender() {
    // Turn off batched updates
    document.open();

    // Init rem unit
    setRem( this.getDeviceWidth() / this.getViewportWidth() );
  },
github alibaba / rax / packages / driver-worker / src / index.js View on Github external
beforeRender() {
      // Init rem unit
      setRem(this.getDeviceWidth() / this.getViewportWidth());
    },
github alibaba / rax / packages / rax / src / server / __tests__ / styleToCSS.js View on Github external
it('convert rem unit style to css', () => {
    setRem(1);

    let css = styleToCSS({
      width: '750rem'
    });

    expect(css).toBe('width:750rem;');

    let css2 = styleToCSS({
      width: 750
    });
    expect(css2).toBe('width:750rem;');

    let css3 = styleToCSS({
      width: '750px'
    });
    expect(css3).toBe('width:750px;');

style-unit

style-unit

BSD-3-Clause
Latest version published 2 years ago

Package Health Score

62 / 100
Full package analysis

Similar packages