Timvde / UserChrome-Tweaks

A community maintained repository of userChrome.css tweaks for Firefox
GNU General Public License v3.0
1.25k stars 122 forks source link

show-bookmarks-only-on-newtab.css hides bookmarks toolbar anywhere in FF 72 #158

Open Shished opened 4 years ago

Shished commented 4 years ago

When show-bookmarks-only-on-newtab.css tweak is active, bookmarks toolbar does not appears anywhere in Firefox 72.

eiyey commented 4 years ago

A solution for this would be greatly appreciated.

Brawlence commented 4 years ago

I switched to this one and it's pretty neat. Ditto behavior + show when the url field has focus. https://github.com/MrOtherGuy/firefox-csshacks/blob/master/chrome/autohide_bookmarks_toolbar.css

@MrOtherGuy, mind if we include it in this collection on your behalf?

MrOtherGuy commented 4 years ago

Feel free to include it. Or a variation of it in case it's not desireable to show it when toolbox is hovered, which is the default behavior on my stylesheet .

unalignedcoder commented 4 years ago

This is broken in 72+ because the title of tabs is not contained in the [title] property of #main-window anymore, but in the tag contained within it.</p> <p>Showing on hover or clicking is neat, but it's very different from showing only on NewTab. For this, the script needs to know what tab is active, and reading its title seems to be the only way.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/lianglee"><img src="https://avatars.githubusercontent.com/u/805066?v=4" />lianglee</a> commented <strong> 4 years ago</strong> </div> <div class="markdown-body"> <p>So whats the solution?</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/sweeeneey"><img src="https://avatars.githubusercontent.com/u/60924557?v=4" />sweeeneey</a> commented <strong> 4 years ago</strong> </div> <div class="markdown-body"> <p>I don't think there is one in userChrome.css with the way tabs are structured now, and the current css selectors available. Developers have been hoping for a selector that can go in the child -> parent direction for a couple of decades now, but it's been perpetually off on the horizon due to potential performance concerns. Maybe someday <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/:has">:has()</a> will be supported by Firefox.</p> <p>Seems like this probably needs an extension, or userChrome.js at this point.</p> <p>If :has() was available, I think you could do something like:</p> <p><code>#main-window:has(.tabbrowser-tab[label="New Tab"][selected="true"]) #PersonalToolbar {visibility: visible !important;}</code></p> </div> </div> <div class="page-bar-simple"> </div> <div class="footer"> <ul class="body"> <li>© <script> document.write(new Date().getFullYear()) </script> Githubissues.</li> <li>Githubissues is a development platform for aggregating issues.</li> </ul> </div> <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script> <script src="/githubissues/assets/js.js"></script> <script src="/githubissues/assets/markdown.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/highlight.min.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/go.min.js"></script> <script> hljs.highlightAll(); </script> </body> </html>