Auto hide panels and sidebar
-
In the 6.2 update, there was a change how auto-hiding of sidebar panels behaves.
If you open the sidebar, switch around the panels and click away, it used to hide the whole sidebar. Now it only hides panel and keeps sidebar displayed.This really annoyed me and I thought it is a bug, but apparently it is the intended behaviour.
So I decided to somewhat restore previous behaviour with few lines of CSS.Preparation:
In the Vivaldi settings, I have disabled panel switch, enabled floating panels and disabled closing of unused panels. Then, I opened the sidebar using F4, so it's permanently opened and floats over the page.And then, I made a custom CSS:
/* maximized window */ #browser.maximized div#panels-container { width: 1px !important; position: absolute !important; padding-left: 1px; opacity: 0; border: none; } /* in maximized window, highlight it a bit on hover */ #browser.maximized div#panels-container:hover { opacity: .6; } /* non-maximized window */ div#panels-container { width: 10px !important; overflow: hidden; position: relative !important; padding-left: 10px; opacity: 1; border-right: 1px solid var(--colorBorder); } /* after clicking the bar, during hovering over the panels */ div#panels-container:active, div#panels-container:has(#panels:hover, button:hover), #browser.maximized div#panels-container:active, #browser.maximized div#panels-container:has(#panels:hover, button:hover) { width: 35px !important; overflow: visible; opacity: 1; padding-left: 0; border: none; }
This makes the sidebar 1px wide and transparent (or 10px opaque if not maximized), acting like a panel switch.
If you move cursor to the edge of the window (over the remaining pixels of sidebar) and click there, it shows the sidebar and panels and keep it displayed until you move mouse away from it.Few problems with this:
- Probably doesn't work with sidebar on the right, there's a couple of lines specific for left sidebar.
- It's very hard to show the sidebar if maximized browser window is not on the leftmost monitor.
- There's no way to show the sidebar other than by clicking this switcher.
- Previously, the sidebar got hidden after clicking outside it. I can't do that with CSS, so it hides after cursor leaves it.
- I didn't really test is that much, hopefully it's not broken without the rest of my CSS changes.
I share it here hoping I'm not the only one who got annoyed by this change.
-
For real man, thank you! This feels so much more comfortable than before. It may not be 100% perfect, but I tip my hat to ya for your hard work
-
No need for any .css.