MrOtherGuy / firefox-csshacks

Collection of userstyles affecting the browser
Mozilla Public License 2.0
3.13k stars 309 forks source link

autohide_sidebar.css reflows top buttons of sidebery when collapsed #296

Open guraltsev opened 1 year ago

guraltsev commented 1 year ago

Thank you for maintaining this repository.

I added the autohide_sidebar.css but there seems to be something wrong with the current sidebery version (I use it for vertical tree-style tabs).

When the tab bar is collapsed when unhovered what happens is this:

image

while it is like this when expanded:

image

I circled the weird space that appears.

Interestingly, if I add new panels (control buttons) like this: image

When collapsed, it still gives: image

Actually, the more the "panels" the more the extra white space!

image vs image

I think that the space for those icons gets reflowed. I tried looking through the code but I am too inexperienced to fix it.

Thank you!

MrOtherGuy commented 1 year ago

This sounds like something you need to change on Sidebery's side. It kind looks as if Sidebery uses a flex-container for that button-row and then wraps the items that can't fit horizontally - so essentially it wraps them all to separate lines. The solution would be to make it not do that.

guraltsev commented 1 year ago

Thanks for the head's up! I found this option for Sidebery that is relevant and actually solves the problem:

image

I will note this on the Sidebery's side so that people know of this issue. Actually, Sidebery can inject custom CSS. A possible solution to have both the icons on multiple lines and correct collapsing functionality would be to have the flex container have a fixed width.

Thank you again!

MrOtherGuy commented 1 year ago

Yeah, true - for so setups it would be necessary to have them on multiple lines. So yeah, it just has to not depend on the sidebar width, which is the "window width" for the sidebar document - or at least there needs to be a minimum width the flex-container can shrink to.

Still, that's something that Sidebery has to do. I can't do that from the autohide_sidebar side - at least not without breaking some other things.

LunarFR commented 11 months ago

Could you please tell me in depth how you fixed this error? don't really know what to change to fixed width and stuff.

MrOtherGuy commented 11 months ago

Based on what the @guraltsev described I'd say that on Sidebery options find "Layout > Show navigation bar in one line" and make sure that option is turned on.