summaryrefslogtreecommitdiffstats
path: root/src/objects/_bubble.scss
diff options
context:
space:
mode:
Diffstat (limited to 'src/objects/_bubble.scss')
-rw-r--r--src/objects/_bubble.scss48
1 files changed, 48 insertions, 0 deletions
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 @@
1@use 'iro-sass/src/index' as iro;
2@use '../functions' as fn;
3
4@include iro.props-namespace('bubble') {
5 @include iro.props-store((
6 --colors: (
7 --image-bg: fn.global-color(--obj),
8 ),
9 ), 'colors');
10
11 @include iro.props-store((
12 --dims: (
13 --pad-x: fn.global-dim(--size --150),
14 --pad-y: fn.global-dim(--size --85),
15 --rounding: 3px,
16 --arrow-size: fn.global-dim(--size --100),
17 )
18 ), 'dims');
19
20 @include iro.bem-object(iro.props-namespace()) {
21 position: relative;
22 padding: fn.dim(--pad-y) fn.dim(--pad-x);
23 border-radius: fn.dim(--rounding);
24 background-color: fn.global-color(--bg);
25 color: fn.global-color(--fg);
26
27 &::before {
28 content: '';
29 display: none;
30 position: absolute;
31 top: 0;
32 left: calc(-1 * fn.dim(--arrow-size));
33 border: fn.dim(--arrow-size) solid fn.global-color(--bg);
34 border-bottom-color: transparent;
35 border-left-color: transparent;
36 }
37
38 @include iro.bem-elem('user') {
39 display: block;
40 }
41
42 @include iro.bem-elem('time') {
43 margin-left: 1em;
44 float: right;
45 transform: translate(.2em, .2em);
46 }
47 }
48}