diff options
author | hmhealey <harrisonmhealey@gmail.com> | 2015-07-23 18:00:57 -0400 |
---|---|---|
committer | hmhealey <harrisonmhealey@gmail.com> | 2015-07-29 09:52:09 -0400 |
commit | e1257b781939bc8767b379e3e49a7f2ca7e52e7b (patch) | |
tree | 74ba6781a00f43a4cb121d2b54c7053ffa38c755 /web/sass-files | |
parent | 00a17e34b365c1381370a8d0f0ba9437af4f10ef (diff) | |
download | chat-e1257b781939bc8767b379e3e49a7f2ca7e52e7b.tar.gz chat-e1257b781939bc8767b379e3e49a7f2ca7e52e7b.tar.bz2 chat-e1257b781939bc8767b379e3e49a7f2ca7e52e7b.zip |
Center image icons in attachment previews instead of stretching them
Diffstat (limited to 'web/sass-files')
-rw-r--r-- | web/sass-files/sass/partials/_files.scss | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/web/sass-files/sass/partials/_files.scss b/web/sass-files/sass/partials/_files.scss index 2a4b21d01..d61d48ae9 100644 --- a/web/sass-files/sass/partials/_files.scss +++ b/web/sass-files/sass/partials/_files.scss @@ -71,48 +71,45 @@ width:300px; height:300px; } + +@mixin file-icon($path) { + background: url($path); + background-position: center; + background-repeat: no-repeat; + @include background-size(auto 100%); +} .file-icon { width: 100%; height: 100%; &.audio { - background: url("../images/icons/audio.png"); - @include background-size(100% 100%); + @include file-icon("../images/icons/audio.png"); } &.video { - background: url("../images/icons/video.png"); - @include background-size(100% 100%); + @include file-icon("../images/icons/video.png"); } &.ppt { - background: url("../images/icons/ppt.png"); - @include background-size(100% 100%); + @include file-icon("../images/icons/ppt.png"); } &.generic { - background: url("../images/icons/generic.png"); - @include background-size(100% 100%); + @include file-icon("../images/icons/generic.png"); } &.code { - background: url("../images/icons/code.png"); - @include background-size(100% 100%); + @include file-icon("../images/icons/code.png"); } &.excel { - background: url("../images/icons/excel.png"); - @include background-size(100% 100%); + @include file-icon("../images/icons/excel.png"); } &.word { - background: url("../images/icons/word.png"); - @include background-size(100% 100%); + @include file-icon("../images/icons/word.png"); } &.pdf { - background: url("../images/icons/pdf.png"); - @include background-size(100% 100%); + @include file-icon("../images/icons/pdf.png"); } &.patch { - background: url("../images/icons/patch.png"); - @include background-size(100% 100%); + @include file-icon("../images/icons/patch.png"); } &.image { - background: url("../images/icons/image.png"); - @include background-size(100% 100%); + @include file-icon("../images/icons/image.png"); } } .post-image__column { |