Better usebility of mixins

This commit is contained in:
reverend 2020-08-23 19:20:34 +02:00
parent 9373d0d35c
commit 03521018e6

View File

@ -11,20 +11,26 @@
} }
@mixin RV-Spacing__Inner--small { @mixin RV-Spacing__Inner--small($-container-suffix: '__Container') {
padding: $-spacing-small; padding: $-spacing-small;
&#{$-container-suffix} {
gap: $-spacing-small; gap: $-spacing-small;
} }
@mixin RV-Spacing__Inner--medium {
padding: $-spacing-medium;
gap: $-spacing-medium;
} }
@mixin RV-Spacing__Inner--large { @mixin RV-Spacing__Inner--medium($-container-suffix: '__Container') {
padding: $-spacing-medium;
&#{$-container-suffix} {
gap: $-spacing-medium;
}
}
@mixin RV-Spacing__Inner--large($-container-suffix: '__Container') {
padding: $-spacing-large; padding: $-spacing-large;
&#{$-container-suffix} {
gap: $-spacing-large; gap: $-spacing-large;
} }
}
@mixin RV-Spacing { @mixin RV-Spacing {
&__Outer{ &__Outer{
@ -43,15 +49,15 @@
&__Inner{ &__Inner{
&--small { &--small {
@include RV-Spacing__Inner--small; @include RV-Spacing__Inner--small('');
} }
&--medium { &--medium {
@include RV-Spacing__Inner--medium; @include RV-Spacing__Inner--medium('');
} }
&--large { &--large {
@include RV-Spacing__Inner--large; @include RV-Spacing__Inner--large('');
} }
} }
} }