Skip to content

Commit

Permalink
Use @media for -moz-bool-pref instead of @supports
Browse files Browse the repository at this point in the history
  • Loading branch information
catboyengie authored and rafaelmardojai committed Nov 21, 2023
1 parent 1c32013 commit ab83079
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions theme/extensions/tab-center-reborn.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@supports -moz-bool-pref("gnomeTheme.extensions.tabCenterReborn") {
@media (-moz-bool-pref: "gnomeTheme.extensions.tabCenterReborn") {
:root {
--delay: 0s;
--transition-time: 0.2s;
Expand Down Expand Up @@ -137,7 +137,7 @@
}
}

@supports -moz-bool-pref("gnomeTheme.extensions.tabCenterReborn.alwaysOpen") {
@media (-moz-bool-pref: "gnomeTheme.extensions.tabCenterReborn.alwaysOpen") {
#sidebar-box[sidebarcommand*="tabcenter"] #sidebar,
#sidebar-box[sidebarcommand*="tabcenter"] {
min-width: 10vw !important;
Expand All @@ -158,4 +158,4 @@
max-width: 250px !important;
}
}
}
}
2 changes: 1 addition & 1 deletion theme/parts/buttons-fixes.css
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ button.close {
}

/* OPTIONAL: Hide unified-extensions-button */
@supports -moz-bool-pref("gnomeTheme.hideUnifiedExtensions") {
@media (-moz-bool-pref: "gnomeTheme.hideUnifiedExtensions") {
#unified-extensions-button {
display: none;
}
Expand Down
2 changes: 1 addition & 1 deletion theme/parts/csd.css
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
}

/* OPTIONAL: Allow draging the window from headerbar buttons */
@supports -moz-bool-pref("gnomeTheme.dragWindowHeaderbarButtons") {
@media (-moz-bool-pref: "gnomeTheme.dragWindowHeaderbarButtons") {
:root[tabsintitlebar] #nav-bar *,
:root[tabsintitlebar] #titlebar .titlebar-button,
:root[tabsintitlebar][inFullscreen] #window-controls toolbarbutton {
Expand Down
16 changes: 8 additions & 8 deletions theme/parts/tabsbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ tab {
}

/* OPTIONAL: Hide single tab */
@supports -moz-bool-pref("gnomeTheme.hideSingleTab") {
@media (-moz-bool-pref: "gnomeTheme.hideSingleTab") {
#tabbrowser-tabs tab:only-of-type,
#tabbrowser-tabs tab:only-of-type ~ toolbarbutton,
#tabbrowser-tabs tab:only-of-type ~ #tabbrowser-arrowscrollbox-periphery {
Expand All @@ -523,7 +523,7 @@ tab {
}

/* OPTIONAL: Use normal width tabs */
@supports -moz-bool-pref("gnomeTheme.normalWidthTabs") {
@media (-moz-bool-pref: "gnomeTheme.normalWidthTabs") {
.tabbrowser-tab:not([style^="max-width"]):not([pinned]),
.tabbrowser-tab[style^="max-width: 100px !important;"]:not([pinned]) {
max-width: 225px !important;
Expand All @@ -532,7 +532,7 @@ tab {
}

/* OPTIONAL: Add more contrast to the active tab */
@supports -moz-bool-pref("gnomeTheme.activeTabContrast") {
@media (-moz-bool-pref: "gnomeTheme.activeTabContrast") {
.tab-background[selected=true]:not(#hack),
:root:not(:-moz-window-inactive) .tabbrowser-tab:hover > .tab-stack > .tab-background:not(#hack) {
background: var(--gnome-tabbar-tab-active-background-contrast) !important;
Expand All @@ -544,7 +544,7 @@ tab {
}

/* OPTIONAL: Show the close button on the selected tab only */
@supports -moz-bool-pref("gnomeTheme.closeOnlySelectedTabs") {
@media (-moz-bool-pref: "gnomeTheme.closeOnlySelectedTabs") {
/* Hide the close buttons on hover */
.tabbrowser-tab:not([selected="true"]):hover .tab-close-button {
visibility: hidden !important;
Expand All @@ -561,7 +561,7 @@ tab {
}

/* OPTIONAL: Use tabs as headerbar */
@supports -moz-bool-pref("gnomeTheme.tabsAsHeaderbar") {
@media (-moz-bool-pref: "gnomeTheme.tabsAsHeaderbar") {
/* Rearrange bars */
#navigator-toolbox #titlebar {
order: 0;
Expand All @@ -579,7 +579,7 @@ tab {
order: 4;
}

@supports -moz-bool-pref("gnomeTheme.bookmarksToolbarUnderTabs") {
@media (-moz-bool-pref: "gnomeTheme.bookmarksToolbarUnderTabs") {
#navigator-toolbox #PersonalToolbar {
order: 2 !important;
}
Expand Down Expand Up @@ -616,7 +616,7 @@ tab {
}

/* Blend single tab into whole bar */
@supports -moz-bool-pref("gnomeTheme.hideSingleTab") {
@media (-moz-bool-pref: "gnomeTheme.hideSingleTab") {
#tabbrowser-tabs tab[first-visible-tab="true"][last-visible-tab="true"]:not([pinned]),
#tabbrowser-tabs tab[first-visible-tab="true"][last-visible-tab="true"]:not([pinned]) ~ toolbarbutton,
#tabbrowser-tabs tab[first-visible-tab="true"][last-visible-tab="true"]:not([pinned]) ~ #tabbrowser-arrowscrollbox-periphery {
Expand All @@ -639,7 +639,7 @@ tab {
margin-right: -16px;
}
/* Override normal width tabs */
@supports -moz-bool-pref("gnomeTheme.normalWidthTabs") {
@media (-moz-bool-pref: "gnomeTheme.normalWidthTabs") {
#tabbrowser-tabs tab[first-visible-tab="true"][last-visible-tab="true"]:not([pinned]):not([style^="max-width"]),
#tabbrowser-tabs tab[first-visible-tab="true"][last-visible-tab="true"][style^="max-width: 100px !important;"]:not([pinned]) {
max-width: 100% !important;
Expand Down
4 changes: 2 additions & 2 deletions theme/parts/toolbox.css
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,14 @@ findbar:-moz-window-inactive description,
}

/* OPTIONAL: Hide WebRTC indicator */
@supports -moz-bool-pref("gnomeTheme.hideWebrtcIndicator") {
@media (-moz-bool-pref: "gnomeTheme.hideWebrtcIndicator") {
#webrtcIndicator {
display: none;
}
}

/* OPTIONAL: Move Bookmarks toolbar under tabs */
@supports -moz-bool-pref("gnomeTheme.bookmarksToolbarUnderTabs") {
@media (-moz-bool-pref: "gnomeTheme.bookmarksToolbarUnderTabs") {
#navigator-toolbox #titlebar {
order: 2 !important;
}
Expand Down
2 changes: 1 addition & 1 deletion theme/symbolic-tab-icons.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
}

/* OPTIONAL: Make all tab icons look kinda like symbolic icons */
@supports -moz-bool-pref("gnomeTheme.symbolicTabIcons") {
@media (-moz-bool-pref: "gnomeTheme.symbolicTabIcons") {
tab .tab-icon-image {
filter: var(--gnome-convert-icon-to-symbolic-hack-filter);
}
Expand Down
2 changes: 1 addition & 1 deletion theme/system-icons.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
}

/* OPTIONAL: Use system theme icons instead of Adwaita icons included by theme */
@supports -moz-bool-pref("gnomeTheme.systemIcons") {
@media (-moz-bool-pref: "gnomeTheme.systemIcons") {

/* Window buttons */
:root[tabsintitlebar] #titlebar .titlebar-button .toolbarbutton-icon,
Expand Down

0 comments on commit ab83079

Please sign in to comment.