From b23931bd662d6d043a7675f207917281129df220 Mon Sep 17 00:00:00 2001 From: Aman Agrawal Date: Thu, 27 Oct 2022 03:57:42 +0000 Subject: [PATCH] recent: Fix unread counts wrappings to next line in long topic names. We limit the word break to only text present inside the `a` tags so that it doesn't apply to unread count. --- static/styles/recent_topics.css | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/static/styles/recent_topics.css b/static/styles/recent_topics.css index 1b1733e2aa..0abf682b3c 100644 --- a/static/styles/recent_topics.css +++ b/static/styles/recent_topics.css @@ -331,17 +331,23 @@ .recent_topic_stream { width: 25%; padding: 8px 0 8px 8px; - word-break: break-word; - hyphens: auto; + + a { + word-break: break-word; + hyphens: auto; + } } .recent_topic_name { width: 40%; - word-break: break-word; - /* No hyphes for word break since it caused hyphens to appear before - the ellipsis `longText-...` which is not desirable. Ellipsis appears due - to the line clamp applied below. - */ + + a { + word-break: break-word; + /* No hyphes for word break since it caused hyphens to appear before + the ellipsis `longText-...` which is not desirable. Ellipsis appears due + to the line clamp applied below. + */ + } .line_clamp { /* This -webkit-box display property is webkit-specific, but