@use 'iro-sass/src/index' as iro; @use 'include-media/dist/include-media' as media; @use '../functions' as fn; @include iro.props-namespace('container') { @include iro.props-store(( --dims: ( --content-width: iro.fn-px-to-rem(700px), --sm-content-width: iro.fn-px-to-rem(360px), --padding-x: 3rem, --padding-y: 3rem, --in-page-spacing-y: fn.dim(--spacing --y --xl, $global: true), ) ), 'dims'); @include iro.bem-layout(iro.props-namespace()) { overflow: hidden; @include iro.bem-elem('inner') { margin-top: calc(-1 * fn.dim(--spacing --y --xl, $global: true)); margin-bottom: calc(-1 * fn.dim(--spacing --y --xl, $global: true)); &::before, &::after { content: ''; display: block; width: 0; height: 0; } &::before { margin-bottom: fn.dim(--spacing --y --xl, $global: true); } &::after { margin-top: fn.dim(--spacing --y --xl, $global: true); } } @include iro.bem-modifier('pad-x') { padding-right: fn.dim(--padding-x); padding-left: fn.dim(--padding-x); } @include iro.bem-modifier('pad-y') { padding-top: fn.dim(--padding-y); padding-bottom: fn.dim(--padding-y); } @include iro.bem-modifier('narrow') { max-width: fn.dim(--content-width); margin-right: auto; margin-left: auto; @each $breakpoint in map-keys(media.$breakpoints) { @include media.media('<=#{$breakpoint}') { @include iro.bem-suffix('#{$breakpoint}-down') { max-width: fn.dim(--content-width); margin-right: auto; margin-left: auto; } } } } @include iro.bem-modifier('sm-narrow') { max-width: fn.dim(--sm-content-width); margin-right: auto; margin-left: auto; @each $breakpoint in map-keys(media.$breakpoints) { @include media.media('<=#{$breakpoint}') { @include iro.bem-suffix('#{$breakpoint}-down') { max-width: fn.dim(--sm-content-width); margin-right: auto; margin-left: auto; } } } } @include iro.bem-modifier('themed') { background-color: fn.color(--bg, $global: true); color: fn.color(--fg, $global: true); } @include iro.bem-modifier('in-page') { margin-top: fn.dim(--in-page-spacing-y); margin-bottom: fn.dim(--in-page-spacing-y); } } }