From 72c984e1057306d1e4df49871b9fb658fd7cbcc6 Mon Sep 17 00:00:00 2001 From: Yamagishi Kazutoshi Date: Mon, 24 Apr 2017 11:10:32 +0900 Subject: [PATCH] Fix background-size being overwritten (#2382) --- app/assets/javascripts/components/components/media_gallery.jsx | 2 +- app/assets/stylesheets/components.scss | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/components/components/media_gallery.jsx b/app/assets/javascripts/components/components/media_gallery.jsx index 6101c2eef9..58e134f500 100644 --- a/app/assets/javascripts/components/components/media_gallery.jsx +++ b/app/assets/javascripts/components/components/media_gallery.jsx @@ -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') { diff --git a/app/assets/stylesheets/components.scss b/app/assets/stylesheets/components.scss index 800c97a6bb..feab813664 100644 --- a/app/assets/stylesheets/components.scss +++ b/app/assets/stylesheets/components.scss @@ -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;