77/* cheat main menu button into title bar ********/
88/************************************************/
99
10- /* tabs toolbar adjustments */
10+ : root {
11+ --appbutton_in_titlebar : 45px !important ;
12+ }
13+
14+ /* menubar adjustments */
1115# main-window : is ([tabsintitlebar ], [customtitlebar ]) # toolbar-menubar {
12- padding-inline-start : 43 px !important ;
16+ padding-inline-start : var ( --appbutton_in_titlebar ) !important ;
1317}
1418# main-window : is ([tabsintitlebar ], [customtitlebar ])[sizemode = "maximized" ] # toolbar-menubar {
15- padding-inline-start : 41 px !important ;
19+ padding-inline-start : var ( --appbutton_in_titlebar ) !important ;
1620}
1721# main-window [uidensity = compact ]: is ([tabsintitlebar ], [customtitlebar ]) # toolbar-menubar {
18- padding-inline-start : 40 px !important ;
22+ padding-inline-start : var ( --appbutton_in_titlebar ) !important ;
1923}
2024# main-window [uidensity = compact ]: is ([tabsintitlebar ], [customtitlebar ])[sizemode = "maximized" ] # toolbar-menubar {
21- padding-inline-start : 39 px !important ;
25+ padding-inline-start : var ( --appbutton_in_titlebar ) !important ;
2226}
2327# main-window [uidensity = touch ]: is ([tabsintitlebar ], [customtitlebar ]) # toolbar-menubar {
24- padding-inline-start : 48 px !important ;
28+ padding-inline-start : var ( --appbutton_in_titlebar ) !important ;
2529}
2630# main-window [uidensity = touch ]: is ([tabsintitlebar ], [customtitlebar ])[sizemode = "maximized" ] # toolbar-menubar {
27- padding-inline-start : 47 px !important ;
31+ padding-inline-start : var ( --appbutton_in_titlebar ) !important ;
2832}
2933
3034/* tabs toolbar adjustments */
31- # main-window : is ([tabsintitlebar ], [customtitlebar ]) # toolbar-menubar [autohide = "true" ][inactive = "true" ] ~ # TabsToolbar {
32- padding-inline-start : 43 px !important ;
35+ # main-window : is ([tabsintitlebar ], [customtitlebar ]) # toolbar-menubar [autohide = "true" ][inactive = "true" ] ~ # TabsToolbar {
36+ padding-inline-start : var ( --appbutton_in_titlebar ) !important ;
3337}
34- # main-window : is ([tabsintitlebar ], [customtitlebar ])[sizemode = "maximized" ] # toolbar-menubar [autohide = "true" ][inactive = "true" ] ~ # TabsToolbar {
35- padding-inline-start : 41 px !important ;
38+ # main-window : is ([tabsintitlebar ], [customtitlebar ])[sizemode = "maximized" ] # toolbar-menubar [autohide = "true" ][inactive = "true" ] ~ # TabsToolbar {
39+ padding-inline-start : var ( --appbutton_in_titlebar ) !important ;
3640}
37- # main-window [uidensity = compact ]: is ([tabsintitlebar ], [customtitlebar ]) # toolbar-menubar [autohide = "true" ][inactive = "true" ] ~ # TabsToolbar {
38- padding-inline-start : 40 px !important ;
41+ # main-window [uidensity = compact ]: is ([tabsintitlebar ], [customtitlebar ]) # toolbar-menubar [autohide = "true" ][inactive = "true" ] ~ # TabsToolbar {
42+ padding-inline-start : var ( --appbutton_in_titlebar ) !important ;
3943}
40- # main-window [uidensity = compact ]: is ([tabsintitlebar ], [customtitlebar ])[sizemode = "maximized" ] # toolbar-menubar [autohide = "true" ][inactive = "true" ] ~ # TabsToolbar {
41- padding-inline-start : 39 px !important ;
44+ # main-window [uidensity = compact ]: is ([tabsintitlebar ], [customtitlebar ])[sizemode = "maximized" ] # toolbar-menubar [autohide = "true" ][inactive = "true" ] ~ # TabsToolbar {
45+ padding-inline-start : var ( --appbutton_in_titlebar ) !important ;
4246}
43- # main-window [uidensity = touch ]: is ([tabsintitlebar ], [customtitlebar ]) # toolbar-menubar [autohide = "true" ][inactive = "true" ] ~ # TabsToolbar {
44- padding-inline-start : 48 px !important ;
47+ # main-window [uidensity = touch ]: is ([tabsintitlebar ], [customtitlebar ]) # toolbar-menubar [autohide = "true" ][inactive = "true" ] ~ # TabsToolbar {
48+ padding-inline-start : var ( --appbutton_in_titlebar ) !important ;
4549}
46- # main-window [uidensity = touch ]: is ([tabsintitlebar ], [customtitlebar ])[sizemode = "maximized" ] # toolbar-menubar [autohide = "true" ][inactive = "true" ] ~ # TabsToolbar {
47- padding-inline-start : 47 px !important ;
50+ # main-window [uidensity = touch ]: is ([tabsintitlebar ], [customtitlebar ])[sizemode = "maximized" ] # toolbar-menubar [autohide = "true" ][inactive = "true" ] ~ # TabsToolbar {
51+ padding-inline-start : var ( --appbutton_in_titlebar ) !important ;
4852}
4953
5054# main-window : is ([tabsintitlebar ], [customtitlebar ])[sizemode = "fullscreen" ] # TabsToolbar {
51- padding-inline-start : 43 px !important ;
55+ padding-inline-start : var ( --appbutton_in_titlebar ) !important ;
5256}
5357
5458# main-window : is ([tabsintitlebar ], [customtitlebar ]): not ([sizemode = "fullscreen" ]) # toolbar-menubar [autohide = "true" ]: not ([inactive = "true" ]) ~ # TabsToolbar ,
55- # main-window : is ([tabsintitlebar ], [customtitlebar ]): not ([sizemode = "fullscreen" ]) # toolbar-menubar [autohide = "false" ] ~ # TabsToolbar {
59+ # main-window : is ([tabsintitlebar ], [customtitlebar ]): not ([sizemode = "fullscreen" ]) # toolbar-menubar [autohide = "false" ] ~ # TabsToolbar {
5660 margin-top : 4px !important ;
5761}
5862
7579
7680@media not (-moz-platform : windows) {
7781 # main-window : is ([tabsintitlebar ], [customtitlebar ])[sizemode = "maximized" ] # PanelUI-button {
78- top : 0 px !important ;
82+ top : 0 !important ;
7983 }
8084}
8185
8286# main-window : is ([tabsintitlebar ], [customtitlebar ])[sizemode = "fullscreen" ] # PanelUI-button {
83- top : 0 px !important ;
87+ top : 0 !important ;
8488}
8589
8690# main-window : is ([tabsintitlebar ], [customtitlebar ]) # PanelUI-button # PanelUI-menu-button {
101105/* code for macOS/Linux */
102106@media not (-moz-platform : windows) {
103107 # main-window : is ([tabsintitlebar ], [customtitlebar ]) # PanelUI-button # PanelUI-menu-button {
104- max-width : 40 px !important ;
108+ max-width : var ( --appbutton_in_titlebar ) !important ;
105109 }
106110}
107111
122126}
123127
124128/* adjust button badge stack */
125- # main-window : is ([tabsintitlebar ], [customtitlebar ]) : is (# PanelUI-button , # PanelUI-menu-button ): not ([checked ]) : not ( [open ]) : not ( : active ) > .toolbarbutton-badge-stack ,
126- # main-window : is ([tabsintitlebar ], [customtitlebar ]) : is (# PanelUI-button , # PanelUI-menu-button ): not ([disabled = true ]) : not ( [checked ]) : not ( [open ]) : not ( : active ): hover > .toolbarbutton-badge-stack ,
127- # main-window : is ([tabsintitlebar ], [customtitlebar ]) : is (# PanelUI-button , # PanelUI-menu-button ): not ([disabled = true ]): is ([open ], [checked ], : hover : active ) > .toolbarbutton-badge-stack {
129+ # main-window : is ([tabsintitlebar ], [customtitlebar ]) : is (# PanelUI-button , # PanelUI-menu-button ): not ([checked ], [open ], : active ) > .toolbarbutton-badge-stack ,
130+ # main-window : is ([tabsintitlebar ], [customtitlebar ]) : is (# PanelUI-button , # PanelUI-menu-button ): not ([disabled = true ], [checked ], [open ], : active ): hover > .toolbarbutton-badge-stack ,
131+ # main-window : is ([tabsintitlebar ], [customtitlebar ]) : is (# PanelUI-button , # PanelUI-menu-button ): not ([disabled = true ]): is ([open ], [checked ], : hover : active ) > .toolbarbutton-badge-stack {
128132 background : unset !important ;
129133 border-color : unset !important ;
130134 border : 0 !important ;
150154 border-bottom-color : hsla (214 , 89% , 21% , .5 ) !important ;
151155 box-shadow : 0 1px 0 hsla (0 , 0% , 100% , .2 ) inset,
152156 0 0 2px 1px hsla (0 , 0% , 100% , .25 ) inset,
153- 0 1px 0 0px rgba (255 , 255 , 255 , .5 ),
154- 0 -1px 0 0px rgba (255 , 255 , 255 , .5 ),
155- 1px 0 0 0px rgba (255 , 255 , 255 , .5 ),
156- -1px 0 0 0px rgba (255 , 255 , 255 , .5 ) !important ;
157+ 0 1px 0 0px rgba (255 , 255 , 255 , .6 ),
158+ 0 -1px 0 0px rgba (255 , 255 , 255 , .6 ),
159+ 1px 0 0 0px rgba (255 , 255 , 255 , .6 ),
160+ -1px 0 0 0px rgba (255 , 255 , 255 , .6 ) !important ;
157161}
158162# main-window : is ([tabsintitlebar ], [customtitlebar ]) # PanelUI-button # PanelUI-menu-button : hover : not (: active ): not ([open ]){
159163 background-image : radial-gradient (farthest-side at center bottom, rgba (252 , 240 , 89 , .5 ) 10% , rgba (252 , 240 , 89 , 0 ) 70% ),
163167 box-shadow : 0 1px 0 hsla (0 , 0% , 100% , .15 ) inset,
164168 0 0 2px 1px hsla (0 , 0% , 100% , .5 ) inset,
165169 0 -1px 0 hsla (0 , 0% , 100% , .2 ),
166- 0 1px 0 0px rgba (255 , 255 , 255 , .5 ),
167- 0 -1px 0 0px rgba (255 , 255 , 255 , .5 ),
168- 1px 0 0 0px rgba (255 , 255 , 255 , .5 ),
169- -1px 0 0 0px rgba (255 , 255 , 255 , .5 ) !important ;
170+ 0 1px 0 0px rgba (255 , 255 , 255 , .6 ),
171+ 0 -1px 0 0px rgba (255 , 255 , 255 , .6 ),
172+ 1px 0 0 0px rgba (255 , 255 , 255 , .6 ),
173+ -1px 0 0 0px rgba (255 , 255 , 255 , .6 ) !important ;
170174}
171175# main-window : is ([tabsintitlebar ], [customtitlebar ]) # PanelUI-button # PanelUI-menu-button : is (: hover : active , [open ]){
172176 background-image : linear-gradient (rgb (246 , 170 , 69 ), rgb (209 , 74 , 0 ) 95% ) !important ;
173177 box-shadow : 0 2px 3px rgba (0 , 0 , 0 , .4 ) inset,
174178 0 1px 1px rgba (0 , 0 , 0 , .2 ) inset,
175- 0 1px 0 0px rgba (255 , 255 , 255 , .5 ),
176- 0 -1px 0 0px rgba (255 , 255 , 255 , .5 ),
177- 1px 0 0 0px rgba (255 , 255 , 255 , .5 ),
178- -1px 0 0 0px rgba (255 , 255 , 255 , .5 ) !important ;
179+ 0 1px 0 0px rgba (255 , 255 , 255 , .6 ),
180+ 0 -1px 0 0px rgba (255 , 255 , 255 , .6 ),
181+ 1px 0 0 0px rgba (255 , 255 , 255 , .6 ),
182+ -1px 0 0 0px rgba (255 , 255 , 255 , .6 ) !important ;
179183}
180184
181185/*private browsing - purple */
182- # main-window [privatebrowsingmode = temporary ]: is ([tabsintitlebar ], [customtitlebar ]) # PanelUI-button # PanelUI-menu-button {
186+ # main-window [privatebrowsingmode = temporary ]: is ([tabsintitlebar ], [customtitlebar ]) # navigator-toolbox # PanelUI-button # PanelUI-menu-button {
183187 background-image : linear-gradient (rgb (153 , 38 , 211 ), rgb (105 , 19 , 163 ) 95% ) !important ;
184188}
185- # main-window [privatebrowsingmode = temporary ]: is ([tabsintitlebar ], [customtitlebar ]) # PanelUI-button # PanelUI-menu-button : hover : not (: active ): not ([open ]){
189+ # main-window [privatebrowsingmode = temporary ]: is ([tabsintitlebar ], [customtitlebar ]) # navigator-toolbox # PanelUI-button # PanelUI-menu-button : hover : not (: active ): not ([open ]){
186190 background-image : radial-gradient (farthest-side at center bottom, rgba (240 , 193 , 255 , .5 ) 10% , rgba (240 , 193 , 255 , 0 ) 70% ),
187191 radial-gradient (farthest-side at center bottom, rgb (192 , 81 , 247 ), rgba (236 , 172 , 255 , 0 )),
188192 linear-gradient (rgb (144 , 20 , 207 ), rgb (95 , 0 , 158 ) 95% ) !important ;
189193}
190- # main-window [privatebrowsingmode = temporary ]: is ([tabsintitlebar ], [customtitlebar ]) # PanelUI-button # PanelUI-menu-button : is (: hover : active , [open ]) {
194+ # main-window [privatebrowsingmode = temporary ]: is ([tabsintitlebar ], [customtitlebar ]) # navigator-toolbox # PanelUI-button # PanelUI-menu-button : is (: hover : active , [open ]) {
191195 background-image : linear-gradient (rgb (144 , 20 , 207 ), rgb (95 , 0 , 158 ) 95% ) !important ;
192196}
193197
237241
238242/* support for tab title in Firefox titlebar option*/
239243# main-window : is ([tabsintitlebar ], [customtitlebar ])::after {
240- margin-inline-start : 45 px !important ;
244+ margin-inline-start : var ( --appbutton_in_titlebar ) !important ;
241245}
242246
243247/* remove this nonsense button, a menuitem is inside menu button anyways */
259263 height : unset !important ;
260264}
261265
266+ # TabsToolbar .titlebar-spacer [type = "pre-tabs" ] {
267+ display : none !important ;
268+ }
269+
262270/* workaround for Firefox 102+ *******************/
263271panel [id = "appMenu-popup" ][type = "arrow" ][side = "top" ],
264272panel [id = "appMenu-popup" ][type = "arrow" ][side = "bottom" ] {
@@ -280,7 +288,7 @@ panel[id="appMenu-popup"][type="arrow"][side="bottom"] {
280288 }
281289
282290 # main-window : is ([tabsintitlebar ], [customtitlebar ]) # TabsToolbar {
283- padding-inline-end : 100 px !important ;
291+ padding-inline-end : calc ( var ( --appbutton_in_titlebar ) + 5 px ) !important ;
284292 }
285293
286294 # main-window : is ([tabsintitlebar ], [customtitlebar ]) .titlebar-buttonbox-container {
0 commit comments