mobile-config-firefox/chrome/combined_favicon_and_tab_close_button.css
2021-05-09 07:47:17 +03:00

51 lines
1.8 KiB
CSS

/* 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. */
/* 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;
margin-inline: -1px -19px !important;
z-index: -1;
visibility: hidden;
width: unset !important;
}
.tabbrowser-tab[pinned] .tab-close-button{ display: none !important; }
.tabbrowser-tab:hover .tab-close-button{
background-color: var(--lwt-selected-tab-background-color,var(--toolbar-bgcolor)) !important;
background-image: linear-gradient(var(--toolbarbutton-hover-background),var(--toolbarbutton-hover-background))
}
@media (-moz-proton){
.tab-close-button{
margin-inline: -4px -20px !important;
padding-inline-start: 7px !important;
}
}
/**** 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 ***/
/*
.tab-icon-stack:hover ~ .tab-close-button, .tab-close-button:hover{ visibility: visible; z-index: 1 }
*/
/*** Option 2 - No icon - always show close-button ***/
/*
.tab-icon-stack:hover ~ .tab-close-button,
.tab-close-button:hover,
.tabbrowser-tab:not([image]) .tab-close-button{ visibility: visible; z-index: 1 }
.tabbrowser-tab:not([image]) .tab-close-button{ margin-inline-end: 0 !important; }
*/
/*** Option 3 - No icon - show close-button when cursor is over the tab ***/
.tab-icon-stack:hover ~ .tab-close-button,
.tab-close-button:hover,
.tabbrowser-tab:not([image]):hover .tab-close-button{ visibility: visible; z-index: 1; }
.tabbrowser-tab:not([image]):hover .tab-close-button{ margin-inline-end: 0 !important; }