Vuepress: can't override css styling

Created on 19 Jul 2019  路  2Comments  路  Source: vuejs/vuepress

I'm trying to migrate from VuePress 0.14.11 to 1.0.2.

I used to override the default theme using an override.styl file with some new colors:

// showing default values
$accentColor = #ff6600
$textColor = #2c3e50
$borderColor = #ff6600
$codeBgColor = #282c34

When I switch to VuePress 1.0.2, my overriding style is not applied at all (and do not seem to be in the published css). I also have a warning at build time:

tip override.styl has been deprecated from v1.0.0, using .vuepress/styles/palette.styl instead.

If I rename the file override.styl to palette.styl, I don't have the warning any more but the overriding style is still not applied.

By the way, the new palette.styl is not yet in the documentation.

My question is then simple: how can we override the styling of the default theme with VuePres 1.x.x?

Most helpful comment

As you mentioned:

override.styl has been deprecated from v1.0.0, using .vuepress/styles/palette.styl instead.

Besides of renaming, you also need to put this file under styles directory.

All 2 comments

As you mentioned:

override.styl has been deprecated from v1.0.0, using .vuepress/styles/palette.styl instead.

Besides of renaming, you also need to put this file under styles directory.

Thanks a lot @ulivz! You had the right answer.

This information should definetly be in the documentation.

Was this page helpful?
0 / 5 - 0 ratings