From fcd3a1cb39e33b923912a3cf58fc6bc3df7ff7d4 Mon Sep 17 00:00:00 2001 From: Mykhailo Date: Sat, 30 Nov 2024 13:16:53 +0200 Subject: [PATCH] add better solution --- src/index.html | 4 ++-- src/styles/{blocks/index.scss => main.scss} | 8 +++++++- src/styles/utils/variables.scss | 19 +++++++++---------- 3 files changed, 18 insertions(+), 13 deletions(-) rename src/styles/{blocks/index.scss => main.scss} (86%) diff --git a/src/index.html b/src/index.html index 7fb91dd64..07f4b1f49 100644 --- a/src/index.html +++ b/src/index.html @@ -9,11 +9,11 @@ Calendar -
+
diff --git a/src/styles/blocks/index.scss b/src/styles/main.scss similarity index 86% rename from src/styles/blocks/index.scss rename to src/styles/main.scss index e0dfbf437..3507ccf51 100644 --- a/src/styles/blocks/index.scss +++ b/src/styles/main.scss @@ -1,4 +1,4 @@ -@import '../utils/variables'; +@import './utils/variables'; body { margin: 0; @@ -55,5 +55,11 @@ body { display: none; } } + + @for $i from 28 through 31 { + .calendar--month-length-#{$i} .calendar__day:nth-child(n + #{$i + 1}) { + display: none; + } + } } } diff --git a/src/styles/utils/variables.scss b/src/styles/utils/variables.scss index c240f6660..d05a8e312 100644 --- a/src/styles/utils/variables.scss +++ b/src/styles/utils/variables.scss @@ -2,15 +2,14 @@ $col-count: 7; $gap: 1; $cell-width: 100; $cell-height: 100; -/* stylelint-disable */ -$days-of-week: - 'mon' 0, - 'tue' 1, - 'wed' 2, - 'thu' 3, - 'fri' 4, - 'sat' 5, - 'sun' 6; -/* stylelint-enable */ +$days-of-week: ( + 'mon': 0, + 'tue': 1, + 'wed': 2, + 'thu': 3, + 'fri': 4, + 'sat': 5, + 'sun': 6, +); $month-length: 31; $current-day: 'sun';