From 67722515b4882458547bcbe8ac13e60ba3790a56 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Fri, 11 Feb 2022 17:34:57 +0100 Subject: Added backdrop and dialog --- src/objects/_dialog.scss | 57 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 src/objects/_dialog.scss (limited to 'src/objects/_dialog.scss') diff --git a/src/objects/_dialog.scss b/src/objects/_dialog.scss new file mode 100644 index 0000000..453b32b --- /dev/null +++ b/src/objects/_dialog.scss @@ -0,0 +1,57 @@ +@use 'iro-sass/src/index' as iro; +@use '../functions' as fn; + +@include iro.props-namespace('dialog') { + @include iro.props-store(( + --dims: ( + --pad-x: iro.fn-px-to-rem(40px), + --pad-y: iro.fn-px-to-rem(40px), + --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, + ), + ), 'dims'); + + @include iro.props-store(( + --colors: ( + --shadow: 0 .2em .5em rgba(#000, .2), + ), + ), 'colors'); + + @include iro.bem-object(iro.props-namespace()) { + 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') { + padding-bottom: .5rem; + } + + @include iro.bem-elem('title') { + margin-top: 0; + } + + @include iro.bem-elem('body') { + padding-top: .5rem; + } + + @include iro.bem-elem('footer') { + padding-top: fn.dim(--pad-y); + text-align: right; + } + } +} -- cgit v1.2.3-70-g09d2