2020-05-22 05:13:58 +00:00
|
|
|
/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/combined_favicon_and_tab_close_button.css made available under Mozilla Public License v. 2.0
|
|
|
|
See the above repository for updates as well as full license text. */
|
|
|
|
|
2018-12-31 11:34:01 +00:00
|
|
|
/* Show tab close button when cursor is over the tab icon */
|
|
|
|
|
|
|
|
.tab-close-button{
|
|
|
|
-moz-box-ordinal-group: 0;
|
|
|
|
display: -moz-box !important;
|
|
|
|
position: relative;
|
2021-04-27 10:15:16 +00:00
|
|
|
width: calc(16px + var(--inline-tab-padding)) !important;
|
|
|
|
margin-inline: 0 calc(-16px - var(--inline-tab-padding) / 2) !important;
|
|
|
|
padding-inline: 0px !important;
|
2018-12-31 11:34:01 +00:00
|
|
|
z-index: -1;
|
|
|
|
visibility: hidden;
|
|
|
|
}
|
2019-10-10 17:51:46 +00:00
|
|
|
.tabbrowser-tab[pinned] .tab-close-button{ display: none !important; }
|
2021-04-27 10:15:16 +00:00
|
|
|
.tab-close-button:hover{ background-color: var(--lwt-selected-tab-background-color) !important; }
|
2018-12-31 14:04:32 +00:00
|
|
|
|
2018-12-31 11:34:01 +00:00
|
|
|
.tabbrowser-tab[selected] .tab-close-button:hover{ background-color: var(--lwt-selected-tab-background-color, var(--toolbar-bgcolor)); }
|
2018-12-31 14:04:32 +00:00
|
|
|
|
|
|
|
/**** ONLY USE ONE OF THE FOLLOWING ****/
|
|
|
|
/**** These select the behavior of a scenario where the page has no favicon ****/
|
|
|
|
|
|
|
|
/*** Option 1 - no favicon - no close-button ***/
|
|
|
|
|
|
|
|
/*
|
2021-04-27 10:15:16 +00:00
|
|
|
.tab-icon-stack:hover ~ .tab-close-button, .tab-close-button:hover{ visibility: visible; z-index: 1 }
|
2018-12-31 14:04:32 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/*** Option 2 - No icon - always show close-button ***/
|
|
|
|
|
|
|
|
/*
|
2021-04-27 10:15:16 +00:00
|
|
|
.tab-icon-stack:hover ~ .tab-close-button,
|
2018-12-31 14:04:32 +00:00
|
|
|
.tab-close-button:hover,
|
2021-04-27 10:15:16 +00:00
|
|
|
.tabbrowser-tab:not([image]) .tab-close-button{ visibility: visible; z-index: 1 }
|
|
|
|
.tabbrowser-tab:not([image]) .tab-close-button{ margin-right:0px !important; }
|
2018-12-31 14:04:32 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/*** Option 3 - No icon - show close-button when cursor is over the tab text ***/
|
|
|
|
|
2021-04-27 10:15:16 +00:00
|
|
|
.tab-icon-stack:hover ~ .tab-close-button,
|
2018-12-31 14:04:32 +00:00
|
|
|
.tab-close-button:hover,
|
2021-04-27 10:15:16 +00:00
|
|
|
.tabbrowser-tab:not([image]) .tab-label-container:hover ~ .tab-close-button{ visibility: visible; z-index: 1; }
|
|
|
|
.tabbrowser-tab:not([image]) .tab-label-container:hover ~ .tab-close-button,
|
|
|
|
.tabbrowser-tab:not([image]) .tab-close-button:hover { margin-inline-end: 0 !important; }
|