From 5794b3f0f90bd73a9a64597dea7263d11e71426b Mon Sep 17 00:00:00 2001 From: Deimos Date: Sun, 17 Nov 2019 13:17:19 -0700 Subject: [PATCH] Improve wrapping of bottom row of topic data On small screens, when the bottom row with a topic's comments, source, and age starts wrapping, there was some weird behavior. This improves it so that: * The number(s) for comments won't wrap separately * If the row gets taller due to wrapping, text will align to the bottom --- tildes/scss/modules/_topic.scss | 7 ++++--- tildes/tildes/templates/macros/topics.jinja2 | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tildes/scss/modules/_topic.scss b/tildes/scss/modules/_topic.scss index 2da91b5..f2f71ca 100644 --- a/tildes/scss/modules/_topic.scss +++ b/tildes/scss/modules/_topic.scss @@ -233,16 +233,17 @@ grid-column-gap: 0.4rem; + align-items: end; max-width: 32rem; white-space: nowrap; } .topic-info-comments { white-space: normal; -} -.topic-info-comments-new { - white-space: nowrap; + span { + white-space: nowrap; + } } .topic-info-source { diff --git a/tildes/tildes/templates/macros/topics.jinja2 b/tildes/tildes/templates/macros/topics.jinja2 index 941d74b..d7ba417 100644 --- a/tildes/tildes/templates/macros/topics.jinja2 +++ b/tildes/tildes/templates/macros/topics.jinja2 @@ -80,7 +80,7 @@ {% if request.user.open_new_tab_internal %}target="_blank"{% endif %} > - {{ pluralize(topic.num_comments, "comment") }} + {{ pluralize(topic.num_comments, "comment") }} {% if topic.comments_since_last_visit %}