Debian Codegraph @

src/sass/_theme_layout.sass

raw
1 // Set uniform (but not relative) base font size
2 html
3 font-size: $base-font-size
4
5 .wy-affix
6 position: fixed
7 top: $gutter
8
9 .wy-menu
10 a:hover
11 text-decoration: none
12
13 .wy-menu-horiz
14 +clearfix
15 ul, li
16 display: inline-block
17 li:hover
18 background: rgba(255, 255, 255, 0.1)
19 li
20 &.divide-left
21 border-left: solid 1px hsl(0, 0%, 25%)
22 &.divide-right
23 border-right: solid 1px hsl(0, 0%, 25%)
24 a
25 height: $base-font-size * 2
26 display: inline-block
27 line-height: $base-font-size * 2
28 padding: 0 $base-font-size
29
30 .wy-menu-vertical
31 width: $nav-desktop-width
32
33 header, p.caption
34 color: $nav-caption
35 height: $base-font-size * 2
36 line-height: $base-font-size * 2
37 padding: 0 $gutter
38 margin: ($base-line-height / 2) 0 0 0
39 display: block
40 font-weight: bold
41 text-transform: uppercase
42 font-size: 85%
43 white-space: nowrap
44
45 ul
46 margin-bottom: 0
47 li
48 &.divide-top
49 border-top: solid 1px hsl(0, 0%, 25%)
50 &.divide-bottom
51 border-bottom: solid 1px hsl(0, 0%, 25%)
52 &.current
53 background: darken($menu-vertical-background-color, 10%)
54 a
55 color: $menu-link-medium
56 border-right: solid 1px darken($menu-vertical-background-color, 20%)
57 padding: ($gutter / 4) ($gutter * 1.5)
58 &:hover
59 background: darken($menu-vertical-background-color, 15%)
60 code
61 border: none
62 background: inherit
63 color: inherit
64 padding-left: 0
65 padding-right: 0
66 // Expand links
67 button.toctree-expand
68 display: block
69 float: left
70 margin-left: -1.2em
71 @extend .fa
72 @extend .fa-plus-square-o
73 line-height: 18px
74 color: darken($menu-link-medium, 20%)
75 border: none
76 background: none
77 padding: 0
78
79 // On state for the first level
80 li.on a, li.current > a
81 color: $menu-link-color
82 padding: ($gutter / 4) $gutter
83 font-weight: bold
84 position: relative
85 background: $menu-vertical-background-color
86 border: none
87 padding-left: $gutter -4px
88 &:hover
89 background: $menu-vertical-background-color
90 button.toctree-expand
91 color: $menu-link-medium
92 button.toctree-expand
93 @extend .fa
94 @extend .fa-minus-square-o
95 display: block
96 line-height: 18px
97 color: darken($menu-link-medium, 30%)
98
99 li.toctree-l1.current > a
100 border-bottom: solid 1px darken($menu-vertical-background-color, 20%)
101 border-top: solid 1px darken($menu-vertical-background-color, 20%)
102
103 // This is the on state for pages beyond second level
104
105 %hide_show_toctree_ul
106 > ul
107 display: none
108 &.current > ul
109 display: block
110
111 %shrink_toctree_element
112 font-size: 0.9em
113
114 %toctree_link_color
115 color: $menu-link-color
116
117 %toctree_hover_link_color
118 color: $menu-link-medium
119
120 %display_current_toctree_element
121 display: block
122
123 @for $toc_level from 1 through 10
124 .toctree-l#{$toc_level}.current .toctree-l#{$toc_level + 1}
125 @extend %hide_show_toctree_ul
126
127 @if $toc_level > 1
128 li.toctree-l#{$toc_level}
129 a
130 @extend %toctree_link_color
131 &.current
132 > a
133 padding: ($gutter / 4) ($gutter * ($toc_level - 1 + 0.5))
134
135 li.toctree-l#{$toc_level + 1} > a
136 @extend %display_current_toctree_element
137 padding: ($gutter / 4) ($gutter * ($toc_level + 0.5))
138 padding-right: $gutter
139 a:hover button.toctree-expand
140 @extend %toctree_hover_link_color
141 @if $toc_level > 2 and $toc_level < 5
142 li.toctree-l#{$toc_level}
143 @extend %shrink_toctree_element
144
145 li.toctree-l2
146 &.current
147 > a
148 background: darken($menu-vertical-background-color, 20%)
149 li.toctree-l3 > a
150 background: darken($menu-vertical-background-color, 20%)
151 button.toctree-expand
152 color: darken($menu-vertical-background-color, 35%)
153 li.toctree-l3
154 &.current
155 > a
156 background: darken($menu-vertical-background-color, 25%)
157 li.toctree-l4 > a
158 background: darken($menu-vertical-background-color, 25%)
159 button.toctree-expand
160 color: darken($menu-vertical-background-color, 40%)
161
162 li.current ul
163 display: block
164 li ul
165 margin-bottom: 0
166 display: none
167 li ul li a
168 margin-bottom: 0
169 color: $menu-link-light
170 font-weight: normal
171 a
172 line-height: 18px
173 padding: ($gutter / 4) $gutter
174 display: block
175 position: relative
176 font-size: 90%
177 color: $menu-link-light
178 &:hover
179 background-color: lighten($menu-background-color, 10%)
180 cursor: pointer
181 button.toctree-expand
182 color: $menu-link-light
183 &:active
184 background-color: $menu-logo-color
185 cursor: pointer
186 color: $menu-link-active
187 button.toctree-expand
188 color: $menu-link-active
189
190 .wy-side-nav-search
191 display: block
192 width: $nav-desktop-width
193 padding: $gutter / 2
194 margin-bottom: $gutter / 2
195 z-index: $z-index-popover
196 background-color: $nav-search-background-color
197 text-align: center
198 color: $nav-search-color
199 input[type=text]
200 width: 100%
201 border-radius: 50px
202 padding: 6px 12px
203 border-color: darken($link-color, 5%)
204 img
205 display: block
206 margin: auto auto ($gutter / 2) auto
207 height: 45px
208 width: 45px
209 background-color: $menu-logo-color
210 padding: 5px
211 border-radius: 100%
212 > a, .wy-dropdown > a
213 color: $nav-search-color
214 font-size: 100%
215 font-weight: bold
216 display: inline-block
217 padding: ($base-line-height / 6) ($base-line-height / 4)
218 margin-bottom: $gutter / 2
219 max-width: 100%
220 &:hover, &active, &focus
221 background: rgba(255, 255, 255, 0.1)
222 img.logo
223 display: block // display on its own line all the time
224 margin: 0 auto
225 height: auto // undo badge styling above
226 width: auto
227 border-radius: 0
228 max-width: 100% // shrink on mobile, if appropriate
229 background: rgba(0, 0, 0, 0) // make hover background of parent show up properly
230 &.icon
231 display: block
232 img.logo
233 margin-top: 0.85em // space it away from the title text
234 > div.switch-menus
235 position: relative
236 display: block
237 margin-top: -1 * $gutter / 4
238 margin-bottom: $gutter / 2
239 font-weight: normal
240 color: rgba(255, 255,255, 0.3)
241 > div.version-switch, > div.language-switch
242 display: inline-block
243 padding: .2em
244 select
245 // Provide room for dropdown icon
246 display: inline-block
247 margin-right: -2rem
248 padding-right: 2rem
249 max-width: $nav-desktop-width * .8
250 // Alter base select styles
251 text-align-last: center
252 background: none
253 border: none
254 border-radius: 0em
255 box-shadow: none
256 font-family: $base-font-family
257 font-size: 1em
258 font-weight: normal
259 color: rgba(255, 255, 255, .3)
260 cursor: pointer
261 // Allow for padding
262 appearance: none
263 -webkit-appearance: none
264 -moz-appearance: none
265 &:hover, &:active, &:focus
266 background: rgba(255, 255, 255, .1)
267 color: rgba(255, 255, 255, .5)
268 option
269 color: black
270 &:has(> select):after
271 display: inline-block
272 width: 1.5em
273 height: 100%
274 padding: .1em
275 content: "\f0d7"
276 font-size: 1em
277 line-height: 1.2em
278 font-family: FontAwesome
279 text-align: center
280 pointer-events: none
281 box-sizing: border-box
282
283 .wy-nav .wy-menu-vertical
284 header
285 color: $link-color
286 a
287 color: $text-light
288 &:hover
289 background-color: $link-color
290 color: $white
291
292 [data-menu-wrap]
293 +transition(all 0.2s ease-in)
294 position: absolute
295 opacity: 1
296 width: 100%
297 opacity: 0
298 &.move-center
299 left: 0
300 right: auto
301 opacity: 1
302 &.move-left
303 right: auto
304 left: -100%
305 opacity: 0
306 &.move-right
307 right: -100%
308 left: auto
309 opacity: 0
310
311 .wy-body-for-nav
312 background: $section-background-color
313
314 .wy-grid-for-nav
315 position: absolute
316 width: 100%
317 height: 100%
318
319 .wy-nav-side
320 position: fixed
321 top: 0
322 bottom: 0
323 left: 0
324 padding-bottom: 2em
325 width: $nav-desktop-width
326 overflow-x: hidden
327 overflow-y: hidden
328 min-height: 100%
329 color: $menu-medium
330 background: $nav-background-color
331 z-index: $z-index-popover
332
333 .wy-side-scroll
334 width: $nav-desktop-width + 20px
335 position: relative
336 overflow-x: hidden
337 overflow-y: scroll
338 height: 100%
339
340 .wy-nav-top
341 display: none
342 background: $link-color
343 color: $white
344 padding: ($gutter / 4) ($gutter / 2)
345 position: relative
346 line-height: 50px
347 text-align: center
348 font-size: 100%
349 +clearfix
350 a
351 color: $white
352 font-weight: bold
353 img
354 margin-right: $base-line-height / 2
355 height: 45px
356 width: 45px
357 background-color: $menu-logo-color
358 padding: 5px
359 border-radius: 100%
360 i
361 font-size: 30px
362 float: left
363 cursor: pointer
364 padding-top: inherit
365
366 .wy-nav-content-wrap
367 margin-left: $nav-desktop-width
368 background: $section-background-color
369 min-height: 100%
370
371 .wy-nav-content
372 padding: $gutter ($gutter * 2)
373 height: 100%
374 max-width: $nav-content-width
375 margin: auto
376
377 .wy-body-mask
378 position: fixed
379 width: 100%
380 height: 100%
381 background: rgba(0, 0, 0, 0.2)
382 display: none
383 z-index: $z-index-modal - 1
384 &.on
385 display: block
386 footer
387 color: $footer-color
388 p
389 margin-bottom: $base-line-height / 2
390 span.commit code
391 padding: 0px
392 font-family: $code-font-family
393 font-size: 1em
394 background: none
395 border: none
396 color: $footer-color
397
398 .rst-footer-buttons
399 &:before, &:after
400 width: 100%
401 +clearfix
402
403 .rst-breadcrumbs-buttons
404 margin-top: 12px
405 +clearfix
406
407 #search-results
408 .search li
409 margin-bottom: $base-line-height
410 border-bottom: solid 1px $table_border_color
411 padding-bottom: $base-line-height
412 .search li:first-child
413 border-top: solid 1px $table_border_color
414 padding-top: $base-line-height
415 .search li a
416 font-size: 120%
417 margin-bottom: $base-line-height / 2
418 display: inline-block
419 .context
420 color: $text-medium
421 font-size: 90%
422
423 .genindextable li > ul
424 margin-left: $base-line-height
425
426 +media($tablet)
427 .wy-body-for-nav
428 background: $section-background-color
429 .wy-nav-top
430 display: block
431 .wy-nav-side
432 @if $nav-desktop-position == left
433 left: -$nav-desktop-width
434 @else
435 right: -$nav-desktop-width
436 &.shift
437 width: 85%
438 left: 0
439 .wy-side-scroll
440 width: auto
441 .wy-side-nav-search
442 width: auto
443 .wy-menu.wy-menu-vertical
444 width: auto
445 .wy-nav-content-wrap
446 margin-left: 0
447 .wy-nav-content
448 padding: $gutter
449 &.shift
450 position: fixed
451 min-width: 100%
452 left: 85%
453 top: 0
454 height: 100%
455 overflow: hidden
456
457 @media screen and (min-width: $nav-media-query)
458 .wy-nav-content-wrap
459 background: rgba(0, 0, 0, 0.05)
460 .wy-nav-content
461 margin: 0
462 background: $section-background-color
463
464 @media print
465 .rst-versions, footer, .wy-nav-side
466 display: none
467 .wy-nav-content-wrap
468 margin-left: 0