Skip to content

Commit ffd45c2

Browse files
authored
refactor($core): use stylus conditional assignment (close #2127) (#2129)
1 parent 8b43598 commit ffd45c2

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1+
@require '~@temp/palette.styl'
2+
13
// colors
2-
$accentColor = #3eaf7c
3-
$textColor = #2c3e50
4-
$borderColor = #eaecef
5-
$codeBgColor = #282c34
6-
$arrowBgColor = #ccc
7-
$badgeTipColor = #42b983
8-
$badgeWarningColor = darken(#ffe564, 35%)
9-
$badgeErrorColor = #DA5961
4+
$accentColor ?= #3eaf7c
5+
$textColor ?= #2c3e50
6+
$borderColor ?= #eaecef
7+
$codeBgColor ?= #282c34
8+
$arrowBgColor ?= #ccc
9+
$badgeTipColor ?= #42b983
10+
$badgeWarningColor ?= darken(#ffe564, 35%)
11+
$badgeErrorColor ?= #DA5961
1012

1113
// layout
12-
$navbarHeight = 3.6rem
13-
$sidebarWidth = 20rem
14-
$contentWidth = 740px
15-
$homePageWidth = 960px
14+
$navbarHeight ?= 3.6rem
15+
$sidebarWidth ?= 20rem
16+
$contentWidth ?= 740px
17+
$homePageWidth ?= 960px
1618

1719
// responsive breakpoints
18-
$MQNarrow = 959px
19-
$MQMobile = 719px
20-
$MQMobileNarrow = 419px
20+
$MQNarrow ?= 959px
21+
$MQMobile ?= 719px
22+
$MQMobileNarrow ?= 419px
2123

2224
// code
23-
$lineNumbersWrapperWidth = 3.5rem
24-
$codeLang = js ts html md vue css sass scss less stylus go java c sh yaml py docker dockerfile makefile
25-
26-
@import '~@temp/palette.styl'
25+
$lineNumbersWrapperWidth ?= 3.5rem
26+
$codeLang ?= js ts html md vue css sass scss less stylus go java c sh yaml py docker dockerfile makefile

0 commit comments

Comments
 (0)