-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathRedstringMenu.css
More file actions
261 lines (233 loc) · 5.23 KB
/
Copy pathRedstringMenu.css
File metadata and controls
261 lines (233 loc) · 5.23 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
.menu-container {
position: absolute;
top: 100%;
/* Remove the negative offset, align exactly with bottom of header */
left: 0;
width: 175px;
background-color: #260000;
border-bottom-right-radius: 25px;
box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
z-index: 11001;
padding: 10px 0;
transform-origin: top;
}
.menu-items {
display: flex;
flex-direction: column;
gap: 4px;
}
.menu-item {
width: calc(100% - 20px);
margin: 0 auto;
box-sizing: border-box;
background: none;
border: none;
color: #BDB6B5;
padding: 8px 12px;
text-align: left;
font-size: 14px;
font-family: 'EmOne', sans-serif;
cursor: pointer;
transition: background-color 0.2s;
display: flex;
justify-content: space-between;
align-items: center;
outline: none;
border-radius: 13px;
}
.menu-item:focus {
outline: none;
/* Prevent focus outline */
}
.menu-item:hover {
background-color: #F00000;
}
.menu-item-chevron {
opacity: 0;
transition: opacity 0.2s;
}
.menu-item:hover .menu-item-chevron {
opacity: 1;
}
.menu-container.entering {
animation: slideDown 150ms ease-out forwards;
}
.menu-container.exiting {
animation: slideUp 150ms ease-out forwards;
}
@keyframes slideDown {
from {
transform: translateY(-10px);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}
@keyframes slideUp {
from {
transform: translateY(0);
opacity: 1;
}
to {
transform: translateY(-10px);
opacity: 0;
}
}
.submenu-container {
position: absolute;
top: 0;
left: 100%;
background-color: #260000;
border-radius: 15px;
border-top-left-radius: 0;
box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
padding: 10px;
z-index: 11002;
width: 190px;
/* slightly wider to accommodate full-width slider with margins */
}
.submenu-item {
display: flex;
align-items: center;
padding: 10px 12px;
margin: 0 auto;
width: calc(100% - 20px);
border-radius: 15px;
border: none;
background: none;
color: #BDB6B5;
font-size: 14px;
font-family: 'EmOne', sans-serif;
cursor: pointer;
transition: background-color 0.2s;
text-align: left;
outline: none;
touch-action: manipulation;
}
.submenu-item:hover {
background-color: #F00000;
}
/* Compact slider inside submenu */
.submenu-slider {
-webkit-appearance: none;
appearance: none;
width: 100%;
height: 6px;
background: #BDB6B5;
/* track matches font color */
border-radius: 999px;
outline: none;
touch-action: none;
/* ensure touch drag works without scroll */
pointer-events: auto;
/* explicitly allow input events */
}
.submenu-slider::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: 12px;
height: 12px;
border-radius: 50%;
background: #BDB6B5;
/* dot matches font color */
border: none;
box-shadow: none;
cursor: pointer;
}
.submenu-slider::-moz-range-thumb {
width: 12px;
height: 12px;
border-radius: 50%;
background: #BDB6B5;
border: none;
box-shadow: none;
cursor: pointer;
}
/* Ensure div elements with submenu-item class get the same styling as buttons */
div.submenu-item {
border: none;
background: none;
outline: none;
}
/* Recent files submenu */
.submenu-item.has-submenu {
position: relative;
}
.submenu-item.has-submenu:hover,
.submenu-item.has-submenu.active-submenu-parent {
background-color: #F00000;
color: #EFE8E5;
}
.recent-files-submenu {
position: absolute;
left: 100%;
top: -5px;
background-color: #260000;
border-radius: 15px;
border-top-left-radius: 0;
box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
padding: 10px;
min-width: 250px;
max-width: 500px;
z-index: 11003;
margin-left: 5px;
/* Increased from 2px to 5px for more spacing */
}
.recent-file-item {
background: none;
border: none;
color: #BDB6B5;
padding: 8px 12px;
text-align: left;
font-size: 14px;
font-family: 'EmOne', sans-serif;
cursor: pointer;
transition: background-color 0.2s;
margin: 4px 0;
display: flex;
justify-content: flex-start;
align-items: center;
outline: none;
border-radius: 15px;
width: calc(100% - 20px);
margin: 4px auto;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
touch-action: manipulation;
}
.recent-file-item:hover {
background-color: #F00000;
color: #EFE8E5;
}
.recent-file-item:hover .recent-file-time {
color: #EFE8E5;
}
.recent-file-name {
font-weight: 500;
overflow: hidden;
text-overflow: ellipsis;
flex-grow: 1;
margin-right: 8px;
/* Space between name and time */
pointer-events: none;
/* Make child element transparent to hover events */
}
.recent-file-time {
font-size: 12px;
color: #888;
flex-shrink: 0;
/* Prevent time from shrinking */
pointer-events: none;
/* Make child element transparent to hover events */
}
.no-recent-files {
padding: 8px 12px;
color: #999;
font-style: italic;
font-size: 14px;
font-family: 'EmOne', sans-serif;
text-align: center;
}