-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Long abbreviations span large width and wrong position in the table #6760
Comments
Thanks for reporting and for the reproduction. This is already fixed in Insiders, as we swapped out the tooltip implementation to implement footnote tooltips and instant previews. Once we've collected a little more feedback on those features, we'll back port the new business logic which should also fix this problem |
@squidfunk Thank you for your quick reply! I'm glad that it is already fixed and the new features is wonderful! |
@Lexachoc The extra css: :root {
--md-tooltip-width: 20rem !important;
} isn't enough because by default it won't break words. I provided a temporary makeshift solution in a discussion here: #6757 (reply in thread) |
@kamilkrzyskow Thank you! I tried your solution and it works great! Also for the tooltip fontsize CSS hint! For a better look of the tooltip, I modified the CSS (from: #6757 (reply in thread)) to: .md-tooltip, .md-tooltip--inline {
max-width: 10rem;
word-break: break-all;
white-space: break-spaces;
} This way there will be no extra spaces on the left and right side if the tooltip is shorter. Thank you again! |
Fixed in 599193e – I backported the new tooltip implementation from Insiders in the refactor/tooltip-positioning branch! If you could spare a few minutes and check whether this fixes your issue, we can release it in the next days
PR: #7045 |
@squidfunk Thanks for this PR. I can confirm that the issue has been resolved. |
Thanks! Keeping open until released. |
Released as part of 9.5.18. |
Hi all, I updated to 9.5.18 and the following CSS no longer has any affect on my tooltips - what is the new way to specify the font size, colour etc?
|
simply with [role=tooltip]>.md-tooltip2__inner {
font-size: 1rem;
} will do the trick |
Thanks @Lexachoc for sharing! Improved tooltips are still experimental, which means we might change the implementation as we discover new problems on the way without considering it a breaking change. Note that |
Context
No response
Bug description
When having long abbreviations, the tooltip will span the entire screen (I think it's related to this fix: #4810 (comment) )
However, this is not so easy to read when using the desktop browser or a larger screen.
I would expect that the tooltip width to be shorter (normal width but wrapped), I tried to change the
--md-tooltip-width
by including:But this doesn't work.
I also noticed that the tooltip is rendered in the wrong position when within a table:
It is related to #4217
So three expected behaviors:
--md-tooltip-width
.--md-tooltip-width
, the value of--md-tooltip-width
is used as the width of the tooltip div.Chrome: Version 121.0.6167.161
Edge: Version 121.0.2277.112
mkdocs-material version: 9.5.9
Related links
Reproduction
9.5.9-long-abbreviations-issue.zip
Steps to reproduce
mkdocs serve
in terminalBrowser
No response
Before submitting
The text was updated successfully, but these errors were encountered: