]> cat aescling's git repositories - mastodon.git/commitdiff
Fix unwanted content warning gap in CSS (#5436)
authorEugen Rochko <eugen@zeonfederated.com>
Tue, 17 Oct 2017 18:07:44 +0000 (20:07 +0200)
committerGitHub <noreply@github.com>
Tue, 17 Oct 2017 18:07:44 +0000 (20:07 +0200)
Fix #5356

app/javascript/mastodon/components/status_content.js
app/javascript/styles/components.scss

index fd9aa7edc3d3b7dbac6a99f1c3ed774003ef4d0a..3b815563295636384a07f66c3c6e3d8480c82157 100644 (file)
@@ -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'))) {
index b6da70c913153eb4684c3fae41ab9d0c1b944417..5211489f7a190eb851248ea8ae7eb9c4b80e8168 100644 (file)
   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;