You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to override the default variables mentioned above, `override.styl` will be imported at the end of the `config.styl` in default theme, and this file will be used by multiple files, so once you wrote styles here, your style will be duplicated by multiple times. See [#637](https://github.com/vuejs/vuepress/issues/637).
425
-
426
-
In fact, `style constants override` and `styles override` are two things, the former should be executed before any CSS is compiled, while the latter should be generated at the end of the CSS bundle, which has the highest priority.
424
+
In order to override the default variables mentioned above, `override.styl` will be imported at the end of the `config.styl` in default theme, and this file will be used by multiple files, so once you wrote styles here, your style would be duplicated by multiple times. See [#637](https://github.com/vuejs/vuepress/issues/637).
427
425
428
426
### Migrate your styles to `style.styl` <Badgetext="0.12.0+"/>
429
427
430
-
Start from `0.12.0`, we split `override.styl` into two APIs: `override.styl`and `style.styl`:
428
+
In fact, The `stylus constants override` should be completed before all Stylus files are compiled; and the `user's additional CSS styles` should be generated at the end of the final style file. Therefore, these two duties should not be completed by the same stylus file.
431
429
432
-
If you wrote styles at `override.styl` in the past, e.g.
430
+
Start from `0.12.0`, we split `override.styl` into two APIs: `override.styl` and `style.styl`. If you wrote styles at `override.styl` in the past, e.g.
433
431
434
432
```stylus
435
433
// override.styl
436
-
$textColor = red // style constants override
434
+
$textColor = red // stylus constants override
437
435
438
-
#my-style {} // styles override or custom styles.
436
+
#my-style {} // your extra styles.
439
437
```
440
438
441
439
You'll need to separate the style part to `style.styl`:
442
440
443
441
```stylus
444
-
// override.styl
445
-
// SHOULD ONLY focus on style constants override.
442
+
// override.styl, SHOULD ONLY contain "stylus constants override".
446
443
$textColor = red
447
444
```
448
445
449
446
```stylus
450
-
// style.styl
451
-
// SHOULD focus on styles override or your custom styles.
0 commit comments