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
Firefox Proton: Center Tab Label #71
Comments
Thanks for replying. I appreciate it. I've also played with
|
I've just quickly tested it. It looks great. 👍 It requires some fine-tuning. https://github.com/notepad-plus-plus/notepad-plus-plus |
removing .proton from the .tab-label-container selector works for both proton and disabled.
|
Seems to work properly with Proton enabled. Thank you. |
interesting, i was not aware of the using the safe option it looks like the text only gets centered if it's shorter than the width of the container. i started using more specific selectors for the tabs on my end because if proton is enabled/disabled firefox has different elements displayed for the tab text. it hasn't helped me figure anything out really but might be noteworthy that firefox does this - it doesn't just remove the .proton class from the vbox element like i initially assumed when proton is disabled.
i found that when i added this rule
above the others and proton is enabled i was getting what looked like duplicate text on the tabs, almost looking like your last screenshot but not quite. |
I'm not a pro and I wasn't even familiar with
This makes sense. 👍
I'm not sure I understand.
This has happened to me too in the past few days while playing with Proton. |
Oops, I missed that part. Why should you do that? :) |
because you said your system is RTL, so i thought i should try to check that however i could in case it showed something different or weird. the tab text jumping a little bit when i mouseover a tab with centered text shorter than the width of the tab happens for me regardless of rtl or ltr set on the element. |
fixed it so the text doesn't move for me when mouseover a tab with centered text shorter than tab width with proton enabled. The issue was the tab close/X button image was getting wider when moused over to make it a bit easier to click (accessibility issue) so i figure just keep that close/X image the full width even when not moused over.
|
I was about to type the following lines when I was notified of your last post. :) I should have realized the jumping text is not an off-topic issue but caused by I used only those two lines and got the same jumping problem.
Interestingly, you actually get 8px. I'm new to Windows 10 and I've observed (in the past few days playing with Proton) a similar behavior in other FF elements as well. Well done! Thanks again. |
Thank you to everyone who participated in the issue. .tab-label-container {
display: grid;
justify-items: safe center;
}
.tab-text.tab-label{
overflow:hidden;
}
.tab-label-container:not([textoverflow]) + .tab-close-button { /* for textoverflow's clipped text */
width: unset !important;
padding-inline-start: 7px !important;
} (Tomorrow I will do some more work for compatibility.) @sean1138 You have been a great help in this issue and in #53, so I would like to add it to |
Hello,
The following CSS code used to center the tab label prior to Proton.
Any idea how to achieve that in Proton?
Thank you.
The text was updated successfully, but these errors were encountered: