From df3e1adc0809f03411d031f4c3a5eb907820e2ba Mon Sep 17 00:00:00 2001 From: MS_Y Date: Mon, 29 Nov 2021 12:26:28 +0900 Subject: [PATCH] Add: Show close button on background tab only on hover #280 --- Tips.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Tips.md b/Tips.md index ed63657..6d7c2dc 100644 --- a/Tips.md +++ b/Tips.md @@ -318,6 +318,33 @@ And also use this code: } ``` +## Show close button on background tab only on hover + +```css +.tabbrowser-tab:not([visuallyselected]) .tab-close-button { + visibility: collapse !important; + opacity: 0; +} +.tabbrowser-tab:hover .tab-close-button { + visibility: visible !important; + opacity: 1; +} + +/* Animate */ +@media (prefers-reduced-motion: no-preference) { + /* Fade out */ + .tabbrowser-tab:not([visuallyselected]) .tab-close-button { + transition: opacity 0.1s var(--animation-easing-function) !important; + } + + /* Fade in */ + .tabbrowser-tab:hover .tab-close-button { + transition: opacity 0.25s var(--animation-easing-function) !important; + } +} +``` + + ## Account Panel Layout **Original**