summaryrefslogtreecommitdiffstats
path: root/src/layouts
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2023-11-09 15:44:54 +0100
committerVolpeon <git@volpeon.ink>2023-11-09 15:44:54 +0100
commit679b9b108101b67ad56b4fdf35ec2bd0568d8d84 (patch)
tree1b097e9f90627ca401174c738a8d754e8f2cce6b /src/layouts
parentSimplified bubble arrows (diff)
downloadiro-design-679b9b108101b67ad56b4fdf35ec2bd0568d8d84.tar.gz
iro-design-679b9b108101b67ad56b4fdf35ec2bd0568d8d84.tar.bz2
iro-design-679b9b108101b67ad56b4fdf35ec2bd0568d8d84.zip
Renamed "bubble" to "message", added message group merging
Diffstat (limited to 'src/layouts')
-rw-r--r--src/layouts/_message-group.scss (renamed from src/layouts/_bubble-group.scss)47
1 files changed, 38 insertions, 9 deletions
diff --git a/src/layouts/_bubble-group.scss b/src/layouts/_message-group.scss
index e4bc666..d95c9e8 100644
--- a/src/layouts/_bubble-group.scss
+++ b/src/layouts/_message-group.scss
@@ -1,7 +1,9 @@
1@use 'iro-sass/src/index' as iro; 1@use 'iro-sass/src/index' as iro;
2@use '../functions' as fn; 2@use '../functions' as fn;
3 3
4@include iro.props-namespace('bubble-group') { 4@use '../objects/message';
5
6@include iro.props-namespace('message-group') {
5 @include iro.props-store(( 7 @include iro.props-store((
6 --dims: ( 8 --dims: (
7 --spacing-x: fn.global-dim(--size --225), 9 --spacing-x: fn.global-dim(--size --225),
@@ -19,16 +21,17 @@
19 display: grid; 21 display: grid;
20 grid-template-columns: auto 1fr; 22 grid-template-columns: auto 1fr;
21 grid-auto-rows: auto; 23 grid-auto-rows: auto;
22 grid-template-areas: 'avatar bubble' 'avatar .'; 24 grid-template-areas: 'avatar message' 'avatar .';
23 align-items: flex-start; 25 align-items: flex-start;
24 gap: 0 fn.dim(--spacing-x); 26 gap: 0 fn.dim(--spacing-x);
25 27
26 @include iro.bem-elem('avatar') { 28 @include iro.bem-elem('avatar') {
27 grid-area: avatar; 29 grid-area: avatar;
30 height: 0;
28 } 31 }
29 32
30 @include iro.bem-elem('bubble') { 33 @include iro.bem-elem('message') {
31 grid-column: bubble; 34 grid-column: message;
32 box-sizing: border-box; 35 box-sizing: border-box;
33 min-width: 0; 36 min-width: 0;
34 max-width: 100%; 37 max-width: 100%;
@@ -50,7 +53,7 @@
50 } 53 }
51 54
52 @include iro.bem-modifier('right') { 55 @include iro.bem-modifier('right') {
53 @include iro.bem-elem('bubble') { 56 @include iro.bem-elem('message') {
54 &::before { 57 &::before {
55 right: calc(-1 * fn.dim(--arrow-size)); 58 right: calc(-1 * fn.dim(--arrow-size));
56 left: auto; 59 left: auto;
@@ -71,7 +74,7 @@
71 justify-items: end; 74 justify-items: end;
72 } 75 }
73 76
74 @include iro.bem-elem('bubble') { 77 @include iro.bem-elem('message') {
75 @include iro.bem-next-twin-elem { 78 @include iro.bem-next-twin-elem {
76 margin-top: fn.dim(--compact --spacing-y); 79 margin-top: fn.dim(--compact --spacing-y);
77 } 80 }
@@ -80,12 +83,12 @@
80 83
81 @include iro.bem-modifier('right') { 84 @include iro.bem-modifier('right') {
82 grid-template-columns: 1fr auto; 85 grid-template-columns: 1fr auto;
83 grid-template-areas: 'bubble avatar' '. avatar'; 86 grid-template-areas: 'message avatar' '. avatar';
84 } 87 }
85 88
86 @include iro.bem-modifier('no-avatar') { 89 @include iro.bem-modifier('no-avatar') {
87 grid-template-columns: 1fr; 90 grid-template-columns: 1fr;
88 grid-template-areas: 'bubble'; 91 grid-template-areas: 'message';
89 92
90 @include iro.bem-elem('avatar') { 93 @include iro.bem-elem('avatar') {
91 display: none; 94 display: none;
@@ -93,7 +96,7 @@
93 } 96 }
94 97
95 @include iro.bem-modifier('arrow') { 98 @include iro.bem-modifier('arrow') {
96 @include iro.bem-elem('bubble') { 99 @include iro.bem-elem('message') {
97 &::before { 100 &::before {
98 display: block; 101 display: block;
99 } 102 }
@@ -105,5 +108,31 @@
105 } 108 }
106 } 109 }
107 } 110 }
111
112 & + & {
113 @include iro.bem-modifier('merge') {
114 margin-top: fn.dim(--spacing-y);
115
116 @include iro.bem-elem('avatar') {
117 visibility: hidden;
118 }
119
120 @include iro.bem-modifier('compact') {
121 margin-top: fn.dim(--compact --spacing-y);
122 }
123
124 @include iro.bem-elem('merge-hide') {
125 display: none;
126 }
127
128 @include iro.bem-modifier('arrow') {
129 @include iro.bem-elem('message') {
130 &::before {
131 display: none;
132 }
133 }
134 }
135 }
136 }
108 } 137 }
109} 138}