From 10d7c11695611c5642f0002f4d0d19b8587e9d36 Mon Sep 17 00:00:00 2001 From: sivan Date: Thu, 22 Oct 2020 05:15:38 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20=20@=20fcfda?= =?UTF-8?q?461a953f6a70c260e177676d019cc2d0437=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scss/components/_card.scss | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/scss/components/_card.scss b/scss/components/_card.scss index 0f8b4d6..49893af 100644 --- a/scss/components/_card.scss +++ b/scss/components/_card.scss @@ -53,16 +53,23 @@ } } -@media (prefers-color-scheme: dark) { - .card { - background-color: hsl(0, 0%, 16%); - - > figcaption { - border-block-start: 1px solid hsl(0, 0%, 20%); - } +@mixin darkmode { + background-color: hsl(0, 0%, 16%); + > figcaption { + border-block-start: 1px solid hsl(0, 0%, 20%); } - .card__vertical-container { border-color: hsl(0, 0%, 20%); } } + +.card { + [data-darkmode="dark"] & { + @include darkmode(); + } + @media (prefers-color-scheme: dark) { + [data-darkmode="auto"] & { + @include darkmode(); + } + } +}