Skip to content

A platform for community discussion. Free, open, simple.

UX: restrict mobile tooltip width to prevent horizontal overflow (#27420)

Krisebc23b348fe6
diff --git a/plugins/footnote/assets/stylesheets/footnotes.scss b/plugins/footnote/assets/stylesheets/footnotes.scss
index 55476a8c1dc..b9024e46d2c 100644
--- a/plugins/footnote/assets/stylesheets/footnotes.scss
+++ b/plugins/footnote/assets/stylesheets/footnotes.scss
@@ -49,6 +49,12 @@
max-width: 400px;
overflow-wrap: break-word;
+ .mobile-view & {
+ // tooltips are positioned 5px from the left
+ // - 10px accounts for this and gives 5px space on the right
+ max-width: calc(100dvw - 10px);
+ }
+
.footnote-tooltip-content {
overflow: hidden;
@@ -58,7 +64,7 @@
img {
object-fit: cover;
- max-width: 385px;
+ max-width: 100%;
}
p {