forked from webpack/webpack.js.org
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSidebarItem.scss
More file actions
119 lines (105 loc) · 2.06 KB
/
SidebarItem.scss
File metadata and controls
119 lines (105 loc) · 2.06 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
@use "../../styles/partials/mixins" as *;
@use "../../styles/partials/functions" as *;
.sidebar-item {
position: relative;
display: flex;
flex-wrap: wrap;
font-size: 15px;
margin: 0.6em 0;
align-items: center;
min-height: 40px;
&__toggle {
flex: 0 0 auto;
margin-top: 0.125em;
margin-right: 0.5em;
cursor: pointer;
color: getColor(denim);
transition: all 250ms;
&:hover {
color: getColor(mine-shaft);
}
}
&__toggle-button {
background: none;
border: none;
padding: 0;
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 40px;
min-height: 40px;
}
&__title {
flex: 1 1 auto;
color: getColor(elephant);
max-width: 85%;
min-height: 40px;
display: inline-flex;
align-items: center;
@include control-overflow;
&.active {
font-weight: 600;
color: getColor(mine-shaft);
}
}
&__anchors {
position: relative;
display: none;
flex: 0 0 100%;
flex-wrap: wrap;
margin: 0.35em 0;
padding-left: 1.5em;
overflow: hidden;
list-style: none;
line-height: 19px;
&:before {
content: "";
position: absolute;
height: calc(100% - 0.6em);
top: 0;
left: 1.5em;
border-left: 1px dashed getColor(dusty-grey);
}
}
&__anchor {
position: relative;
flex: 0 0 100%;
margin: 0.25em 0;
padding-left: 1em;
@include control-overflow;
&:first-child {
margin-top: 0;
}
&:last-child {
margin-bottom: 0;
}
&:before {
content: "";
position: absolute;
width: 0.5em;
left: 0;
top: 10px;
border-bottom: 1px dashed getColor(dusty-grey);
}
a {
color: getColor(elephant);
&:hover {
color: getColor(denim);
}
}
}
&--open {
.sidebar-item__anchors {
display: flex;
}
.sidebar-item__toggle {
transform-origin: center center;
transform: rotate(90deg);
}
}
&--disabled {
.sidebar-item__toggle {
color: #aaa;
}
}
}