Skip to content

Commit aaf46d1

Browse files
committed
feat: enhance chat layout and responsiveness for user feedback and messages
1 parent 0e6e4dd commit aaf46d1

1 file changed

Lines changed: 23 additions & 18 deletions

File tree

pages/static/style.css

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,29 @@ body * {
4242
.stMainBlockContainer {
4343
padding-top: 0.5rem !important;
4444
margin-top: 0 !important;
45+
padding-left: 1rem !important;
46+
padding-right: 1rem !important;
4547
}
48+
49+
.st-key-user_feedback_faces {
50+
justify-content: flex-end !important;
51+
margin-left: auto !important;
52+
margin-right: 0 !important;
53+
width: 100% !important;
54+
}
55+
/* Mobile font size for h1 in page header ask_uos_chat.py*/
56+
.st-key-page-header-container h1 {
57+
font-size: 1.7rem !important;
58+
}
59+
60+
.stChatMessage {
61+
max-width: 100% !important; /* Set the max-width to 95% */
62+
width: 100% !important; /* Set the width to 95% */
63+
margin-left: auto; /* Center the chat message */
64+
margin-right: auto; /* Center the chat message */
65+
}
66+
67+
4668
}
4769

4870

@@ -168,15 +190,6 @@ span[data-testid="stHeaderActionElements"] a {
168190
}
169191
}
170192

171-
/* Adjust the width of the chat message (on mobile view) */
172-
@media (max-width: 600px) {
173-
.stChatMessage {
174-
max-width: 100% !important; /* Set the max-width to 95% */
175-
width: 100% !important; /* Set the width to 95% */
176-
margin-left: auto; /* Center the chat message */
177-
margin-right: auto; /* Center the chat message */
178-
}
179-
}
180193

181194
/* Always align feedback faces to the right inside the chat container */
182195
.st-key-user_feedback_faces {
@@ -192,15 +205,7 @@ span[data-testid="stHeaderActionElements"] a {
192205
overflow-x: auto; /* Allow horizontal scroll if needed */
193206
}
194207

195-
/* On mobile, prevent column stacking for feedback faces */
196-
@media (max-width: 600px) {
197-
.st-key-user_feedback_faces {
198-
justify-content: flex-end !important;
199-
margin-left: auto !important;
200-
margin-right: 0 !important;
201-
width: 100% !important;
202-
}
203-
}
208+
204209

205210
/* Make feedback faces (icons/buttons) look like Material UI Sentiment faces */
206211
.st-key-user_feedback_faces button,

0 commit comments

Comments
 (0)