From 85b1c9b4e73dd9209bcadef1d4ef24e870ace1f7 Mon Sep 17 00:00:00 2001 From: MrOtherGuy Date: Mon, 31 May 2021 23:52:10 +0300 Subject: [PATCH] create autohide_main_toolbar.css --- chrome/autohide_main_toolbar.css | 27 +++++++++++++++++++++++++++ html_resources/tagmap.json | 3 ++- tags.csv | 1 + 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 chrome/autohide_main_toolbar.css diff --git a/chrome/autohide_main_toolbar.css b/chrome/autohide_main_toolbar.css new file mode 100644 index 0000000..329354a --- /dev/null +++ b/chrome/autohide_main_toolbar.css @@ -0,0 +1,27 @@ +/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/autohide_main_toolbar.css made available under Mozilla Public License v. 2.0 +See the above repository for updates as well as full license text. */ + +/* This style hides the main toolbar (nav-bar) and shows it when the cursor is over the toolbar area as well as whenever the focus is inside nav-bar, such as when urlbar is focused. */ + +:root{ --uc-navbar-transform: -40px } +:root[uidensity="compact"]{ --uc-navbar-transform: -34px } + +:root[sessionrestored] #nav-bar, +:root[sessionrestored] #PersonalToolbar{ + transform: translateY(var(--uc-navbar-transform)) +} +#nav-bar{ + opacity: 0; + transition: opacity 200ms ease 1.8s, transform 400ms ease 1.8s !important; + position: relative; + z-index: 2 +} +#navigator-toolbox:focus-within > .browser-toolbar, +#navigator-toolbox:hover > .browser-toolbar{ + transform: translateY(0); + opacity: 1; + transition-duration: 500ms !important; + transition-delay: 0s !important; +} +#PersonalToolbar{ transition: transform 400ms ease 1.8s !important; position: relative; z-index: 1 } +:root[sessionrestored] > body > #browser{ margin-top: var(--uc-navbar-transform); } \ No newline at end of file diff --git a/html_resources/tagmap.json b/html_resources/tagmap.json index 33ebf91..40d0dff 100644 --- a/html_resources/tagmap.json +++ b/html_resources/tagmap.json @@ -125,5 +125,6 @@ "vertical_popup_menubar.css":["menubar","menu","toolbars","popup"], "window_control_fallback_for_custom_windows_theme.css":["window-control","buttons","colors","patch"], "window_control_placeholder_support.css":["window-control","patch"], -"non_floating_sharp_tabs.css":["tab","proton","buttons"] +"non_floating_sharp_tabs.css":["tab","proton","buttons"], +"autohide_main_toolbar.css":["toolbars","autohide","nav-bar"] } diff --git a/tags.csv b/tags.csv index 14f6a7b..b4a7189 100644 --- a/tags.csv +++ b/tags.csv @@ -125,3 +125,4 @@ vertical_popup_menubar.css,menubar,menu,toolbars,popup window_control_fallback_for_custom_windows_theme.css,window-control,buttons,colors,patch window_control_placeholder_support.css,window-control,patch non_floating_sharp_tabs.css,tab,proton,buttons +autohide_main_toolbar.css,toolbars,autohide,nav-bar