0.0.1 • Published 2 years ago

unocss-preset-rem-to-rpx v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

unocss-preset-rem-to-rpx

NPM version

Coverts rem to rpx for uniapp.

Installation

npm i unocss-preset-rem-to-rpx unocss --save-dev # with npm
yarn add unocss-preset-rem-to-rpx unocss -D # with yarn
pnpm add unocss-preset-rem-to-rpx unocss -D # with pnpm
import presetUno from '@unocss/preset-uno'
import presetRemToRpx from 'unocss-preset-rem-to-rpx'

UnoCSS({
  presets: [
    presetUno(),
    presetRemToRpx()
  ],
})

Usage

<div class="m-2"></div>

without

.m-2 {
  margin: 0.5rem;
}

with

.m-2 {
  margin: 16rpx;
}

License

MIT License © 2022 Neil Lee