From 101672f759a4ba22957582bfcf885e12a2be375c Mon Sep 17 00:00:00 2001 From: MrOtherGuy Date: Tue, 8 Jun 2021 20:53:34 +0300 Subject: [PATCH] create selected_tab_as_urlbar.css --- chrome/selected_tab_as_urlbar.css | 54 +++++++++++++++++++++++++++++++ html_resources/tagmap.json | 3 +- tags.csv | 1 + 3 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 chrome/selected_tab_as_urlbar.css diff --git a/chrome/selected_tab_as_urlbar.css b/chrome/selected_tab_as_urlbar.css new file mode 100644 index 0000000..a540e67 --- /dev/null +++ b/chrome/selected_tab_as_urlbar.css @@ -0,0 +1,54 @@ +/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/selected_tab_as_urlbar.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 horrible hack and absolutely requires click_selected_tab_to_focus_urlbar.css to work. In general it's pertty bad, but meh */ + +/* Also hides the nav-bar and shows main menu button next to window controls. And makes the selected tab expand a whole bunch */ + +/* Whole bunch of z-indexing */ +#main-window > body > box{ position: relative; z-index: 1 } +.urlbar-input-box{ z-index: -1 !important; } +#urlbar{ z-index: auto !important; } +#alltabs-button, +#PanelUI-button, +#nav-bar-overflow-button{ z-index: 2; position: relative } + + +#urlbar-input-container > :not(.urlbar-input-box){ visibility: hidden } + +#urlbar-background{ + background: transparent !important; + border: none !important; + box-shadow: none !important; +} +.urlbarView{ + background: var(--lwt-toolbar-field-focus); + border: 1px solid var(--lwt-toolbar-field-focus-border-color) !important; + z-index: 1; + padding: 6px; + border-radius: 6px; +} + +.tabbrowser-tab[selected][fadein]{ max-width: none !important; min-width: 200px !important } + +#navigator-toolbox:focus-within .tabbrowser-tab[selected] .tab-content{ + opacity: 0; +} +#navigator-toolbox:focus-within .tab-background[selected]{ + background-image: -moz-element(#urlbar-input) !important; + background-position: calc(var(--tab-inline-padding,4px) + 6px) 3px !important; + background-color: var(--lwt-toolbar-field-focus) !important; + background-size: auto !important; +} + +:root:not([customizing]) #titlebar{ margin-bottom: -40px } + +/* Oh and! also hide other buttons from the nav-bar because why not */ +#nav-bar-customization-target > toolbarbutton{ visibility: collapse } +#alltabs-button{ margin-right: 40px !important; } + +#nav-bar{ + padding-right: 138px; + box-shadow: none !important; + background-color: transparent !important; +} diff --git a/html_resources/tagmap.json b/html_resources/tagmap.json index 31bea68..db0711f 100644 --- a/html_resources/tagmap.json +++ b/html_resources/tagmap.json @@ -129,5 +129,6 @@ "autohide_main_toolbar.css":["toolbars","autohide","nav-bar"], "sharp_menupopup_corners.css":["popup","menu","proton"], "overlay_tab_audio_icons.css":["icon","tab"], -"custom_default_tab_favicons.css":["tab","icon"] +"custom_default_tab_favicons.css":["tab","icon"], +"selected_tab_as_urlbar.css":["hack"] } diff --git a/tags.csv b/tags.csv index b8faf19..b330a71 100644 --- a/tags.csv +++ b/tags.csv @@ -129,3 +129,4 @@ autohide_main_toolbar.css,toolbars,autohide,nav-bar sharp_menupopup_corners.css,popup,menu,proton overlay_tab_audio_icons.css,icon,tab custom_default_tab_favicons.css,tab,icon +selected_tab_as_urlbar.css,hack