From b0ed451d7b68797ef0fa1133c75b9f99d62dc46e Mon Sep 17 00:00:00 2001 From: MrOtherGuy Date: Sat, 26 Jun 2021 09:57:25 +0300 Subject: [PATCH] make sure the line animates only in hovered nonselected tabs that should have already been the case previously, but if one were to use some other custom style that added .tab-background::before pseudo element, then all tabs would have a playing animation which would have trashed performance. --- chrome/non_floating_sharp_tabs.css | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/chrome/non_floating_sharp_tabs.css b/chrome/non_floating_sharp_tabs.css index cb1e44f..30b926c 100644 --- a/chrome/non_floating_sharp_tabs.css +++ b/chrome/non_floating_sharp_tabs.css @@ -83,11 +83,12 @@ See the above repository for updates as well as full license text. */ } /* Photon-like tab on hover animation for the top line */ @keyframes tab-line-anim{ from{ margin-inline: 20px } to { margin-inline: 0 } } -.tab-background::before{ animation: tab-line-anim 160ms } + +.tab-stack:hover > .tab-background::before{ animation: tab-line-anim 160ms } /* Disable animation for selected and pinned tabs */ .tabbrowser-tab[pinned] > .tab-stack > .tab-background::before, -.tab-background[selected]{ animation: none } +.tab-background[selected]::before{ animation: none !important } /* moves context-line to the bottom */ .tab-context-line{ -moz-box-ordinal-group: 2; margin-inline: 10px !important; } \ No newline at end of file