Skip to content

Commit ae4c993

Browse files
perf(ui): keep attachment CSS out of startup
1 parent fc4b237 commit ae4c993

2 files changed

Lines changed: 15 additions & 9 deletions

File tree

‎ui/src/styles/base.css‎

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -399,8 +399,7 @@
399399
corner-shape: superellipse(1.5);
400400
}
401401

402-
.code-block-wrapper.code-block-wrapper,
403-
.chat-assistant-attachment-card.chat-assistant-attachment-card {
402+
.code-block-wrapper.code-block-wrapper {
404403
border-radius: calc(14px * var(--openclaw-corner-radius-scale));
405404
corner-shape: superellipse(1.5);
406405
}
@@ -414,13 +413,6 @@
414413
corner-shape: superellipse(1.5);
415414
}
416415

417-
.chat-image-frame.chat-image-frame,
418-
.chat-message-image-button.chat-message-image-button,
419-
.chat-message-image.chat-message-image {
420-
border-radius: calc(20px * var(--openclaw-corner-radius-scale));
421-
corner-shape: superellipse(1.5);
422-
}
423-
424416
/* The transcript search bar's bottom corners round with its .card ancestor
425417
so the two edges stay optically parallel; only two corners are rounded,
426418
and .chat:has(> .agent-chat__search-bar) zeroes .card's own radius while

‎ui/src/styles/chat/layout.css‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1412,6 +1412,20 @@ openclaw-chat-page {
14121412
transition: transform 150ms ease-out;
14131413
}
14141414

1415+
@supports (corner-shape: superellipse(1.5)) {
1416+
.chat-assistant-attachment-card.chat-assistant-attachment-card {
1417+
border-radius: calc(14px * var(--openclaw-corner-radius-scale));
1418+
corner-shape: superellipse(1.5);
1419+
}
1420+
1421+
.chat-image-frame.chat-image-frame,
1422+
.chat-message-image-button.chat-message-image-button,
1423+
.chat-message-image.chat-message-image {
1424+
border-radius: calc(20px * var(--openclaw-corner-radius-scale));
1425+
corner-shape: superellipse(1.5);
1426+
}
1427+
}
1428+
14151429
.chat-image-frame:hover .chat-message-image,
14161430
.chat-assistant-attachments > .chat-message-image-button:hover .chat-message-image {
14171431
transform: scale(1.02);

0 commit comments

Comments
 (0)