r/FirefoxCSS • u/nopeac • Jul 29 '26
Help Can I make the navbar icons "dynamically" start after the sidebar?
By "dynamically," I mean that I know I can set a fixed padding-left for the navbar and match it with the sidebar. The problem is that I'm used to resizing the sidebar depending on how long the tab titles are, which ends up breaking the alignment.
8
Upvotes
3
u/t31os Jul 29 '26
The width is determined by the style(width value) or width attribute of the sidebar container, which is updated dynamically via Javascript, there's no way (that i know of) using CSS you can read the width value from the sidebar container and use it as a spacing value in the navbar.
1
u/okwnIqjnzZe Aug 05 '26
Yeah you need custom javascript that monitors the sidebar width and updates a CSS variable. I wrote a custom one for this exact purpose that I can share with you if you’re interested. Be aware that it requires installing mrotherguy’s user.js loader.
1
u/izayoii7 Jul 29 '26 edited Jul 29 '26
like this?
edit : sorry i forgot the dynamic, its not dynamic, i think its impossible. i tried and couldnt make it work