Browse Source

Fix background-size being overwritten (#2382)

closed-social-glitch-2
Yamagishi Kazutoshi 7 years ago
committed by Eugen
parent
commit
72c984e105
2 changed files with 3 additions and 1 deletions
  1. +1
    -1
      app/assets/javascripts/components/components/media_gallery.jsx
  2. +2
    -0
      app/assets/stylesheets/components.scss

+ 1
- 1
app/assets/javascripts/components/components/media_gallery.jsx View 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') {

+ 2
- 0
app/assets/stylesheets/components.scss View 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;

Loading…
Cancel
Save