]> cat aescling's git repositories - mastodon.git/commitdiff
Fix background-size being overwritten (#2382)
authorYamagishi Kazutoshi <ykzts@desire.sh>
Mon, 24 Apr 2017 02:10:32 +0000 (11:10 +0900)
committerEugen <eugen@zeonfederated.com>
Mon, 24 Apr 2017 02:10:32 +0000 (04:10 +0200)
app/assets/javascripts/components/components/media_gallery.jsx
app/assets/stylesheets/components.scss

index 6101c2eef9c70e8d760d13334483d02128f3cf1a..58e134f500679ac2ebc0c4d82baa84ee9f613f3f 100644 (file)
@@ -86,7 +86,7 @@ class Item extends React.PureComponent {
           href={attachment.get('remote_url') || attachment.get('url')}
           onClick={this.handleClick}
           target='_blank'
-          style={{ background: `url(${attachment.get('preview_url')}) no-repeat center`}}
+          style={{ backgroundImage: `url(${attachment.get('preview_url')})` }}
         />
       );
     } else if (attachment.get('type') === 'gifv') {
index 800c97a6bbb42317d9f4db3952049e38c09cd267..feab813664f5a7213b6e5cb7dccbff7bc53b1b8a 100644 (file)
@@ -2999,6 +2999,8 @@ button.icon-button.active i.fa-retweet {
 }
 
 .media-gallery__item-thumbnail {
+  background-position: center;
+  background-repeat: no-repeat;
   background-size: cover;
   cursor: zoom-in;
   display: block;