From 03521018e673886b6cea095f893e291c0a18728d Mon Sep 17 00:00:00 2001 From: reverend Date: Sun, 23 Aug 2020 19:20:34 +0200 Subject: [PATCH] Better usebility of mixins --- components/02_Styles/spacing/_spacing.scss | 26 +++++++++++++--------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/components/02_Styles/spacing/_spacing.scss b/components/02_Styles/spacing/_spacing.scss index 38f614c..9a28cbb 100644 --- a/components/02_Styles/spacing/_spacing.scss +++ b/components/02_Styles/spacing/_spacing.scss @@ -11,19 +11,25 @@ } -@mixin RV-Spacing__Inner--small { - padding: $-spacing-small; - gap: $-spacing-small; +@mixin RV-Spacing__Inner--small($-container-suffix: '__Container') { + padding: $-spacing-small; + &#{$-container-suffix} { + gap: $-spacing-small; + } } -@mixin RV-Spacing__Inner--medium { +@mixin RV-Spacing__Inner--medium($-container-suffix: '__Container') { padding: $-spacing-medium; - gap: $-spacing-medium; + &#{$-container-suffix} { + gap: $-spacing-medium; + } } -@mixin RV-Spacing__Inner--large { +@mixin RV-Spacing__Inner--large($-container-suffix: '__Container') { padding: $-spacing-large; - gap: $-spacing-large; + &#{$-container-suffix} { + gap: $-spacing-large; + } } @mixin RV-Spacing { @@ -43,15 +49,15 @@ &__Inner{ &--small { - @include RV-Spacing__Inner--small; + @include RV-Spacing__Inner--small(''); } &--medium { - @include RV-Spacing__Inner--medium; + @include RV-Spacing__Inner--medium(''); } &--large { - @include RV-Spacing__Inner--large; + @include RV-Spacing__Inner--large(''); } } }