-
Notifications
You must be signed in to change notification settings - Fork 0
/
userChrome.css
396 lines (330 loc) · 11.3 KB
/
userChrome.css
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
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
:root {
/* delay before expanding tabs, set to '0' for no delay */
--delay: 0.5s;
--transition-time: 0.2s;
--positionX1: 48px; /* '48px' for left, '0px' for right sidebar */
--positionX2: absolute; /* 'absolute' for left, 'none' for right sidebar */
}
/* macOS specific styles */
@media (-moz-platform: macos) {
#TabsToolbar:not([customizing="true"]) {
visibility: collapse !important;
}
:root:not([customizing="true"]) #nav-bar:not([inFullscreen]) {
padding-left: 80px;
}
:root:not([customizing="true"]) #TabsToolbar .titlebar-buttonbox-container {
visibility: visible !important;
position: absolute;
top: 12px;
left: 0px;
display: block;
}
}
/* Linux/GTK specific styles */
@media (-moz-gtk-csd-available) {
#TabsToolbar:not([customizing="true"]) {
visibility: collapse !important;
}
#toolbar-menubar {
padding-top: 0px !important;
}
:root:not([customizing="true"]) #toolbar-menubar[inactive]+#TabsToolbar .titlebar-buttonbox-container {
visibility: visible !important;
position: absolute;
top: var(--uc-win-ctrl-vertical-offset);
display: block;
z-index: 101;
}
/* enable rounded top corners */
:root[tabsintitlebar][sizemode="normal"]:not([gtktiledwindow="true"]):not([customizing="true"]) #nav-bar {
border-top-left-radius: env(-moz-gtk-csd-titlebar-radius);
border-top-right-radius: env(-moz-gtk-csd-titlebar-radius);
}
/* window control padding values (these don't change the size of the actual buttons, only the padding for the navbar) */
:root[tabsintitlebar]:not([customizing="true"]) {
/* default button/padding size based on adw-gtk3 theme */
--uc-win-ctrl-btn-width: 38px;
--uc-win-ctrl-padding: 12px;
/* vertical offset from the top of the window, calculation: (1/2 * (NAVBAR_HEIGHT - BUTTON_HEIGHT)) */
--uc-win-ctrl-vertical-offset: 8px;
/* extra window drag space */
--uc-win-ctrl-drag-space: 20px;
}
:root[tabsintitlebar][lwtheme]:not([customizing="true"]) {
/* seperate values for when using a theme, based on the Firefox defaults */
--uc-win-ctrl-btn-width: 30px;
--uc-win-ctrl-padding: 12px;
/* vertical offset from the top of the window, calculation: (1/2 * (NAVBAR_HEIGHT - BUTTON_HEIGHT)) */
--uc-win-ctrl-vertical-offset: 5px;
/* extra window drag space */
--uc-win-ctrl-drag-space: 20px;
}
/* setting the padding value for all button combinations */
@media (-moz-gtk-csd-minimize-button),
(-moz-gtk-csd-maximize-button),
(-moz-gtk-csd-close-button) {
#nav-bar {
--uc-navbar-padding: calc(var(--uc-win-ctrl-btn-width) * 1);
}
}
@media (-moz-gtk-csd-minimize-button) and (-moz-gtk-csd-maximize-button),
(-moz-gtk-csd-minimize-button) and (-moz-gtk-csd-close-button),
(-moz-gtk-csd-maximize-button) and (-moz-gtk-csd-close-button) {
#nav-bar {
--uc-navbar-padding: calc(var(--uc-win-ctrl-btn-width) * 2);
}
}
@media (-moz-gtk-csd-minimize-button) and (-moz-gtk-csd-maximize-button) and (-moz-gtk-csd-close-button) {
#nav-bar {
--uc-navbar-padding: calc(var(--uc-win-ctrl-btn-width) * 3);
}
}
/* only applies padding/positioning if there is 1 or more buttons */
@media (-moz-gtk-csd-minimize-button),
(-moz-gtk-csd-maximize-button),
(-moz-gtk-csd-close-button) {
/* window controls on the right */
@media not (-moz-gtk-csd-reversed-placement) {
#nav-bar {
padding-inline: 0 calc(var(--uc-navbar-padding, 0) + var(--uc-win-ctrl-padding) + var(--uc-win-ctrl-drag-space)) !important;
}
.titlebar-buttonbox-container {
right: 0;
}
}
/* window controls on the left */
@media (-moz-gtk-csd-reversed-placement) {
#nav-bar {
padding-inline: calc(var(--uc-navbar-padding, 0) + var(--uc-win-ctrl-padding) + var(--uc-win-ctrl-drag-space)) 0 !important;
}
.titlebar-buttonbox-container {
left: 0;
}
}
}
/* Hide window buttons in fullscreen */
#navigator-toolbox[style*="margin-top: -"] .titlebar-buttonbox-container,
[inDOMFullscreen="true"] .titlebar-buttonbox-container {
transform: translateY(-100px)
}
}
/* Windows specific styles */
@media (-moz-platform: windows-win10) {
/* Hide main tabs toolbar */
:root[tabsintitlebar]{
--uc-window-control-width: 137px; /* Space at the right of nav-bar for window controls */
/* --uc-window-drag-space-width: 24px; */ /* To add extra window drag space in nav-bar */
}
#nav-bar{
border-inline: var(--uc-window-drag-space-width,80px) solid var(--toolbar-bgcolor) ;
border-inline-style: solid !important;
border-right-width: calc(var(--uc-window-control-width,0px) + var(--uc-window-drag-space-width,0px));
padding-top: .5px !important; /* This makes it possible to drag the maximized window. */
margin-left: -80px; /* Removes the space left when hiding .titlebar-buttonbox-container */
}
#back-button {
margin-top: -.5px !important;
}
#forward-button {
margin-top: -.5px !important;
}
#reload-button {
margin-top: -.5px !important;
}
#PanelUI-button {
margin-top: -.5px !important;
}
#nav-bar-overflow-button{
margin-top: -.5px !important;
}
:root {
--uc-toolbar-height: 32px;
--chrome-content-separator-color: none !important;
}
:root:not([uidensity="compact"]) {
--uc-toolbar-height: 38px;
}
#TabsToolbar {
visibility: collapse !important;
}
/* Hide the Windows controls on the left side. */
#TabsToolbar .titlebar-buttonbox-container {
visibility: hidden !important;
}
/* Line up the Windows controls with the rest of the icons in the toolbar. */
.titlebar-buttonbox-container {
margin-top: 3px;
}
:root:not([inFullscreen]) #nav-bar {
margin-top: calc(0px - var(--uc-toolbar-height));
z-index: 2;
}
#toolbar-menubar {
min-height: unset !important;
height: var(--uc-toolbar-height) !important;
position: relative;
}
/* For a rounded button design, uncomment both lines in .titlebar-buttonbox. */
.titlebar-buttonbox {
z-index:3 !important;
/* padding-right:3px; */
}
.titlebar-buttonbox * {
/* border-radius: 5px; */
width:35px;
height:38px;
}
#main-menubar {
-moz-box-flex: 1;
background-color: var(--toolbar-bgcolor,--toolbar-non-lwt-bgcolor);
background-clip: padding-box;
border-right: 30px solid transparent;
border-image: linear-gradient(to left, transparent, var(--toolbar-bgcolor,--toolbar-non-lwt-bgcolor) 30px) 20 / 30px;
}
#toolbar-menubar:not([inactive]) {
z-index: 2;
}
#toolbar-menubar[inactive] > #menubar-items {
opacity: 0;
pointer-events: none;
margin-left: var(--uc-window-drag-space-width,0px);
}
:root[inFullscreen] #nav-bar {
border-inline: none !important;
}
}
/* General styles */
#browser {
position: relative;
}
#nav-bar, #urlbar {
z-index: 100;
}
#sidebar-box:not([lwt-sidebar]){
appearance: unset !important;
}
#sidebar-box[sidebarcommand*="tabcenter"] {
z-index: 1;
}
#sidebar-box[sidebarcommand*="tabcenter"] #sidebar-header {
visibility: collapse;
display: none;
}
[sidebarcommand*="tabcenter"] #sidebar {
min-width: 48px !important;
max-width: 48px !important;
}
#sidebar-box[sidebarcommand*="tabcenter"]:not([hidden]) {
display: block;
position: var(--positionX2);
box-sizing: content-box;
min-width: 48px;
max-width: 48px;
overflow: hidden;
border-right: 1px solid var(--sidebar-border-color);
z-index: 1;
top: 0;
bottom: 0;
}
#main-window[inFullscreen] #sidebar-box[sidebarcommand*="tabcenter"]:not([hidden]) {
min-width: 1px;
max-width: 1px;
}
#sidebar-box[sidebarcommand*="tabcenter"]:hover #sidebar,
#sidebar-box[sidebarcommand*="tabcenter"]:hover {
min-width: 10vw !important;
width: 30vw !important;
max-width: 200px !important;
z-index: 1 !important;
transition: all var(--transition-time) ease var(--delay);
}
/* used for delay function */
#sidebar-box[sidebarcommand*="tabcenter"]:not(:hover) #sidebar,
#sidebar-box[sidebarcommand*="tabcenter"]:not(:hover) {
transition: all var(--transition-time) ease 0s;
}
@media (width >= 1200px) {
#sidebar-box[sidebarcommand*="tabcenter"]:hover #sidebar,
#sidebar-box[sidebarcommand*="tabcenter"]:hover {
max-width: 250px !important;
}
}
[sidebarcommand*="tabcenter"] ~ #sidebar-splitter {
display: none;
}
[sidebarcommand*="tabcenter"] #sidebar {
max-height: 100%;
height: 100%;
}
#main-window:not([inFullscreen]) #sidebar-box[sidebarcommand*="tabcenter"]:not([hidden]) ~ #appcontent {
margin-left: var(--positionX1);
}
#main-window[inFullscreen][inDOMFullscreen] #appcontent {
margin-left: 0;
}
#main-window[inFullscreen] #sidebar {
height: 100vh;
}
#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header {
display: none;
}
[sidebarcommand*="tabcenter"] #sidebar-header {
background: #0C0C0D;
border-bottom: none !important;
}
[sidebarcommand*="tabcenter"] ~ #sidebar-splitter {
border-right-color: #0C0C0D !important;
border-left-color: #0C0C0D !important;
}
[sidebarcommand*="tabcenter"] #sidebar-switcher-target,
[sidebarcommand*="tabcenter"] #sidebar-close {
filter: invert(100%);
}
/* Sidebar min and max width removal */
#sidebar-box {
max-width: none !important;
min-width: 0px !important;
}
/* Hide splitter, when using Tree Style Tab. */
#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] + #sidebar-splitter {
display: none !important;
}
/* Hide sidebar header, when using Tree Style Tab. */
#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header {
visibility: collapse;
}
/* Shrink sidebar until hovered, when using Tree Style Tab. */
:root {
--thin-tab-width: 30px;
--wide-tab-width: 200px;
}
#sidebar-box:not([sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"]) {
min-width: var(--wide-tab-width) !important;
max-width: none !important;
}
#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] {
position: relative !important;
transition: all 100ms !important;
min-width: var(--thin-tab-width) !important;
max-width: var(--thin-tab-width) !important;
}
#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"]:hover {
transition: all 200ms !important;
transition-delay: 0.2s !important;
min-width: var(--wide-tab-width) !important;
max-width: var(--wide-tab-width) !important;
margin-right: calc((var(--wide-tab-width) - var(--thin-tab-width)) * -1) !important;
z-index: 1;
}
#tabbar tab-item tab-item-substance:not(:hover) tab-closebox {
display: none;
}
@media (max-width: 630px) {
#urlbar-container {
min-width: 100% !important;
}
#menubar-items {
display: none !important;
}
}