Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any way to visually space tab trees without breaking drag&drop? #3598

Closed
Baerbeisser opened this issue Jul 29, 2024 · 4 comments
Closed

Any way to visually space tab trees without breaking drag&drop? #3598

Baerbeisser opened this issue Jul 29, 2024 · 4 comments

Comments

@Baerbeisser
Copy link

Baerbeisser commented Jul 29, 2024

Abstract

I use a custom theme in which i want to separate open tab trees for visibility.
But this causes the drag&drop indicator (to drag a tab as a child element) to be misaligned.
It looks like this:
Bildschirmfoto_2024-07-29_15-29-44

Steps to see the situation

Use Photon theme and add this snippet:

/* space between trees  (root level tabs) */
tab-item[data-level="0"]:not(.subtree-collapsed) {
  margin-top: calc(var(--tab-size) / 4);
  /*border-top: 1px solid lightgrey;*/
}

Expected result

This but with trees separated:
Bildschirmfoto_2024-07-29_15-57-50

Best would would be if drag&drop handler is calculated per tree (instead of the whole sidebar). But i guess this is a bit much asked.
Is there a CSS variable or workaround with which i can correct it?
I tried with height instead of margin but that has the same issues.

Actual (present) result

drag&drop indicator gets misaligned, with margin-top * nr. of open trees the further down.

Environment

  • Platform (OS): Linux but independent
  • Version of Firefox: 128.0 esr
  • Version (or revision) of Tree Style Tab: 4.0.20
@piroor
Copy link
Owner

piroor commented Jul 29, 2024

The CSS hack is not suitable for TST 4.0 and later. See also discussions in #3592.

@Baerbeisser Baerbeisser changed the title Any way to visually space tab groups without breaking drag&drop for trees? Any way to visually space tab trees without breaking drag&drop? Jul 29, 2024
@Baerbeisser
Copy link
Author

Baerbeisser commented Jul 29, 2024

Ok, any built-in way to achieve the same or something similiar?

@piroor
Copy link
Owner

piroor commented Jul 29, 2024

Sadly there is no alternative method for now. As I told at #3592 (comment) we need to implement new helper addon to do that with newly designed API, but such an API may reduce performance if I design it carelessly...

@Baerbeisser
Copy link
Author

Baerbeisser commented Jul 29, 2024

Fine, this works too.

tab-item[data-level="0"][data-child-ids] {
  /*margin-top: calc(var(--tab-size) / 4);*/
  border-left: 3px solid var(--text-unread);
}

Bildschirmfoto_2024-07-29_17-18-53
Bildschirmfoto_2024-07-29_17-19-14

Thanks for the time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants