From 0af7342d1b68bfa7de308fd5c6205f7c407895e9 Mon Sep 17 00:00:00 2001 From: MrOtherGuy Date: Sat, 17 Jul 2021 14:12:40 +0300 Subject: [PATCH] rewrite autohide_tabstoolbar.css --- chrome/autohide_tabstoolbar.css | 35 +++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/chrome/autohide_tabstoolbar.css b/chrome/autohide_tabstoolbar.css index c7835ff..9fb5d1b 100644 --- a/chrome/autohide_tabstoolbar.css +++ b/chrome/autohide_tabstoolbar.css @@ -3,15 +3,30 @@ See the above repository for updates as well as full license text. */ /* Hide tabs unless cursor is on top of toolbar */ -@keyframes slidein{ - from{ margin-top: calc(0px - var(--tab-min-height)) } - to{ margin-top: 0 } +/* Dummy variable to support both versions 89-90 */ +:root{ --tab-block-margin: var(--proton-tab-block-margin) } + +:root:not([customizing]) #navigator-toolbox{ + position: relative; + z-index: 1; } -@keyframes slideout{ - from{ margin-top: var(--tab-min-height) } - to{ margin-top: 0 } + +:root:not([customizing]) #navigator-toolbox:hover, +:root:not([customizing]) #titlebar{ + margin-bottom: calc(0px - 2 * var(--tab-block-margin) - var(--tab-min-height)); +} +#TabsToolbar:not([customizing]){ visibility: hidden; transition: visibility 0ms linear 200ms } + +#navigator-toolbox, +#titlebar{ transition: margin-bottom 48ms ease-out 200ms } + +#navigator-toolbox:hover{ transition-delay: 0s } +#navigator-toolbox:hover > #titlebar{ + margin-bottom: 0px; + transition-delay: 0s; +} + +#navigator-toolbox:hover #TabsToolbar{ + visibility: visible; + transition-delay: 18ms } -#navigator-toolbox:not(:hover) > #titlebar{ -moz-appearance: none !important } -#navigator-toolbox:not(:hover) #TabsToolbar:not([customizing]) { visibility: collapse } -#navigator-toolbox:hover > #nav-bar:not([customizing]){ animation: slidein ease-out 48ms 1 } -#navigator-toolbox:not(:hover) > #nav-bar:not([customizing]){ animation: slideout ease-out 48ms 1 } \ No newline at end of file