From 44959462ee48b8e02c3d2bcb4e499aa4c3e57021 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Pe=CC=81ault?= Date: Tue, 13 Sep 2022 13:23:42 +0200 Subject: [PATCH] Change Photos page grid Remove large size and keep [2-1-1] [1-1-2] alternating --- src/style/pages/_photos.scss | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/src/style/pages/_photos.scss b/src/style/pages/_photos.scss index 596494e..1b00de3 100644 --- a/src/style/pages/_photos.scss +++ b/src/style/pages/_photos.scss @@ -110,7 +110,7 @@ grid-gap: 20px; } @include bp (sm) { - // Swich to template: 2-1-1 / 1-1-2 / 4 + // Swich to template: 2-1-1 / 1-1-2 grid-template-columns: repeat(4, 1fr); grid-gap: 24px; } @@ -161,27 +161,21 @@ // DESKTOP // 1st photo = left 2 columns, 2 rows - &:nth-child(11n + 1){ + &:nth-child(10n + 1){ @include bp (sm) { grid-column: span 2; grid-row: span 2; } } // 8th photo = right 2 columns, 2 rows - &:nth-child(11n + 8){ + &:nth-child(10n + 8){ @include bp (sm) { grid-column: 3 / span 2; grid-row: span 2; } } - // 11th photo = 4 columns - &:nth-child(11n){ - @include bp (sm) { - grid-column: span 4; - } - } // Additional spacing between grid patterns - &:nth-child(11n + 11){ + &:nth-child(10n + 10){ @include bp (sm) { margin-top: 12px; } @@ -189,10 +183,9 @@ margin-top: clamp(8px, 1vw, 16px); } } - &:nth-child(11n), - &:nth-child(11n + 1), - &:nth-child(11n + 4), - &:nth-child(11n + 5){ + &:nth-child(10n + 1), + &:nth-child(10n + 4), + &:nth-child(10n + 5){ @include bp (sm) { margin-bottom: 12px; }