Skip to content

Commit

Permalink
feat($config): Allow overriding badges colors (close #1940) (#1941)
Browse files Browse the repository at this point in the history
  • Loading branch information
kefranabg committed Oct 26, 2019
1 parent 0e5519a commit 89a4a8d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
3 changes: 3 additions & 0 deletions packages/@vuepress/core/lib/client/style/config.styl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ $textColor = #2c3e50
$borderColor = #eaecef
$codeBgColor = #282c34
$arrowBgColor = #ccc
$badgeTipColor = #42b983
$badgeWarningColor = darken(#ffe564, 35%)
$badgeErrorColor = #DA5961

// layout
$navbarHeight = 3.6rem
Expand Down
6 changes: 3 additions & 3 deletions packages/@vuepress/theme-default/global-components/Badge.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ export default {
color white
background-color #42b983
&.tip, &.green
background-color #42b983
background-color $badgeTipColor
&.error
background-color #DA5961 //#f66
background-color $badgeErrorColor
&.warning, &.warn, &.yellow
background-color darken(#ffe564, 35%)
background-color $badgeWarningColor
& + &
margin-left 5px
</style>
3 changes: 3 additions & 0 deletions packages/docs/docs/config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ $accentColor = #3eaf7c
$textColor = #2c3e50
$borderColor = #eaecef
$codeBgColor = #282c34
$badgeTipColor = #42b983
$badgeWarningColor = darken(#ffe564, 35%)
$badgeErrorColor = #DA5961
```

::: danger Note
Expand Down
3 changes: 3 additions & 0 deletions packages/docs/docs/zh/config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@ $accentColor = #3eaf7c
$textColor = #2c3e50
$borderColor = #eaecef
$codeBgColor = #282c34
$badgeTipColor = #42b983
$badgeWarningColor = darken(#ffe564, 35%)
$badgeErrorColor = #DA5961
```

::: danger Note
Expand Down

0 comments on commit 89a4a8d

Please sign in to comment.