Skip to content

Commit 2f14281

Browse files
committed
Merge branch 'main' into feat/chat-icon
2 parents fbce8d2 + 33bf25d commit 2f14281

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

js/chat/chat.scss

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
shiny-chat-container {
22
--shiny-chat-border: var(--bs-border-width, 1px) solid var(--bs-border-color, #e9ecef);
33
--shiny-chat-user-message-bg: RGBA(var(--bs-primary-rgb, 0, 123, 194), 0.06);
4+
--_chat-container-padding: 0.25rem;
45

56
display: flex;
67
flex-direction: column;
78
margin: 0 auto;
89
gap: 1rem;
910
overflow: auto;
10-
padding: 0.25rem;
11+
padding: var(--_chat-container-padding);
12+
padding-bottom: 0; // Bottom padding is on input element
1113

1214
p:last-child {
1315
margin-bottom: 0;
@@ -102,10 +104,15 @@ shiny-chat-message {
102104
}
103105

104106
shiny-chat-input {
107+
--_input-padding-top: 1rem;
108+
--_input-padding-bottom: var(--_chat-container-padding, 0.25rem);
109+
105110
margin-top: auto;
106111
position: sticky;
107-
background-color: var(--bs-body-bg, white);
108112
bottom: 0;
113+
background: linear-gradient(to bottom, transparent, var(--bs-body-bg, white) calc(var(--_input-padding-top) - var(--_input-padding-bottom)));
114+
padding-block: var(--_input-padding-top) var(--_input-padding-bottom);
115+
109116
textarea {
110117
--bs-border-radius: 26px;
111118
resize: none;
@@ -117,7 +124,7 @@ shiny-chat-input {
117124
}
118125
button {
119126
position: absolute;
120-
bottom: 7px;
127+
bottom: calc(6px + var(--_input-padding-bottom));
121128
right: 8px;
122129
background-color: transparent;
123130
color: var(--bs-primary, #007bc2);

shiny/www/py-shiny/chat/chat.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

shiny/www/py-shiny/chat/chat.css.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)