Add an option to close only selected tabs. (#419)

This commit is contained in:
Pavel Sobolev 2022-07-20 02:38:22 +00:00 committed by GitHub
parent 0925b27659
commit db6feffe16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 36 additions and 15 deletions

View File

@ -188,6 +188,10 @@ Optional features can be enabled by creating new `boolean` preferences in `about
Add more contrast to the active tab. Add more contrast to the active tab.
- **Close only selected tabs** `gnomeTheme.closeOnlySelectedTabs`
Show the close button on the selected tab only.
- **System icons** `gnomeTheme.systemIcons` - **System icons** `gnomeTheme.systemIcons`
Use system theme icons instead of Adwaita icons included by theme. Use system theme icons instead of Adwaita icons included by theme.

View File

@ -467,3 +467,20 @@ tab {
background: var(--gnome-tabbar-tab-active-background-contrast) !important; background: var(--gnome-tabbar-tab-active-background-contrast) !important;
} }
} }
/* OPTIONAL: Show the close button on the selected tab only */
@supports -moz-bool-pref("gnomeTheme.closeOnlySelectedTabs") {
/* Hide the close buttons on hover */
.tabbrowser-tab:not([selected="true"]):hover .tab-close-button {
visibility: hidden !important;
opacity: 0 !important;
}
/* Hide the close button overlay on hover */
.tabbrowser-tab:not([pinned]):hover .tab-content::before {
--gnome-tabbar-tab-close-overlay-bg: unset;
}
/* Reset the overflow position of the tab label container */
.tabbrowser-tab:not([pinned]):not([selected="true"]):hover .tab-label-container[textoverflow="true"] {
margin-right: -16px;
}
}