From 29e7aeff5db50889b92bf8430246f9e7df4b8534 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Mon, 25 Apr 2016 21:44:33 +0200 Subject: UI: Fix scaling of cover images (Fixes: #548) This reverts f039923ac134e4a3cc70a1a7d47c21460676b1c0 and fixes #196 in a different way (adding quotes). So that we can use the css background properties to scale the cover images. --- client/components/cards/minicard.jade | 3 +-- client/components/cards/minicard.styl | 7 +------ 2 files changed, 2 insertions(+), 8 deletions(-) (limited to 'client/components') diff --git a/client/components/cards/minicard.jade b/client/components/cards/minicard.jade index 573b3da1..1dfd2f8e 100644 --- a/client/components/cards/minicard.jade +++ b/client/components/cards/minicard.jade @@ -1,8 +1,7 @@ template(name="minicard") .minicard if cover - .minicard-cover - img(src="{{pathFor cover.url}}") + .minicard-cover(style="background-image: url('{{pathFor cover.url}}');") if labels .minicard-labels each labels diff --git a/client/components/cards/minicard.styl b/client/components/cards/minicard.styl index 3b8c8a9a..0f6f8ad2 100644 --- a/client/components/cards/minicard.styl +++ b/client/components/cards/minicard.styl @@ -62,16 +62,11 @@ .minicard-cover background-position: center background-repeat: no-repeat - background-size: cover + background-size: contain height: 145px user-select: none margin: -6px -8px 6px -8px border-radius: top 2px - position: relative - - img - height: 100% - width: 100% .minicard-labels float: right -- cgit v1.2.3-1-g7c22