forked from github/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sidebar.scss
95 lines (83 loc) · 1.54 KB
/
sidebar.scss
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
.sidebar {
width: 260px;
background-color: var(--color-auto-blue-9);
position: sticky;
top: 0;
padding-bottom: $spacer-5;
overflow-y: auto;
height: 100vh;
flex-shrink: 0;
@include breakpoint(xl) {
width: 280px;
}
}
.sidebar-background-color {
background-color: var(--color-auto-blue-9);
}
.sidebar-products > li {
margin: 4px 0;
}
.sidebar-products a,
.sidebar-products .arrow {
text-decoration: none;
color: var(--color-auto-white);
display: block;
line-height: 1.4;
&:hover {
color: var(--color-auto-blue-3);
}
}
.sidebar-category,
.sidebar-product {
> a,
summary a {
color: var(--color-auto-blue-2);
opacity: 0.8;
}
}
.sidebar-product,
.sidebar-category,
.sidebar-maptopic,
.sidebar-article {
&.active > a {
}
&.is-current-page > a {
color: var(--color-auto-blue-3);
}
}
.sidebar-category.active {
background-color: var(--color-auto-blue-8);
}
.sidebar-maptopic {
.sidebar-article {
position: relative;
&::before {
content: "";
position: absolute;
left: $spacer-4;
height: 100%;
border-left: 1px solid var(--color-auto-blue-7);
width: 1px;
top: 0;
}
&.active {
&::before {
border-left: 3px solid var(--color-auto-blue-7);
}
}
}
}
// only display child lists of active elements in sidebar
.sidebar-product.active > ul,
.sidebar-category.active > ul,
.sidebar-maptopic.active > ul {
display: block;
}
.sidebar-category {
> ul {
display: none;
}
}
.sidebar-maptopic > ul {
display: none;
}