From 52af65da92b974acef002cb65c38853c31718c1d Mon Sep 17 00:00:00 2001 From: reverend Date: Sat, 2 Jan 2021 20:28:21 +0100 Subject: [PATCH] Different rules at different counts --- components/00_Global/_elementAmount.scss | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 components/00_Global/_elementAmount.scss diff --git a/components/00_Global/_elementAmount.scss b/components/00_Global/_elementAmount.scss new file mode 100644 index 0000000..962d614 --- /dev/null +++ b/components/00_Global/_elementAmount.scss @@ -0,0 +1,9 @@ +@mixin RV-Utils__ElementAmount($-up-to: 20) { + @for $i from 1 through $-up-to { + + *:first-child:nth-last-child(#{$i}), + *:first-child:nth-last-child(#{$i})~* { + @content($i); + } + } +} \ No newline at end of file