From cac07ec50d360f3916e84bc3af6164ef07ac2f83 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sun, 27 Mar 2022 11:23:45 +0200 Subject: Update --- src/objects/_action-menu.scss | 1 + src/objects/_bubble.scss | 48 +++++++++++++++++++++++++++++++++++++++++++ src/objects/_dialog.scss | 8 +++++--- 3 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 src/objects/_bubble.scss (limited to 'src/objects') diff --git a/src/objects/_action-menu.scss b/src/objects/_action-menu.scss index 88e84d6..a3e1ca1 100644 --- a/src/objects/_action-menu.scss +++ b/src/objects/_action-menu.scss @@ -56,6 +56,7 @@ transform: translate(var(--x), var(--y)); border: fn.dim(--border) solid fn.color(--border); border-radius: fn.dim(--rounding); + background-clip: padding-box; background-color: fn.global-color(--bg); box-shadow: fn.color(--shadow); color: fn.global-color(--fg); diff --git a/src/objects/_bubble.scss b/src/objects/_bubble.scss new file mode 100644 index 0000000..26746fe --- /dev/null +++ b/src/objects/_bubble.scss @@ -0,0 +1,48 @@ +@use 'iro-sass/src/index' as iro; +@use '../functions' as fn; + +@include iro.props-namespace('bubble') { + @include iro.props-store(( + --colors: ( + --image-bg: fn.global-color(--obj), + ), + ), 'colors'); + + @include iro.props-store(( + --dims: ( + --pad-x: fn.global-dim(--size --150), + --pad-y: fn.global-dim(--size --85), + --rounding: 3px, + --arrow-size: fn.global-dim(--size --100), + ) + ), 'dims'); + + @include iro.bem-object(iro.props-namespace()) { + position: relative; + padding: fn.dim(--pad-y) fn.dim(--pad-x); + border-radius: fn.dim(--rounding); + background-color: fn.global-color(--bg); + color: fn.global-color(--fg); + + &::before { + content: ''; + display: none; + position: absolute; + top: 0; + left: calc(-1 * fn.dim(--arrow-size)); + border: fn.dim(--arrow-size) solid fn.global-color(--bg); + border-bottom-color: transparent; + border-left-color: transparent; + } + + @include iro.bem-elem('user') { + display: block; + } + + @include iro.bem-elem('time') { + margin-left: 1em; + float: right; + transform: translate(.2em, .2em); + } + } +} diff --git a/src/objects/_dialog.scss b/src/objects/_dialog.scss index f6e8e63..094e09b 100644 --- a/src/objects/_dialog.scss +++ b/src/objects/_dialog.scss @@ -9,7 +9,7 @@ --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, + --rounding: 8px, --border: 1px, --body: ( @@ -28,7 +28,7 @@ @include iro.props-store(( --colors: ( - --border: rgba(#000, .05), + --border: rgba(#000, .2), --shadow: 0 .2em .5em rgba(#000, .2), --sidebar: ( @@ -57,9 +57,11 @@ max-width: fn.dim(--width-md); margin: 0 auto; overflow: hidden; + border: fn.dim(--border) solid fn.color(--border); border-radius: fn.dim(--rounding); + background-clip: padding-box; background-color: fn.global-color(--bg); - box-shadow: 0 0 0 1px fn.color(--border), fn.color(--shadow); + box-shadow: fn.color(--shadow); color: fn.global-color(--fg); @include iro.bem-modifier('sm') { -- cgit v1.2.3-70-g09d2