Add @media based versions for -moz-bool-pref in various styles

Also some cleanup for menupopup_forced_color_schemes.css for remove some
old and unused variables.

This just adds media query versions to files - old ones should be
removed at some point
This commit is contained in:
MrOtherGuy
2023-10-22 14:23:41 +03:00
parent 9fe466140a
commit fd73e2094e
9 changed files with 91 additions and 23 deletions

View File

@@ -14,6 +14,14 @@ See the above repository for updates as well as full license text. */
margin-inline: auto !important;
}
/* Set this pref to true in about:config to make statuspanel show at top instead */
@media (-moz-bool-pref: "userchrome.centered-statuspanel.on-top.enabled"){
#statuspanel:not([hidden]){
inset-block: 0 auto !important;
}
#statuspanel-label{
border-width: 0 1px 1px 1px !important;
}
}
@supports -moz-bool-pref("userchrome.centered-statuspanel.on-top.enabled"){
#statuspanel:not([hidden]){
inset-block: 0 auto !important;

View File

@@ -72,6 +72,26 @@ findbar::after{
flex-grow: 100;
}
@media (-moz-bool-pref: "userchrome.floating-findbar-on-right.enabled"){
findbar{
flex-direction: row-reverse;
}
findbar > .findbar-container{
flex-direction: row-reverse;
border-inline-width: 1px 0px;
border-bottom-right-radius: 0px;
border-bottom-left-radius: 4px;
}
/*
Move findbar so it isn't over the scrollbar
Delete if you want findbar to begin from right window edge
*/
findbar{
margin-right: 16px;
border-right: 1px solid var(--chrome-content-separator-color);
}
}
@supports -moz-bool-pref("userchrome.floating-findbar-on-right.enabled"){
findbar{
flex-direction: row-reverse;

View File

@@ -12,29 +12,23 @@ See the above repository for updates as well as full license text. */
* Changes to the prefs WON'T APPLY before Firefox is restarted.
*/
@media (-moz-bool-pref: "userchrome.menupopups.force-light"){
menupopup{
color-scheme: light !important;
}
}
@media (-moz-bool-pref: "userchrome.menupopups.force-dark"){
menupopup{
color-scheme: dark !important;
}
}
@supports -moz-bool-pref("userchrome.menupopups.force-light"){
menupopup{
color-scheme: light !important;
/* variables for pre-fx105 */
--menuitem-hover-background-color: #e0e0e6 !important;
--menu-background-color: #f9f9fb !important;
--menu-color: #15141a !important;
--menuitem-disabled-hover-background-color: rgba(224, 224, 230, 0.4) !important;
--menu-disabled-color: rgba(21, 20, 26, 0.4) !important;
--menu-border-color: #cfcfd8!important;
--menu-icon-opacity: 0.7 !important;
}
}
@supports -moz-bool-pref("userchrome.menupopups.force-dark"){
menupopup{
color-scheme: dark !important;
/* variables for pre-fx105 */
--menuitem-hover-background-color: #52525e !important;
--menu-background-color: #2b2a33 !important;
--menu-color: #fbfbfe !important;
--menuitem-disabled-hover-background-color: rgba(82, 82, 94, 0.4) !important;
--menu-disabled-color: rgba(251, 251, 254, 0.4) !important;
--menu-border-color: #5b5b66 !important;
--menu-icon-opacity: 1 !important;
}
}

View File

@@ -231,6 +231,23 @@ See the above repository for updates as well as full license text. */
margin-bottom: 0 !important;
z-index: auto !important;
}
@media (-moz-bool-pref: "userchrome.multirowtabs.static-menubar.enabled"){
:root{
--multirow-menubar-height: 28px;
--uc-window-drag-space-width: 0px;
--uc-window-control-width: 0px;
}
#main-menubar,
#toolbar-menubar{ height: var(--multirow-menubar-height); background-image: none; }
#toolbar-menubar > #menubar-items{ visibility: visible; background-image: none !important; }
.titlebar-buttonbox-container{ background: none !important }
:root:not([inFullscreen]) #nav-bar{
top: calc(var(--multirow-menubar-height) + var(--multirow-top-padding));
}
:root[BookmarksToolbarOverlapsBrowser] #PersonalToolbar{
top: calc(var(--multirow-toolbar-height) + var(--multirow-top-padding) + var(--multirow-menubar-height));
}
}
@supports -moz-bool-pref("userchrome.multirowtabs.static-menubar.enabled"){
:root{
--multirow-menubar-height: 28px;

View File

@@ -24,10 +24,10 @@ Window controls will be all wrong without it
/* reserved space for overflow + menu buttons */
#navigator-toolbox{
--uc-buttons-width: calc(96px + 5 * var(--toolbarbutton-outer-padding) + var(--uc-menubutton-padding,6px))
--uc-buttons-width: calc(64px + 5 * var(--toolbarbutton-outer-padding) + var(--uc-menubutton-padding,6px))
}
#nav-bar:not([nonemptyoverflow]) > #nav-bar-customization-target{
--uc-buttons-width: calc(64px + 4 * var(--toolbarbutton-outer-padding) + 6px)
--uc-buttons-width: calc(32px + 4 * var(--toolbarbutton-outer-padding) + 6px)
}
/* Override for other densities */
:root[uidensity="compact"] #navigator-toolbox{
@@ -79,8 +79,18 @@ Window controls will be all wrong without it
#nav-bar-customization-target{ padding-right: calc(100vw - (var(--uc-navigationbar-width)) - var(--uc-window-control-width) - var(--uc-buttons-width) - var(--uc-window-drag-space-post)) }
/* Rules specific to window controls on left layout */
@media (-moz-bool-pref: "userchrome.force-window-controls-on-left.enabled"),
(-moz-platform: macos),
(-moz-gtk-csd-reversed-placement){
.titlebar-buttonbox-container{ position: fixed; display: block; left: 0px; z-index: 3; }
#nav-bar-customization-target{
padding-right: calc(100vw - (var(--uc-navigationbar-width)) - var(--uc-buttons-width) - var(--uc-window-drag-space-pre))
}
}
@supports -moz-bool-pref("layout.css.osx-font-smoothing.enabled"){
.titlebar-buttonbox-container{ position: fixed; display: blocK; left: 0px; z-index: 3; }
.titlebar-buttonbox-container{ position: fixed; display: block; left: 0px; z-index: 3; }
#nav-bar-customization-target{ padding-right: calc(100vw - (var(--uc-navigationbar-width)) - var(--uc-buttons-width) - var(--uc-window-drag-space-pre)) }
}

View File

@@ -82,7 +82,8 @@ Window controls will be all wrong without it
#nav-bar::before{ display:none !important }
/* Rules specific to window controls on left layout */
@media (-moz-platform: macos),
@media (-moz-bool-pref: "userchrome.force-window-controls-on-left.enabled"),
(-moz-platform: macos),
(-moz-gtk-csd-reversed-placement){
:root:not([inFullscreen]) #TabsToolbar-customization-target > .titlebar-spacer[type="pre-tabs"]{
width: var(--uc-window-drag-space-post) !important;

View File

@@ -20,7 +20,8 @@ linux_gtk_window_control_patch.css
visibility: visible !important;
}
@media (-moz-gtk-csd-reversed-placement),
@media (-moz-bool-pref: "userchrome.force-window-controls-on-left.enabled"),
(-moz-gtk-csd-reversed-placement),
(-moz-platform: macos){
.titlebar-buttonbox-container{ left:0; right: unset !important; }
}
@@ -72,6 +73,13 @@ linux_gtk_window_control_patch.css
}
:root[inFullscreen] #toolbar-menubar > .titlebar-buttonbox-container{ display: flex !important; }
@media (-moz-bool-pref: "browser.fullscreen.autohide"){
#main-window[inFullscreen]:not([inDOMFullscreen]) > body::after{
margin-bottom: 1px;
}
:root[inFullscreen] #navigator-toolbox:not(:hover) .titlebar-buttonbox-container{ display: none !important; }
}
@supports -moz-bool-pref("browser.fullscreen.autohide"){
#main-window[inFullscreen]:not([inDOMFullscreen]) > body::after{
margin-bottom: 1px;

View File

@@ -19,7 +19,8 @@ have menubar permanently enabled and want it on top
right:0;
height: 40px;
}
@media (-moz-gtk-csd-reversed-placement),
@media (-moz-bool-pref: "userchrome.force-window-controls-on-left.enabled"),
(-moz-gtk-csd-reversed-placement),
(-moz-platform: macos){
.titlebar-buttonbox-container{ left:0; right: unset !important; }
}

View File

@@ -63,7 +63,8 @@ See the above repository for updates as well as full license text. */
}
/* Rules for window controls on left layout */
@media (-moz-gtk-csd-reversed-placement),
@media (-moz-bool-pref: "userchrome.force-window-controls-on-left.enabled"),
(-moz-gtk-csd-reversed-placement),
(-moz-platform: macos){
: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)
@@ -71,6 +72,14 @@ See the above repository for updates as well as full license text. */
:root[sizemode="fullscreen"] #TabsToolbar > .titlebar-buttonbox-container:last-child,
:root[sizemode="fullscreen"] #window-controls{ right: unset }
}
@media (-moz-bool-pref: "userchrome.force-window-controls-on-left.enabled"){
.titlebar-buttonbox-container{
order: -1 !important;
}
.titlebar-buttonbox{
flex-direction: row-reverse;
}
}
/* 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"){