From 0f451451197e9f3b60c685ef2cc8447cdfdc03a8 Mon Sep 17 00:00:00 2001 From: Alexander Bocken Date: Mon, 22 Jan 2024 12:40:55 +0100 Subject: [PATCH] Card.svelte: get rid of :has() and Firefox-specific hacks --- src/lib/components/Card.svelte | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/src/lib/components/Card.svelte b/src/lib/components/Card.svelte index 6aef276..ea2ad87 100644 --- a/src/lib/components/Card.svelte +++ b/src/lib/components/Card.svelte @@ -49,7 +49,8 @@ import { onMount } from "svelte"; .unblur{ filter: blur(0px) !important; } -div:has(#image){ +#div_image, +#div_div_image{ width: var(--card-width); background-repeat: no-repeat; background-size: cover; @@ -58,30 +59,12 @@ div:has(#image){ border-top-left-radius: inherit; border-top-right-radius: inherit; } -div:has(div #image){ +#div_div_image{ height: calc(var(--card-width)*0.85); position: absolute; width: var(--card-width); top: 0; } -@supports(-moz-appearance:none){ - #image, #div_image{ - border-top-left-radius: 20px; - border-top-right-radius: 20px; - height: 100%; - } - #div_image{ - background-repeat: no-repeat; - background-size: cover; - - } - #div_div_image{ - height: calc(var(--card-width)*0.85); - position: absolute; - width: var(--card-width); - top: 0; - } -} #card:hover, #card:focus-within{