Fixed fetching bool prefs on the CSS

This commit is contained in:
mr. M
2025-03-27 00:22:43 +01:00
parent baafa12967
commit e43f9729a7
14 changed files with 28 additions and 29 deletions

View File

@@ -644,8 +644,7 @@ var gZenVerticalTabsManager = {
} else {
try {
gURLBar.zenUpdateLayoutBreakout();
} catch (e) {
}
} catch (e) {}
}
// Always move the splitter next to the sidebar

View File

@@ -19,7 +19,7 @@
}
}
@media (-moz-bool-pref: 'zen.view.experimental-rounded-view') {
@media -moz-pref('zen.view.experimental-rounded-view') {
#tabbrowser-tabpanels {
mix-blend-mode: multiply;
-moz-osx-font-smoothing: grayscale;

View File

@@ -52,7 +52,7 @@
transition: background-color var(--inactive-window-transition);
}
@media (-moz-bool-pref: 'zen.theme.gradient') {
@media -moz-pref('zen.theme.gradient') {
&[animating='true']::after {
background: var(--zen-main-browser-background-old);
backdrop-filter: blur(5px);
@@ -61,7 +61,7 @@
}
}
@media (not (-moz-windows-mica)) and (-moz-bool-pref: 'zen.view.grey-out-inactive-windows') {
@media (not (-moz-windows-mica)) and -moz-pref('zen.view.grey-out-inactive-windows') {
transition: color var(--inactive-window-transition);
:root:not([zen-welcome-stage]) &:-moz-window-inactive {
color: var(--toolbox-textcolor-inactive);
@@ -173,7 +173,7 @@
}
}
@media (-moz-bool-pref: 'zen.widget.mac.mono-window-controls') {
@media -moz-pref('zen.widget.mac.mono-window-controls') {
.titlebar-buttonbox-container {
/* Draw 3 dots as background to represent the window controls,
all with the same cololr as the titlebar */

View File

@@ -8,7 +8,7 @@
:root[zen-compact-mode='true']:not([customizing]):not([inDOMFullscreen='true']) {
%include zen-tabs/vertical-tabs-topbuttons-fix.css
@media (-moz-bool-pref: 'zen.view.compact.hide-tabbar') or (-moz-bool-pref: 'zen.view.use-single-toolbar') {
@media -moz-pref('zen.view.compact.hide-tabbar') or -moz-pref('zen.view.use-single-toolbar') {
#zen-sidebar-web-panel-wrapper:has(#zen-sidebar-web-panel[pinned='true']) {
margin-left: var(--zen-sidebar-web-panel-spacing) !important;
}
@@ -77,7 +77,7 @@
/* When we have multiple toolbars and the top-toolbar is NOT being hidden,
* we need to adjust the top-padding of the toolbox to account for the
* extra toolbar height. */
@media not (-moz-bool-pref: 'zen.view.compact.hide-toolbar') {
@media not -moz-pref('zen.view.compact.hide-toolbar') {
&:not([zen-single-toolbar='true']) #navigator-toolbox:not([animate='true']) {
margin-top: var(--zen-toolbar-height) !important;
}
@@ -121,7 +121,7 @@
margin-left: 0 !important;
}
@media (-moz-bool-pref: 'zen.view.compact.color-sidebar') {
@media -moz-pref('zen.view.compact.color-sidebar') {
background: var(--zen-main-browser-background-toolbar) !important;
background-attachment: fixed !important;
background-size: 2000px !important; /* Dont ask me why */
@@ -285,7 +285,7 @@
}
}
@media (-moz-bool-pref: 'zen.view.compact.hide-toolbar') {
@media -moz-pref('zen.view.compact.hide-toolbar') {
&:not([zen-single-toolbar='true']) {
& #navigator-toolbox {
top: 0;
@@ -337,7 +337,7 @@
opacity: 0;
}
@media (-moz-bool-pref: 'zen.view.compact.color-toolbar') {
@media -moz-pref('zen.view.compact.color-toolbar') {
background-attachment: fixed;
background: var(--zen-main-browser-background-toolbar);
background-size: 100% 2000px;

View File

@@ -56,7 +56,7 @@
#tabbrowser-tabpanels:has(> [zen-split='true']),
#zen-splitview-overlay {
:root:not([zen-compact-mode='true']):not([customizing]) & {
@media (-moz-bool-pref: 'zen.view.compact.hide-toolbar') {
@media -moz-pref('zen.view.compact.hide-toolbar') {
& {
margin-top: calc(var(--zen-split-column-gap) * -1);
}

View File

@@ -296,7 +296,7 @@
}
}
@media not (-moz-bool-pref: 'zen.theme.gradient.show-custom-colors') {
@media not -moz-pref('zen.theme.gradient.show-custom-colors') {
#PanelUI-zen-gradient-generator-custom-colors {
display: none !important;
}

View File

@@ -12,7 +12,7 @@
z-index: 0;
}
@media (-moz-bool-pref: 'zen.workspaces.hide-default-container-indicator') {
@media -moz-pref('zen.workspaces.hide-default-container-indicator') {
.tabbrowser-tab[zenDefaultUserContextId='true'] .tab-context-line {
display: none !important;
}

View File

@@ -3,7 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
@media not (-moz-bool-pref: 'zen.tabs.vertical') {
@media not -moz-pref('zen.tabs.vertical') {
:root #browser {
display: flex !important;
flex-direction: column !important;

View File

@@ -1,6 +1,6 @@
height: var(--zen-toolbar-height);
@media (-moz-bool-pref: 'zen.view.hide-window-controls') {
@media -moz-pref('zen.view.hide-window-controls') {
& {
transition:
height 0.15s ease,
@@ -24,7 +24,7 @@ height: var(--zen-toolbar-height);
}
}
@media (-moz-bool-pref: 'zen.view.experimental-no-window-controls') {
@media -moz-pref('zen.view.experimental-no-window-controls') {
&:has(#PersonalToolbar[collapsed='true']) {
max-height: 0 !important;
overflow: hidden;

View File

@@ -19,7 +19,7 @@
height: var(--zen-toolbar-height);
}
@media (-moz-platform: macos) and (not (-moz-bool-pref: 'zen.view.mac.show-three-dot-menu')) {
@media (-moz-platform: macos) and (not -moz-pref('zen.view.mac.show-three-dot-menu')) {
&:not([customizing]) #PanelUI-button:not([open]):not([panelopen]) {
position: absolute;
opacity: 0;
@@ -38,7 +38,7 @@
}
}
@media (-moz-bool-pref: 'zen.tabs.vertical') {
@media -moz-pref('zen.tabs.vertical') {
:root:not([zen-window-buttons-reversed='true']) {
& .titlebar-buttonbox-container {
margin-left: auto;
@@ -294,7 +294,7 @@
}
}
@media (-moz-bool-pref: 'zen.tabs.dim-pending') {
@media -moz-pref('zen.tabs.dim-pending') {
&[pending='true'] .tab-icon-image {
opacity: 0.5;
}
@@ -734,7 +734,7 @@
}
}
}
@media (-moz-bool-pref: 'zen.view.sidebar-collapsed.hide-mute-button') {
@media -moz-pref('zen.view.sidebar-collapsed.hide-mute-button') {
& .tab-icon-overlay:is([soundplaying], [muted]):not([selected]) {
display: none !important;
:is(
@@ -992,7 +992,7 @@
opacity: 0.5;
}
@media (-moz-bool-pref: 'zen.tabs.show-newtab-vertical') {
@media -moz-pref('zen.tabs.show-newtab-vertical') {
#tabs-newtab-button {
display: flex !important;
transition: scale 0.1s ease;
@@ -1018,11 +1018,11 @@
--zen-colors-border: var(--zen-colors-tertiary);
}
@media (-moz-bool-pref: 'zen.view.show-newtab-button-top') {
@media -moz-pref('zen.view.show-newtab-button-top') {
order: -1;
}
@media (-moz-bool-pref: 'zen.view.show-newtab-button-border-top') and (not (-moz-bool-pref: 'zen.view.show-newtab-button-top')) {
@media -moz-pref('zen.view.show-newtab-button-border-top') and (not -moz-pref('zen.view.show-newtab-button-top')) {
#tabbrowser-arrowscrollbox:has(tab:not([hidden])) & {
margin-top: 15px;
position: relative;
@@ -1101,7 +1101,7 @@
background: var(--tab-selected-bgcolor);
}
@media (-moz-bool-pref: 'zen.theme.essentials-favicon-bg') {
@media -moz-pref('zen.theme.essentials-favicon-bg') {
&[visuallyselected] > .tab-stack > .tab-background {
&::after {
content: "";

View File

@@ -163,7 +163,7 @@
@media (-moz-windows-mica) or (-moz-platform: macos) {
background: transparent;
--zen-themed-toolbar-bg-transparent: transparent;
@media (-moz-bool-pref: 'zen.widget.windows.acrylic') {
@media -moz-pref('zen.widget.windows.acrylic') {
--zen-themed-toolbar-bg-transparent: color-mix(in srgb, var(--zen-themed-toolbar-bg) 35%, transparent 65%);
}
}

View File

@@ -464,7 +464,7 @@ button.popup-notification-dropmarker {
}
}
@media not (-moz-bool-pref: 'zen.urlbar.show-protections-icon') {
@media not -moz-pref('zen.urlbar.show-protections-icon') {
#tracking-protection-icon-container {
display: none !important;
}

View File

@@ -483,7 +483,7 @@
}
}
@media not (-moz-bool-pref: 'zen.workspaces.show-workspace-indicator') {
@media not -moz-pref('zen.workspaces.show-workspace-indicator') {
#zen-current-workspace-indicator-container {
display: none !important;
}

View File

@@ -181,7 +181,7 @@ groupbox h2 {
}
}
@media (-moz-bool-pref: 'zen.view.use-single-toolbar') {
@media -moz-pref('zen.view.use-single-toolbar') {
#zen-compact-mode-styles-form {
display: none;
}