-
Hi all, This is a question for my understanding. The way I have TreeStyleTab set up currently, I have all of my tabs shown in TST's menu and I use userchrome to hide all tabs except for the currently active tab: /* Hide the native tabs */
#tabbrowser-tabs tab {
visibility: collapse;
}
/* Show the active tab */
#tabbrowser-tabs tab[selected="true"] {
visibility: visible;
} This works great and behaves exactly as I would expect. However, when dealing with groups of tabs, it would be nice to have all of the tabs in that group show up at the top (that is, a parent and all of its children). I suspect the default sorting of this should have the group flattened, just for convenience sake. At the moment though, I don't believe this is possible with just CSS styling. There do not appear to be any attributes I can target on the To prevent this from turning into an X-Y question, what I would like to do is be able to identify which tabs need to be visible so that I can unhide them. This could be done through appending a class to the tabs in the group, adding a new property, or programmatically querying the plugin for the tab ids of the active group and then either individually styling or adding a class as suggested previously. I have two questions then:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I don't think this will be possible via userChrome.css. What you want (I think) is to have a tree\group being displayed ... which is basically the parent and its children. To do this, all you need is to show the parent tab and all tabs that have their I don't think this information is exposed thru anything that CSS can inspect. I think you can only get it via the web extension API from an addon. The idea of appending a class (or anything that CSS can inspect) is an interesting idea and that would probably work. I would think you would need to create an addon that when a tab is made the new "selected" tab that it applies the new class and then traverses all of its children to do the same. [Oh, and obviously remove all previous instances of the class from the old "selected" tree] Then on the userChrome.css side you should be able to only show those tabs in the main bar with that class applied. |
Beta Was this translation helpful? Give feedback.
I don't think this will be possible via userChrome.css. What you want (I think) is to have a tree\group being displayed ... which is basically the parent and its children. To do this, all you need is to show the parent tab and all tabs that have their
openerTabId
as the tab id of the parent. (In the case you mentioned with a flat list of children under it)I don't think this information is exposed thru anything that CSS can inspect. I think you can only get it via the web extension API from an addon.
The idea of appending a class (or anything that CSS can inspect) is an interesting idea and that would probably work. I would think you would need to create an addon that when a tab is made t…