Only show panel in narrow window
-
Problem:
I find myself with a narrow window, and also with a web panel open.
Everything gets all squished up in this state. I only want the panel to be open, and I don't want to faff around with the "open in current tab" option. I want panel access, and given that the window is already narrow, I choose to not care about the currently open tab while I'm using the panel.Solution:
Incustom.css
@media screen and (max-width: 600px){ #panels-container.left:not(.icons) + #webview-container{ display: none } #panels-container.left:not(.icons) { width: 100% !important; max-width: 100% } }
Basically, when the vivaldi window gets smaller than 600px, give priority to the web panel if there is one currently open, else just behave as normal.
Note:
This relies on the current ordering of the html to not change. If the vivaldi devs ever dcide to put the#webview-container
div after the#panels-container
div, all hope is lost as css can't backtrack siblings. -