mobile-config-firefox/chrome/click_selected_tab_to_focus_urlbar.css

42 lines
1.5 KiB
CSS
Raw Normal View History

2020-05-22 05:13:58 +00:00
/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/click_selected_tab_to_focus_urlbar.css made available under Mozilla Public License v. 2.0
See the above repository for updates as well as full license text. */
2019-05-21 13:42:05 +00:00
/* Clicking selected tab selects focuses urlbar */
/* Selected tab cannot be normally clicked (right-,middle- or left-clicked) EXCEPT from the tab icon */
/* Clicking selected pinned tab doesn't focus urlbar by default since I expect you might not want to change pinned tab address - see below */
/* Make selected tab unclickable so click goes to the capture box, obviously it can't be clicked at all anymore */
/* remove the :not([pinned]) bit to make clicking pinned tab AROUND the tab-icon focus urlbar*/
.tabbrowser-tab:not([pinned])[selected]{ pointer-events: none }
/* Add back pointer-events to several elements so UI remains usable */
/* The selected tab can be clicked normally from the icon */
#tabbrowser-tabs toolbarbutton,
.tabbrowser-tab,
.tabbrowser-tab .tab-close-button,
.tabbrowser-tab .tab-icon-image{
2019-05-31 21:13:51 +00:00
pointer-events: auto
2019-05-21 13:42:05 +00:00
}
/* Invisible capture box behind tabs*/
:root:not([customizing]) #urlbar-input-container::before{
2019-05-31 21:13:51 +00:00
position: fixed;
display: block;
2019-05-31 21:13:51 +00:00
top: 0;
left: 0;
width: calc(100vw - 138px);
height: var(--tab-min-height);
content: "";
2019-05-21 13:42:05 +00:00
}
#urlbar-input-container:focus-within::before{ display: none !important; }
2019-05-21 13:42:05 +00:00
/* Make tabs appear over the invisible box */
:root:not([customizing]) #tabbrowser-tabs{
2019-05-31 21:13:51 +00:00
position: relative;
z-index: 1;
pointer-events: none
}