unocss-preset-rem-to-rpx
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i unocss-preset-rem-to-rpx

Weekly Downloads

0

Version

0.0.1

License

MIT

Unpacked Size

5 kB

Total Files

6

Last publish

Collaborators

  • zguolee