greentown-ui

0.2.1 • Public • Published

gt-ui

未来社区小程序组件库

Rem 适配

使用前请安装vscode 插件 px to rem gt-ui 中的样式默认使用px作为单位,如果需要使用rem单位,推荐使用以下两个工具:

  • postcss-pxtorem 是一款 postcss 插件,用于将单位转化为 rem
  • lib-flexible 用于设置 rem 基准值

PostCSS 配置 下面提供了一份基本的 postcss 配置,可以在项目根目录新建postcss.config.js, 根据项目需求进行修改

module.exports = {
  plugins: {
    autoprefixer: {
      browsers: ['Android >= 4.0', 'iOS >= 8'],
    },
    'postcss-pxtorem': {
      rootValue: 16,
      propList: ['*'],
    },
  },
};

Build Setup

Readme

Keywords

none

Package Sidebar

Install

npm i greentown-ui

Weekly Downloads

2

Version

0.2.1

License

MIT

Unpacked Size

196 kB

Total Files

17

Last publish

Collaborators

  • greentown