-
-
Notifications
You must be signed in to change notification settings - Fork 229
/
Copy pathSiteNavigationTopics.scss
142 lines (133 loc) · 3.91 KB
/
SiteNavigationTopics.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
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
.SiteNavigationToggle.topics .SiteNavigationToggle__dropdown {
position: absolute;
width: 100%;
top: calc(100% + $header-border-height);
left: 0;
z-index: 1;
}
.SiteNavigationTopics {
@include grid(12);
.categories {
grid-column: 1 / span 6;
@include sm-up {
grid-column-end: span 5;
}
margin-left: -$padding-x-md;
padding: 32px 0;
padding-left: $padding-x-md;
background-color: $accent-pale-blue;
.heading {
@include overline-black-caps;
margin-bottom: 16px;
color: $blue-40;
}
li {
list-style-type: none;
> button {
@include h3-bold;
position: relative;
display: flex;
align-items: center;
justify-content: space-between;
width: calc(100% - 8px);
padding: 8px 16px;
margin: 8px 0;
margin-left: -16px;
text-align: left;
color: $blue-60;
background-color: transparent;
cursor: pointer;
border: none;
white-space: break-spaces;
// pseudo elements for ensuring continuity of hover between
// bordering items while still having a visual gap between an
// active element and its adjacent siblings
&:before {
position: absolute;
content: "";
top: -4px;
left: 0;
width: 100%;
height: 4px;
}
&:after {
position: absolute;
content: "";
bottom: -4px;
left: 0;
width: 100%;
height: 4px;
}
svg {
margin-left: 24px;
margin-right: 8px;
font-size: 0.875rem;
color: $blue-40;
}
&:hover,
&.active {
color: $blue-90;
background-color: #d5e7fe;
}
&:hover svg {
color: inherit;
}
}
}
}
@mixin pull-right-edge-out {
margin-right: -$padding-x-md;
padding-right: $padding-x-md;
}
@mixin reset-pull-right-edge-out {
margin-right: 0;
padding-right: 48px;
}
ul.topics {
grid-column: 7 / span 6;
column-gap: var(--grid-gap);
margin-left: calc(var(--grid-gap) * -1);
padding: 32px 48px;
@include pull-right-edge-out;
background-color: #d5e7fe;
@include sm-up {
grid-column: 6 / span 4;
@include reset-pull-right-edge-out;
}
&.columns-medium {
@include pull-right-edge-out;
@include sm-up {
column-count: 2;
grid-column-end: span 7;
}
@include lg-up {
grid-column-end: span 6;
@include reset-pull-right-edge-out;
}
}
&.columns-large {
@include pull-right-edge-out;
@include sm-up {
column-count: 2;
grid-column-end: span 7;
}
@include lg-up {
column-count: 3;
}
}
.SiteNavigationTopic {
list-style-type: none;
break-inside: avoid-column;
white-space: break-spaces;
@include body-3-medium;
> a {
display: block;
color: $blue-90;
padding: 12px 0;
&:hover {
color: $blue-50;
}
}
}
}
}