@use 'iro-sass/src/index' as iro; @use '../functions' as fn; @include iro.props-namespace('dialog') { @include iro.props-store(( --dims: ( --pad-x: fn.global-dim(--size --300), --pad-y: fn.global-dim(--size --300), --width-sm: iro.fn-px-to-rem(500px), --width-md: iro.fn-px-to-rem(800px), --width-lg: iro.fn-px-to-rem(1100px), --rounding: 3px, --title-body-spacing: fn.global-dim(--size --200), ), ), 'dims'); @include iro.props-store(( --dims: ( --pad-x: fn.global-dim(--size --300), --pad-y: fn.global-dim(--size --300), ), ), 'md'); @include iro.props-store(( --colors: ( --shadow: 0 .2em .5em rgba(#000, .2), ), ), 'colors'); @include iro.bem-object(iro.props-namespace()) { display: grid; grid-template-rows: auto auto 1fr auto; grid-template-areas: 'header' 'rule' 'body' 'footer'; position: relative; box-sizing: border-box; width: 100%; max-width: fn.dim(--width-md); margin: 0 auto; padding: fn.dim(--pad-y) fn.dim(--pad-x); overflow: hidden; border-radius: fn.dim(--rounding); background-color: fn.global-color(--bg); box-shadow: fn.color(--shadow); color: fn.global-color(--fg); @include iro.bem-modifier('sm') { max-width: fn.dim(--width-sm); } @include iro.bem-modifier('lg') { max-width: fn.dim(--width-lg); } @include iro.bem-elem('header') { grid-area: header; margin-bottom: fn.dim(--title-body-spacing); } @include iro.bem-elem('close-btn') { position: absolute; top: iro.fn-px-to-rem(12px); right: iro.fn-px-to-rem(12px); font-size: fn.global-dim(--font-size --150); } @include iro.bem-elem('rule') { grid-area: rule; margin: 0; } @include iro.bem-elem('title') { margin-top: 0; } @include iro.bem-elem('body') { grid-area: body; min-height: 0; margin-top: fn.dim(--title-body-spacing); overflow: auto; scrollbar-color: fn.global-color(--obj-lo) transparent; } @include iro.bem-elem('footer') { grid-area: footer; justify-content: flex-end; margin-top: fn.dim(--pad-y); } } }