From 9322c596e25dcd981ed96a775e77bb741b140a52 Mon Sep 17 00:00:00 2001 From: evazion Date: Wed, 5 Feb 2020 16:49:04 -0600 Subject: [PATCH] Fix #4279: Very long tags break forum post format. * Enable word breaks for all DText-formatted text. Ensures extremely long strings in comments get broken. * Fix the author column on comments/forum posts to use a fixed 12em width (except on the mobile layout). Using flex-basis was wrong because it allowed the author column to shrink if the other column was too wide. --- app/javascript/src/styles/common/dtext.scss | 1 + app/javascript/src/styles/common/messages.scss | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/javascript/src/styles/common/dtext.scss b/app/javascript/src/styles/common/dtext.scss index d7115ded1..67900a00d 100644 --- a/app/javascript/src/styles/common/dtext.scss +++ b/app/javascript/src/styles/common/dtext.scss @@ -2,6 +2,7 @@ div.prose { line-height: 1.4em; + word-break: break-word; h1, h2, h3 { line-height: 1em; diff --git a/app/javascript/src/styles/common/messages.scss b/app/javascript/src/styles/common/messages.scss index ade29c366..c25f27085 100644 --- a/app/javascript/src/styles/common/messages.scss +++ b/app/javascript/src/styles/common/messages.scss @@ -12,9 +12,8 @@ div.list-of-messages { } div.author { - flex-basis: 12em; + width: 12em; margin-right: 1em; - min-width: 0; a.message-timestamp { font-style: italic; @@ -40,6 +39,7 @@ div.list-of-messages { div.author { margin: 0 0 1em; + width: auto; h4 { display: inline;