UserChrome-Tweaks icon indicating copy to clipboard operation
UserChrome-Tweaks copied to clipboard

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

Open Shished opened this issue 5 years ago • 6 comments

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

Shished avatar Jan 08 '20 17:01 Shished

A solution for this would be greatly appreciated.

eiyey avatar Jan 10 '20 03:01 eiyey

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?

Brawlence avatar Jan 10 '20 18:01 Brawlence

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 .

MrOtherGuy avatar Jan 10 '20 19:01 MrOtherGuy

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>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>

unalignedcoder avatar Jan 11 '20 08:01 unalignedcoder

So whats the solution?

lianglee avatar Jan 30 '20 22:01 lianglee

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 :has() will be supported by Firefox.

Seems like this probably needs an extension, or userChrome.js at this point.

If :has() was available, I think you could do something like:

#main-window:has(.tabbrowser-tab[label="New Tab"][selected="true"]) #PersonalToolbar {visibility: visible !important;}

sweeeneey avatar Feb 17 '20 10:02 sweeeneey