rendered_markdown: Fix text wrapping in message view header.

For elements that can wrap in a rendered markdown, we don't want them
to in places like message view header.
This commit is contained in:
Aman Agrawal
2024-07-09 08:01:46 +00:00
committed by Tim Abbott
parent 2a0dbd22a5
commit 84f22440dd
2 changed files with 12 additions and 2 deletions

View File

@@ -952,3 +952,13 @@
.highlight {
background-color: hsl(51deg 100% 79%);
}
/* For elements where we want to show as much markdown content we can
in a single line and then hide the overflowing part. */
.single-line-rendered-markdown {
/* Any element which can `wrap` in the above defined elements. */
code,
.stream-topic {
white-space: nowrap;
}
}

View File

@@ -12,7 +12,7 @@
{{/unless}}
</div>
</template>
<span class="narrow_description rendered_markdown">
<span class="narrow_description rendered_markdown single-line-rendered-markdown">
{{#if rendered_narrow_description}}
{{rendered_markdown rendered_narrow_description}}
{{else}}
@@ -28,7 +28,7 @@
{{> navbar_icon_and_title }}
</span>
{{#if description}}
<span class="narrow_description rendered_markdown">{{description}}
<span class="narrow_description rendered_markdown single-line-rendered-markdown">{{description}}
{{#if link}}
<a class="help_link_widget" href="{{link}}" target="_blank" rel="noopener noreferrer">
<i class="fa fa-question-circle-o" aria-hidden="true"></i>