2020-05-22 05:13:58 +00:00
|
|
|
/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/window_control_placeholder_support.css made available under Mozilla Public License v. 2.0
|
|
|
|
See the above repository for updates as well as full license text. */
|
|
|
|
|
2019-02-08 22:03:13 +00:00
|
|
|
/* Creates placeholders for window controls */
|
|
|
|
/* This is a supporting file used by other stylesheets */
|
|
|
|
|
2019-08-11 14:29:42 +00:00
|
|
|
/* This stylesheet is pretty much unnecessary if window titlebar is enabled */
|
|
|
|
|
2019-02-10 08:57:20 +00:00
|
|
|
/* This file should preferably be imported before other stylesheets */
|
|
|
|
|
2019-02-09 10:45:52 +00:00
|
|
|
/* Defaults for window controls on RIGHT side of the window */
|
2019-05-05 12:20:51 +00:00
|
|
|
/* Modify these values to match your preferences */
|
2022-03-23 07:59:00 +00:00
|
|
|
:root:is([tabsintitlebar], [sizemode="fullscreen"]) {
|
2021-09-19 17:31:30 +00:00
|
|
|
--uc-window-control-width: 138px; /* Space reserved for window controls (Win10) */
|
|
|
|
/* Extra space reserved on both sides of the nav-bar to be able to drag the window */
|
|
|
|
--uc-window-drag-space-pre: 30px; /* left side*/
|
|
|
|
--uc-window-drag-space-post: 30px; /* right side*/
|
2019-02-08 22:03:13 +00:00
|
|
|
}
|
2021-09-19 17:31:30 +00:00
|
|
|
|
2022-03-23 07:59:00 +00:00
|
|
|
:root:is([tabsintitlebar][sizemode="maximized"], [sizemode="fullscreen"]) {
|
2021-09-19 17:31:30 +00:00
|
|
|
--uc-window-drag-space-pre: 0px; /* Remove pre space */
|
|
|
|
}
|
|
|
|
|
2022-02-12 07:20:20 +00:00
|
|
|
@media (-moz-platform: windows-win7),
|
|
|
|
(-moz-platform: windows-win8),
|
|
|
|
(-moz-os-version: windows-win7),
|
2022-02-13 19:26:15 +00:00
|
|
|
(-moz-os-version: windows-win8){
|
2022-03-23 07:59:00 +00:00
|
|
|
:root:is([tabsintitlebar], [sizemode="fullscreen"]) {
|
2021-09-19 17:31:30 +00:00
|
|
|
--uc-window-control-width: 105px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@media (-moz-gtk-csd-available) {
|
2022-03-23 08:15:37 +00:00
|
|
|
:root:is([tabsintitlebar],[sizemode="fullscreen"]) {
|
2021-09-19 17:31:30 +00:00
|
|
|
--uc-window-control-width: 84px;
|
|
|
|
}
|
|
|
|
}
|
2022-12-23 11:53:51 +00:00
|
|
|
@media (-moz-platform: macos){
|
|
|
|
:root:is([tabsintitlebar],[sizemode="fullscreen"]) {
|
|
|
|
--uc-window-control-width: 72px;
|
|
|
|
}
|
|
|
|
}
|
2021-09-19 17:31:30 +00:00
|
|
|
|
2021-10-16 04:27:31 +00:00
|
|
|
.titlebar-buttonbox, #window-controls{ color: var(--toolbar-color) }
|
2021-10-16 05:47:27 +00:00
|
|
|
:root[sizemode="fullscreen"] .titlebar-buttonbox-container{ display: none }
|
2021-09-19 15:57:33 +00:00
|
|
|
:root[sizemode="fullscreen"] #navigator-toolbox { position: relative; }
|
2021-10-16 05:47:27 +00:00
|
|
|
|
|
|
|
:root[sizemode="fullscreen"] #TabsToolbar > .titlebar-buttonbox-container:last-child,
|
2021-05-15 09:13:32 +00:00
|
|
|
:root[sizemode="fullscreen"] #window-controls{
|
2021-09-19 15:57:33 +00:00
|
|
|
position: absolute;
|
2021-05-15 09:13:32 +00:00
|
|
|
display: flex;
|
|
|
|
top: 0;
|
|
|
|
right:0;
|
|
|
|
height: 40px;
|
|
|
|
}
|
2021-10-16 05:47:27 +00:00
|
|
|
|
|
|
|
:root[sizemode="fullscreen"] #TabsToolbar > .titlebar-buttonbox-container:last-child,
|
2021-05-15 09:13:32 +00:00
|
|
|
:root[uidensity="compact"][sizemode="fullscreen"] #window-controls{ height: 32px }
|
2021-10-16 05:47:27 +00:00
|
|
|
|
2019-12-06 08:29:44 +00:00
|
|
|
#nav-bar{
|
2021-09-19 17:31:30 +00:00
|
|
|
border-inline: var(--uc-window-drag-space-pre,0px) solid var(--toolbar-bgcolor);
|
2020-04-29 07:19:45 +00:00
|
|
|
border-inline-style: solid !important;
|
2021-09-19 17:31:30 +00:00
|
|
|
border-right-width: calc(var(--uc-window-control-width,0px) + var(--uc-window-drag-space-post,0px));
|
2019-02-09 10:45:52 +00:00
|
|
|
}
|
|
|
|
|
2022-12-23 11:53:51 +00:00
|
|
|
/* Rules for window controls on left layout */
|
|
|
|
@media (-moz-gtk-csd-reversed-placement),
|
|
|
|
(-moz-platform: macos){
|
|
|
|
:root[tabsintitlebar="true"] #nav-bar{
|
2021-09-19 17:31:30 +00:00
|
|
|
border-inline-width: calc(var(--uc-window-control-width,0px) + var(--uc-window-drag-space-post,0px)) var(--uc-window-drag-space-pre,0px)
|
2019-02-09 10:45:52 +00:00
|
|
|
}
|
2021-10-16 05:47:27 +00:00
|
|
|
:root[sizemode="fullscreen"] #TabsToolbar > .titlebar-buttonbox-container:last-child,
|
|
|
|
:root[sizemode="fullscreen"] #window-controls{ right: unset }
|
2019-05-05 12:20:51 +00:00
|
|
|
}
|
2022-12-23 11:53:51 +00:00
|
|
|
|
|
|
|
/* This pref can be used to force window controls on left even if that is not normal behavior on your OS */
|
|
|
|
@supports -moz-bool-pref("userchrome.force-window-controls-on-left.enabled"){
|
|
|
|
:root[tabsintitlebar="true"] #nav-bar{
|
|
|
|
border-inline-width: calc(var(--uc-window-control-width,0px) + var(--uc-window-drag-space-post,0px)) var(--uc-window-drag-space-pre,0px)
|
|
|
|
}
|
|
|
|
:root[sizemode="fullscreen"] #TabsToolbar > .titlebar-buttonbox-container:last-child,
|
|
|
|
:root[sizemode="fullscreen"] #window-controls{ right: unset; }
|
|
|
|
.titlebar-buttonbox-container{ -moz-box-ordinal-group: 0 !important; }
|
|
|
|
.titlebar-buttonbox{ -moz-box-direction: reverse }
|
|
|
|
}
|
|
|
|
|