From e5a97a550f3a4594a2d9394ecd68ef5c463fe910 Mon Sep 17 00:00:00 2001 From: grandeljay Date: Thu, 1 Dec 2022 16:50:07 +0100 Subject: [PATCH] Refactor --- src/assets/css/wishlist.css | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/assets/css/wishlist.css b/src/assets/css/wishlist.css index d88bfa61..74ae3ba8 100644 --- a/src/assets/css/wishlist.css +++ b/src/assets/css/wishlist.css @@ -3,8 +3,10 @@ */ .wishlist .ui.card { --padding: 0.91666667em; - --wishPreviewHeight: 192px; + --wishPreviewHeight: max(var(--wishPreviewHeightHover), var(--wishPreviewHeightMobile)); + --wishPreviewHeightMobile: 192px; --wishPreviewHeightHover: calc(1em + 3 * var(--padding)); + --wishPreviewHeightDifference: calc(var(--wishPreviewHeightMobile) - var(--wishPreviewHeightHover)); } .wishlist .ui.card:focus-within { z-index: calc(var(--dimmerZIndex) + 2); @@ -53,7 +55,7 @@ } @media (hover: hover) { .wishlist:not(.one).column .ui.card > .image > :is(svg, img.preview) { - height: max(var(--wishPreviewHeightHover), var(--wishPreviewHeight)); + height: var(--wishPreviewHeight); } } @@ -247,7 +249,7 @@ } .wishlist:not(.one).column .ui.card > .content:not(.extra) { - --contentHeight: calc(var(--wishPreviewHeight) * 1.25); + --contentHeight: calc(var(--wishPreviewHeightMobile) * 1.25); height: var(--contentHeight);