mbnuqw / sidebery

Firefox extension for managing tabs and bookmarks in sidebar.
MIT License
3.57k stars 176 forks source link

Allow reading variable tab height for tab bounds #1832

Open willhansen opened 1 month ago

willhansen commented 1 month ago

This branch allows for dragging tabs when using a non-uniform tab height, as mentioned in https://github.com/mbnuqw/sidebery/issues/1471

eg: If I want to apply this custom style, to let me read the full title of every tab, I currently can't properly click and drag tabs. As near as I can tell, this is due to tabs being assumed to be uniform height, and not reading from their dom elements. This branch fixes that.

Next step after this would probably be adding a display option rather than requiring custom css.

The custom style I'm applying:

Before After
image image
.Tab .body {
    border: 1px solid #c7c7c780;
}

#root {--tabs-height: auto !important;}
#root {--tabs-font-size: .8rem;}

.Tab .t-box {
  align-items: center;
  max-height: calc(var(--tabs-height) - var(--tabs-title-padding));
  overflow: hidden;
}

.Tab .title {
  font-size: var(--tabs-font-size);
    white-space: pre-wrap;
}

.Tab .close {
    width: 50px !important;
}