From acc7b44d12bf0d4fbaf794f3827fa3b8724d71d8 Mon Sep 17 00:00:00 2001 From: MrOtherGuy Date: Wed, 1 May 2019 07:56:13 +0300 Subject: [PATCH] create a copy of minimal toolbarbuttons with slightly different behavior --- chrome/minimal_toolbarbuttons_v2.css | 50 ++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 chrome/minimal_toolbarbuttons_v2.css diff --git a/chrome/minimal_toolbarbuttons_v2.css b/chrome/minimal_toolbarbuttons_v2.css new file mode 100644 index 0000000..f692060 --- /dev/null +++ b/chrome/minimal_toolbarbuttons_v2.css @@ -0,0 +1,50 @@ +/* Create a circular placeholder for toolbarbutton and downscale to hide them */ + +/* +Difference to minimal_toolbarbuttons.css: +Applies some restrictions on what conditions the real icon is shown, +such as, nav-bar buttons are not shown when urlbar is hovered +*/ +/* Create a placeholder for buttons */ +#urlbar-container:hover ~ .toolbarbutton-1:not([open]), +#urlbar-container:hover ~ #stop-reload-button > .toolbarbutton-1, +#nav-bar > #nav-bar-customization-target:hover ~ toolbarbutton:not([open]), +#nav-bar > #nav-bar-customization-target:hover ~ toolbaritem:not([open]), +toolbar .toolbarbutton-1:not([open]), +.titlebar-button, +#tabbrowser-tabs toolbarbutton{ + background-image: radial-gradient(circle at center, var(--lwt-toolbarbutton-icon-fill) 0,var(--lwt-toolbarbutton-icon-fill) 10%,transparent 15% ); +} +/* Hide placeholder on hover */ +toolbar:hover .toolbarbutton-1, +.titlebar-buttonbox:hover > .titlebar-button, +#tabbrowser-tabs:hover toolbarbutton{ background-image: none } + +#urlbar-container:hover ~ .toolbarbutton-1:not([open]) > *, +#urlbar-container:hover ~ #stop-reload-button > .toolbarbutton-1 > *, +#nav-bar > #nav-bar-customization-target:hover ~ toolbarbutton:not([open]) > *, +#nav-bar > #nav-bar-customization-target:hover ~ toolbaritem:not([open]) > *, +#titlebar:hover ~ toolbar .toolbarbutton-1 > *, +toolbar .toolbarbutton-1 > *, +#tabbrowser-tabs toolbarbutton > *, +.titlebar-button > *{ + transform: scale(0); + transition: transform 82ms linear !important; +} + +toolbar:hover .toolbarbutton-1:not(#PanelUI-menu-button) > *, +#nav-bar-overflow-button:hover + #PanelUI-button > .toolbarbutton-1 > stack, +#PanelUI-menu-button:hover > stack, +#tabbrowser-tabs:hover toolbarbutton > *, +.toolbarbutton-1[open] > *, +.titlebar-buttonbox:hover > .titlebar-button > *{ + transform: scale(1) +} + +/* Urlbar icons, this way they show colors is applicable */ +.urlbar-icon{ transition: transform 82ms linear !important; } +#urlbar:not(:hover) .urlbar-icon:not([open]){ transform: scale(0.3) } + +/* The menu button has some margin on non-compact density which creates annnoying transitions */ +/* Lets remove that as well as border since this is minimal style anyway */ +#PanelUI-button{ border-left: 0px !important; margin-left: 0px !important; }