Skip to content

Commit 97d9685

Browse files
committed
add shadow border to bubble
1 parent da459a1 commit 97d9685

1 file changed

Lines changed: 16 additions & 7 deletions

File tree

src/components/Chat/_chat.scss

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
11
.#{$eccgui}-chat__content {
2+
@extend .bp5-elevation-1;
3+
24
position: relative;
5+
z-index: 0;
36
min-height: $button-height;
47
padding: $eccgui-size-inline-whitespace;
58
overflow: auto;
69
background-color: var(--#{$eccgui}-chat__content-background);
7-
border-radius: $pt-border-radius;
10+
border-radius: 3 * $pt-border-radius;
811
}
912

1013
.#{$eccgui}-chat__content--display-free {
11-
padding: 1px 0;
12-
1314
--#{$eccgui}-chat__content-background: transparent;
15+
16+
padding: 1px 0;
17+
box-shadow: none;
1418
}
1519

1620
.#{$eccgui}-chat__content--display-bubble {
17-
margin-left: 0.5 * $eccgui-size-block-whitespace;
21+
margin-left: 0.75 * $eccgui-size-block-whitespace;
1822

1923
&.#{$eccgui}-chat__content--align-right {
20-
margin-right: 0.5 * $eccgui-size-block-whitespace;
24+
margin-right: 0.75 * $eccgui-size-block-whitespace;
2125
margin-left: none;
2226
}
2327
}
@@ -28,20 +32,25 @@
2832
position: relative;
2933

3034
&::before {
35+
@extend .bp5-elevation-1;
36+
3137
position: absolute;
3238
top: calc(#{mini-units(3)} - #{0.5 * $eccgui-size-block-whitespace});
33-
left: 0;
39+
left: 0.25 * $eccgui-size-block-whitespace;
40+
z-index: 1;
3441
width: $eccgui-size-block-whitespace;
3542
height: $eccgui-size-block-whitespace;
3643
content: " ";
3744
background-color: var(--#{$eccgui}-chat__content-background);
45+
clip-path: polygon(-5px calc(100% + 5px), -5px -5px, calc(100% + 5px) calc(100% + 5px));
3846
transform: rotate(45deg);
3947
}
4048
}
4149
&:has(.#{$eccgui}-chat__content--display-bubble.#{$eccgui}-chat__content--align-right) {
4250
&::before {
43-
right: 0;
51+
right: 0.25 * $eccgui-size-block-whitespace;
4452
left: auto;
53+
transform: rotate(225deg);
4554
}
4655
}
4756
}

0 commit comments

Comments
 (0)