-
-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy paththeme.styl
More file actions
228 lines (185 loc) · 3.71 KB
/
theme.styl
File metadata and controls
228 lines (185 loc) · 3.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
@require './config'
@require './colors'
@require './nprogress'
@require './code'
@require './custom-blocks'
@require './arrow'
@require './wrapper'
@require './toc'
@require './table'
// Custom vars
$contentSidebarWidth = 12rem
html
scroll-behavior smooth
html, body
padding 0
margin 0
background-color $white
body
font-family -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
-webkit-font-smoothing antialiased
-moz-osx-font-smoothing grayscale
font-size 1rem
line-height 1.5rem
color $textColor
min-height 100vh
text-rendering: optimizeLegibility
.theme-container
display flex
flex-flow row nowrap
min-height 100vh
.page
flex 1 1 auto
min-width 0
.navbar
position fixed
z-index 20
top 0
left 0
right 0
height $navbarHeight
background-color $white
box-sizing border-box
border-bottom 1px solid $borderColor
.suggestions
max-height 400px
overflow-y auto
.sidebar-mask
position fixed
z-index 9
top 0
left 0
width 100vw
height 100vh
display none
.sidebar
font-size 15px
background-color $white
position sticky
top $navbarHeight
height "calc(100vh - %s)" % $navbarHeight
flex 0 0 auto
width $sidebarWidth
box-sizing border-box
border-right 1px solid $borderColor
overflow-y auto
overflow-x hidden
.content-sidebar-wrapper
background-color $white
position sticky
top $navbarHeight
height "calc(100vh - %s)" % $navbarHeight
width $contentSidebarWidth
align-self: flex-start;
flex 0 0 auto
padding 2rem 1rem 2rem 0
box-sizing border-box
.content:not(.custom)
@extend $wrapper
padding-top 6rem
@media (min-width: $MQMobile)
padding-top 7rem
> *:first-child
margin-top 0
a:hover
text-decoration underline
p.demo
padding 1rem 1.5rem
border 1px solid $gray
border-radius 4px
img
max-width 100%
.content.custom
padding 0
margin 0
img
max-width 100%
a
font-weight 500
color $accentColor
text-decoration none
kbd
background $gray-lt
border solid 0.15rem $gray
border-bottom solid 0.25rem $gray
border-radius 0.15rem
padding 0 0.15em
blockquote
font-size .9rem
color $gray-dk
border-left .5rem solid $gray-ltr
margin 0.5rem 0
padding .25rem 0 .25rem 1rem
& > p
margin 0
ul, ol
padding-left 1.2em
strong
font-weight 600
h1, h2, h3, h4, h5, h6
> .header-anchor
font-size 0.85em
float left
margin-left -0.87em
padding-right 0.23em
margin-top 0.125em
opacity 0
&:hover
text-decoration none
&:not(:hover):not(:focus)
opacity: 0
.content:not(.custom) > &
&:hover .header-anchor
opacity: 1
h1, h2, h3, h4, strong
color $black
font-weight 700
h1, h2
letter-spacing -.025rem
h1
font-size 2.625rem
line-height 3.125rem
h2
font-size 2rem
line-height 2.5rem
padding-bottom .3rem
border-bottom 1px solid $borderColor
margin 1.5rem 0
h3
font-size 1.5rem
line-height 2rem
margin-top 1.5rem
h4
font-size 1.25rem
line-height 1.625rem
margin-bottom 0
code, kbd, .line-number
font-family Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace
p, ul, ol
line-height 1.7
hr
border 0
border-top 1px solid $borderColor
caption
padding-top .75rem
padding-bottom .75rem
line-height 1rem
font-size .75rem
color $lightTextColor
text-align left
caption-side bottom
.theme-container
&.sidebar-open,&.content-sidebar-open
.sidebar-mask
display: block
&.no-navbar
.content:not(.custom) > h1, h2, h3, h4, h5, h6
margin-top 1.5rem
padding-top 0
.sidebar
top 0
@media (min-width: ($MQMobile + 1px))
.theme-container.no-sidebar
.sidebar
display none
@require 'mobile.styl'