rem2px

1.0.1 • Public • Published

rem2px

how to use

    // 1. install
    // npm install rem2px
    // 2. import and run rem2px
    const const rem2px = require('rem2px').rem2px;
    let text = `input[type="checkbox"] {
        position: relative;
        width: 0.75rem;
        height: 0.75rem;
        background-color: #f5f5f5;
        border: 0.05rem solid #ccc;
        -webkit-border-radius: 50%;
        border-radius: 50%;
        vertical-align: middle;
    }`
    rem2px(text, { baseFontsize: 23, baseWidth: 375, targetWidth: 750 });
    // return the following text
    `input[type="checkbox"] {
        position: relative;
        width: 34.5px;
        height: 34.5px;
        background-color: #f5f5f5;
        border: 2.3px solid #ccc;
        -webkit-border-radius: 50%;
        border-radius: 50%;
        vertical-align: middle;
    }`

Readme

Keywords

none

Package Sidebar

Install

npm i rem2px

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

168 kB

Total Files

14

Last publish

Collaborators

  • jazzg62