Skip to content

Commit

Permalink
[Doc] add rem guide (youzan#928)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan authored Apr 24, 2018
1 parent effc959 commit 734e885
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/markdown/en-US/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,9 @@ Vue.use(Vant);
```shell
vue init youzan/vue-cli-template-vant projectName
```

### rem units
Vant use `px` as size units by default,you can use tools such as `postcss-pxtorem` to transform units to `rem`.

- [postcss-pxtorem](https://github.com/cuth/postcss-pxtorem)
- [lib-flexible](https://github.com/amfe/lib-flexible)
6 changes: 6 additions & 0 deletions docs/markdown/zh-CN/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,9 @@ Vue.use(Vant);
```shell
vue init youzan/vue-cli-template-vant projectName
```

### rem 适配
Vant 中的组件样式默认使用`px`作为单位,如果需要使用`rem`作为单位,推荐使用以下两个工具

- [postcss-pxtorem](https://github.com/cuth/postcss-pxtorem) 用于将单位转化为 rem
- [lib-flexible](https://github.com/amfe/lib-flexible) 用于设置 rem 基准值

0 comments on commit 734e885

Please sign in to comment.