From cc6603de10d6ef438e3a58211eff10fbb2211a90 Mon Sep 17 00:00:00 2001 From: MrOtherGuy Date: Tue, 3 Jan 2023 16:30:29 +0200 Subject: [PATCH] create overlay_sidebar_header.css --- chrome/overlay_sidebar_header.css | 37 +++++++++++++++++++++++++++++++ html_resources/tagmap.json | 3 ++- tags.csv | 1 + 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 chrome/overlay_sidebar_header.css diff --git a/chrome/overlay_sidebar_header.css b/chrome/overlay_sidebar_header.css new file mode 100644 index 0000000..5178d27 --- /dev/null +++ b/chrome/overlay_sidebar_header.css @@ -0,0 +1,37 @@ +/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/overlay_sidebar_header.css made available under Mozilla Public License v. 2.0 +See the above repository for updates as well as full license text. */ + +/* This is a hack that only "kinda" works! */ +/* Changes sidebar header to appear as small "notch" at the top of the sidebar. Hovering it will show full sidebar so you can have access to sidebar switcher button. The caveat is that you need to click the switcher button TWICE - otherwise the header and switcher popup will hide themselver as soon as cursor is moved on top of the switcher popup. */ + +#sidebar-header{ + display: flex; + position: absolute; + width: inherit; + visibility: hidden; + background-color: inherit; + -moz-user-focus: normal; +} +#sidebar-header::before{ + visibility: visible; + content: ""; + border-bottom-left-radius: 8px; + border-bottom-right-radius: 8px; + background-color: inherit; + border: 1px solid var(--chrome-content-separator-color); + border-top: none; + height: 8px; + width: 14px; + margin-top: -9px; + margin-inline-start: -4px; +} +#sidebar-switcher-target.active{ + pointer-events: none; +} +#sidebar-header:focus-within, +#sidebar-header:hover{ + visibility: visible; +} +#sidebar-spacer{ + flex-grow: 1; +} \ No newline at end of file diff --git a/html_resources/tagmap.json b/html_resources/tagmap.json index 62eba00..f6c8144 100644 --- a/html_resources/tagmap.json +++ b/html_resources/tagmap.json @@ -157,5 +157,6 @@ "window_control_fallback_for_custom_windows_theme.css":["window-control","buttons","colors","patch"], "window_control_force_linux_system_style.css":["window-control","buttons","icon"], "window_control_placeholder_support.css":["window-control","patch"], -"vertical_urlbar_one-off_items.css":["urlbar"] +"vertical_urlbar_one-off_items.css":["urlbar"], +"overlay_sidebar_header.css":["sidebar","hack"] } diff --git a/tags.csv b/tags.csv index d0f8806..1d62c3c 100644 --- a/tags.csv +++ b/tags.csv @@ -157,3 +157,4 @@ window_control_fallback_for_custom_windows_theme.css,window-control,buttons,colo window_control_force_linux_system_style.css,window-control,buttons,icon window_control_placeholder_support.css,window-control,patch vertical_urlbar_one-off_items.css,urlbar +overlay_sidebar_header.css,sidebar,hack