-
-
Notifications
You must be signed in to change notification settings - Fork 182
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
Dynamic multiline titles #1471
Comments
Got me thinking. Seems possible. With the following css changes Some additional changes to the 2-line example not a copy paste example. Just quickly tested which css values needs to be changed /* add inside .tab { }*/
.tab{
height:auto;
}
/* can be removed seems superflous */
.Tab .t-box {
/*
max-height: calc(var(--tabs-height) - var(--tabs-title-padding));
overflow: hidden;
*/
}
/* remove line-height from .tab .title()
*/
.Tab .title {
white-space: pre-wrap; /* still needed */
/*
line-height: calc(
(var(--tabs-height) - var(--tabs-title-padding)) / var(--tabs-title-lines)
);
*/
-webkit-line-clamp: var(--tabs-title-lines); /* important line to clamp to max lines*/
}
in root{} change --tabs-title-lines: 2; to desired max tab lines short comment if it's working for other multiline users and i have not forgotten any other css line to mention. Edit: #root {
--tabs-height: 36px;
--tabs-title-lines: 3;
}
.Tab{
height:auto;
}
.Tab .t-box{
min-height: calc(var(--tabs-height));
display:flex;
align-items:center;
}
.Tab .title {
font-size: var(--tabs-font-size);
white-space: pre-wrap;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: var(--tabs-title-lines);
} |
Just now tried drag and drop too. Well at least mbnuqw now has example css styles if he wants to try out to adjust his code. Edit:
Gotta learn how to build sidebery from the github to try out more 😅 |
Came here looking for a solution to the loss of drag-tab functionality with auto tab-height. |
I tried the code snippet from here, but it makes multiline constant on all tabs. So if you want more than two lines, every other tab with less content looks very awkward. And if you set it to 2 lines, all other lines will be hidden. For example, the Tree Style Tab extension does this:
according to the content wrap, the height of the tabs changes dynamically. I really like your extension because of all of the other features and implementing this will be wonderful.
Also, while I was inspecting CSS, I found this:
Firefox thinks this line of code in the snippet does nothing because the t-box is not a flex container.
The text was updated successfully, but these errors were encountered: