From d5ae25a87b3378fdf1d5705309b6f506b868bedf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Pe=CC=81ault?= Date: Thu, 11 Aug 2022 23:05:27 +0200 Subject: [PATCH] Push ShopModule button to bottom if it has no bottom text --- src/components/organisms/ShopModule.svelte | 2 +- src/style/organisms/_shop.scss | 23 +++++++++++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/components/organisms/ShopModule.svelte b/src/components/organisms/ShopModule.svelte index 4165fac..826ac48 100644 --- a/src/components/organisms/ShopModule.svelte +++ b/src/components/organisms/ShopModule.svelte @@ -58,7 +58,7 @@ }) -
+
{#if images} diff --git a/src/style/organisms/_shop.scss b/src/style/organisms/_shop.scss index 0882948..9d58e22 100644 --- a/src/style/organisms/_shop.scss +++ b/src/style/organisms/_shop.scss @@ -75,7 +75,8 @@ border-radius: 12px; @include bp (sm) { - padding: clamp(40px, 4.5vw, 64px) clamp(48px, 4.5vw, 72px) clamp(24px, 4.5vw, 40px) clamp(40px, 4.5vw, 64px); + $vw: 4.5vw; + padding: clamp(40px, $vw, 64px) clamp(48px, $vw, 72px) clamp(24px, $vw, 40px) clamp(40px, $vw, 64px); } :global(.button) { @@ -113,4 +114,24 @@ padding-top: 24px; } } + + + /* + ** Variants + */ + // No bottom text + &.has-no-bottom { + .shop__content { + @include bp (sm) { + $vw: 4.5vw; + padding: clamp(40px, $vw, 64px) clamp(48px, $vw, 72px) clamp(40px, $vw, 64px) clamp(40px, $vw, 64px); + } + + :global(.button) { + @include bp (sm) { + margin-top: auto; + } + } + } + } } \ No newline at end of file