From c3ff75d18f55831488706a022aa68de93ef63e72 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 17 Apr 2020 11:04:52 +0100 Subject: [PATCH 1/2] Don't break spills over multiple lines, ellipsis them at max-1-line Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- res/css/views/elements/_RichText.scss | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/res/css/views/elements/_RichText.scss b/res/css/views/elements/_RichText.scss index e3f88cc779..42e14525bf 100644 --- a/res/css/views/elements/_RichText.scss +++ b/res/css/views/elements/_RichText.scss @@ -14,8 +14,10 @@ } a.mx_Pill { - word-break: break-all; - display: inline; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + max-width: 100%; } /* More specific to override `.markdown-body a` text-decoration */ From 4d91dc5bba5388897fcf317a7ef193380983ae86 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 17 Apr 2020 12:30:09 +0100 Subject: [PATCH 2/2] iterate pills in rich text styling Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- res/css/views/elements/_RichText.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/res/css/views/elements/_RichText.scss b/res/css/views/elements/_RichText.scss index 42e14525bf..e01b1f8938 100644 --- a/res/css/views/elements/_RichText.scss +++ b/res/css/views/elements/_RichText.scss @@ -17,7 +17,8 @@ a.mx_Pill { text-overflow: ellipsis; white-space: nowrap; overflow: hidden; - max-width: 100%; + vertical-align: text-bottom; + max-width: calc(100% - 1ch); } /* More specific to override `.markdown-body a` text-decoration */