[breaking change] rebuild style struct (#2021)

This commit is contained in:
neverland
2018-11-03 21:08:06 +08:00
committed by GitHub
parent a5576762d8
commit 11ce2a602f
165 changed files with 1371 additions and 4729 deletions
+6 -6
View File
@@ -7,14 +7,14 @@ You can import the postcss source code in your own project, then use [postcss-th
```javascript
// import base style
import 'vant/packages/vant-css/src/base.css';
import 'vant/packages/style/base.css';
// import component style
import 'vant/packages/vant-css/src/button.css';
import 'vant/packages/vant-css/src/checkbox.css';
import 'vant/packages/button/index.css';
import 'vant/packages/checkbox/index.css';
```
Then require the plugin in the postcss.config.js, and configure the variables according to project needs, you can view all the available variables in [profile](https://github.com/youzan/vant/blob/dev/packages/vant-css/src/common/var.css).
Then require the plugin in the postcss.config.js, and configure the variables according to project needs, you can view all the available variables in [profile](https://github.com/youzan/vant/blob/dev/packages/style/var.less).
```javascript
module.exports = {
@@ -45,10 +45,10 @@ Vant also support local build to custom themes.
```bash
# Clone the repository
git clone git@github.com:youzan/vant.git
cd packages/vant-css
cd packages/style
```
In the local vant-css repository, modify the variables in src/common/var.css, then execute the following build command to generate the style file.
In the local style repository, modify the variables in src/var.less, then execute the following build command to generate the style file.
```bash
npm run build
```