From 24155c5890457cb4a84af30c5d441b8e0a4c759e Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 17 Oct 2017 20:07:44 +0200 Subject: [PATCH] Fix unwanted content warning gap in CSS (#5436) Fix #5356 --- app/javascript/mastodon/components/status_content.js | 1 + app/javascript/styles/components.scss | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/app/javascript/mastodon/components/status_content.js b/app/javascript/mastodon/components/status_content.js index fd9aa7edc3..3b81556329 100644 --- a/app/javascript/mastodon/components/status_content.js +++ b/app/javascript/mastodon/components/status_content.js @@ -122,6 +122,7 @@ export default class StatusContent extends React.PureComponent { const directionStyle = { direction: 'ltr' }; const classNames = classnames('status__content', { 'status__content--with-action': this.props.onClick && this.context.router, + 'status__content--with-spoiler': status.get('spoiler_text').length > 0, }); if (isRtl(status.get('search_index'))) { diff --git a/app/javascript/styles/components.scss b/app/javascript/styles/components.scss index b6da70c913..5211489f7a 100644 --- a/app/javascript/styles/components.scss +++ b/app/javascript/styles/components.scss @@ -511,6 +511,14 @@ overflow: hidden; white-space: pre-wrap; + &.status__content--with-spoiler { + white-space: normal; + + .status__content__text { + white-space: pre-wrap; + } + } + .emojione { width: 18px; height: 18px;