From 57e28f7fe929f275a0c516d0a702ec8a8739a810 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Thu, 27 Jun 2024 11:26:15 +0200 Subject: Add card --- src/layouts/_media.scss | 51 ++++++++++++------------------------------------- 1 file changed, 12 insertions(+), 39 deletions(-) (limited to 'src/layouts') diff --git a/src/layouts/_media.scss b/src/layouts/_media.scss index 953c8c0..1227486 100644 --- a/src/layouts/_media.scss +++ b/src/layouts/_media.scss @@ -1,57 +1,30 @@ @use 'iro-sass/src/index' as iro; @use '../functions' as fn; +$sizes: 'gapless' 'sm' 'lg' 'xl' !default; + @include iro.props-namespace('media') { @include iro.props-store(( --dims: ( - --pad-x: fn.global-dim(--size --150), - --pad-y: fn.global-dim(--size --85), - - --75: ( - --pad-x: fn.global-dim(--size --100), - --pad-y: fn.global-dim(--size --50), - ), + --gap: fn.global-dim(--size --150), - --200: ( - --pad-x: fn.global-dim(--size --300), - --pad-y: fn.global-dim(--size --150), - ), - - --300: ( - --pad-x: fn.global-dim(--size --450), - --pad-y: fn.global-dim(--size --225), - ) + --gapless: 0, + --sm: fn.global-dim(--size --100), + --lg: fn.global-dim(--size --300), + --xl: fn.global-dim(--size --450), ) )); @include iro.bem-layout(iro.props-namespace()) { display: flex; align-items: center; - padding: fn.dim(--pad-y) fn.dim(--pad-x); - gap: fn.dim(--pad-x); + gap: fn.dim(--gap); line-height: 1.4; - @include iro.bem-modifier('75') { - padding: fn.dim(--75 --pad-y) fn.dim(--75 --pad-x); - gap: fn.dim(--75 --pad-x); - } - - @include iro.bem-modifier('200') { - padding: fn.dim(--200 --pad-y) fn.dim(--200 --pad-x); - gap: fn.dim(--200 --pad-x); - } - - @include iro.bem-modifier('300') { - padding: fn.dim(--300 --pad-y) fn.dim(--300 --pad-x); - gap: fn.dim(--300 --pad-x); - } - - @include iro.bem-modifier('flush') { - padding: 0; - } - - @include iro.bem-modifier('gapless') { - gap: 0; + @each $size in $sizes { + @include iro.bem-modifier($size) { + gap: fn.dim(--#{$size}); + } } @include iro.bem-modifier('wrap') { -- cgit v1.2.3-70-g09d2