]> cat aescling's git repositories - mastodon.git/commitdiff
Expand uploaded thumbnail (#2611)
authoralpaca-tc <alpaca-tc@alpaca.tc>
Sat, 29 Apr 2017 12:29:13 +0000 (21:29 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Sat, 29 Apr 2017 12:29:13 +0000 (14:29 +0200)
app/assets/javascripts/components/features/compose/components/upload_form.jsx
app/assets/stylesheets/components.scss

index 4aafe698e8f122ced1c50b6505d26ecdd1241ae4..a2fb7cfe0e1767562727d4d5a559d8abcadff26c 100644 (file)
@@ -18,7 +18,7 @@ class UploadForm extends React.PureComponent {
       <div className='compose-form__upload' key={attachment.get('id')}>
         <Motion defaultStyle={{ scale: 0.8 }} style={{ scale: spring(1, { stiffness: 180, damping: 12 }) }}>
           {({ scale }) =>
-            <div className='compose-form__upload-thumbnail' style={{ transform: `translateZ(0) scale(${scale})`, background: `url(${attachment.get('preview_url')}) no-repeat center` }}>
+            <div className='compose-form__upload-thumbnail' style={{ transform: `translateZ(0) scale(${scale})`, backgroundImage: `url(${attachment.get('preview_url')})` }}>
               <IconButton icon='times' title={intl.formatMessage(messages.undo)} size={36} onClick={this.props.onRemoveFile.bind(this, attachment.get('id'))} />
             </div>
           }
index 42257563976b86604be71b677b724947dc155741..11d50673d40d55507892eb89c5729e5f3b6d2b56 100644 (file)
 
 .compose-form__upload-thumbnail {
   border-radius: 4px;
+  background-position: center;
+  background-size: cover;
+  background-repeat: no-repeat;
   height: 100px;
   width: 100%;
 }