-
Notifications
You must be signed in to change notification settings - Fork 79
/
Copy path_menu-list.scss
137 lines (114 loc) · 3.29 KB
/
_menu-list.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
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
@use '../includes/lib' as *;
.mzp-c-menu-list {
display: inline-block;
}
.mzp-c-menu-list-title {
font-family: $button-font-family;
font-size: inherit;
font-weight: bold;
@supports (--css: variables) {
font-family: var(--button-font-family);
}
}
.mzp-c-menu-list-list {
background-color: $color-white;
box-shadow: 0 0 6px 0 rgba(0, 0, 0, 0.3);
border-radius: $border-radius-sm;
}
.mzp-c-menu-list-item {
display: inline-block;
a {
color: $color-link;
display: inline-block;
padding: $spacing-sm;
position: relative;
text-decoration: none;
.mzp-t-download & {
@include bidi(((padding-right, $spacing-sm * 2 + 14px, padding-left, $spacing-sm),));
&::after {
background-size: 20px, 20px;
@include bidi(((right, $spacing-sm, left, auto),));
bottom: $spacing-sm;
content: '';
display: block;
position: absolute;
top: $spacing-sm;
width: 14px;
}
}
&:hover,
&:focus {
background: $color-marketing-gray-20;
color: $color-link-hover;
&::after {
background: $url-image-download-link-hover center center no-repeat;
}
}
}
}
// * ---- */
// JS init
// TODO: hide menu if JS enabled
.is-details {
&.mzp-c-menu-list {
position: relative;
}
.mzp-c-menu-list-title {
button {
@include bidi(((padding, 0 (16px + $spacing-sm) 0 0, 0 0 0 (16px + $spacing-sm)),));
background: transparent;
border: 0;
color: $color-link;
cursor: pointer;
font-family: inherit;
font-size: inherit;
font-weight: inherit;
position: relative;
text-align: inherit;
text-decoration: underline;
width: 100%;
&::after {
@include bidi(((right, 0, left, auto),));
background: $url-image-arrow-down-link center bottom / 20px, 20px no-repeat;
bottom: 1px;
content: '';
display: inline-block;
position: absolute;
top: 0;
width: 16px;
transition: transform 200ms ease-in-out;
}
&[aria-expanded='true']::after {
transform: scaleY(-1);
}
&:hover,
&:focus {
color: $color-link-hover;
text-decoration: none;
&::after {
background-image: $url-image-arrow-down-link-hover;
}
}
}
}
.mzp-c-menu-list-list {
position: absolute;
top: 100%;
left: 0;
z-index: 1;
padding: $spacing-xs 0;
min-width: 150px;
&.is-closed {
display: none;
}
}
.mzp-c-menu-list-item {
display: block;
a {
display: block;
}
}
}