This repository has been archived on 2026-04-03. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
core/packages/chat/css/main.css
Jeffrey Smith ffa7e85551
Some checks failed
CI/CD / detect-changes (pull_request) Successful in 4s
CI/CD / test-frontend (pull_request) Successful in 6s
CI/CD / build-and-deploy (pull_request) Has been cancelled
CI/CD / test-sqlite (pull_request) Has been cancelled
CI/CD / test-go-pg (pull_request) Has been cancelled
Feat v0.6.13 responsive spacing
Add spacing token scale (--sp-1 through --sp-12, 4px grid) and tablet
breakpoint (max-width: 1024px). Migrate all kernel CSS and 12 in-tree
extension packages from hardcoded padding/margin/gap to design tokens.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 12:24:28 +00:00

617 lines
12 KiB
CSS

/* ═══════════════════════════════════════════
Chat Surface — Styles (v0.2.0)
Uses variables.css theme tokens:
--bg, --bg-surface, --bg-raised, --bg-hover, --bg-secondary
--text, --text-2, --text-3
--accent, --accent-dim, --border, --border-light
--input-bg, --danger, --danger-bg, --success
═══════════════════════════════════════════ */
/* ── Layout ─────────────────────────────── */
.ext-chat-app {
display: flex;
flex-direction: column;
height: 100%;
overflow: hidden;
background: var(--bg);
color: var(--text);
}
.ext-chat-loading {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
.ext-chat-body {
display: flex;
flex: 1;
min-height: 0;
}
.ext-chat-main {
display: flex;
flex-direction: column;
flex: 1;
min-width: 0;
}
/* ── Topbar extras ──────────────────────── */
.ext-chat-topbar__thread-title {
font-weight: 600;
font-size: 14px;
margin-right: var(--sp-2);
color: var(--text-2);
}
/* ── Sidebar ────────────────────────────── */
.ext-chat-sidebar {
width: 280px;
min-width: 280px;
border-right: 1px solid var(--border);
display: flex;
flex-direction: column;
background: var(--bg-secondary);
}
.ext-chat-sidebar__header {
display: flex;
align-items: center;
justify-content: space-between;
padding: var(--sp-3) var(--sp-4);
border-bottom: 1px solid var(--border);
}
.ext-chat-sidebar__title {
font-weight: 600;
font-size: 14px;
}
.ext-chat-sidebar__list {
flex: 1;
overflow-y: auto;
}
.ext-chat-sidebar__empty {
padding: var(--sp-6) var(--sp-4);
text-align: center;
color: var(--text-3);
font-size: 13px;
}
.ext-chat-sidebar__item {
padding: var(--sp-3) var(--sp-4);
cursor: pointer;
border-bottom: 1px solid var(--border-light);
transition: background 0.1s;
}
.ext-chat-sidebar__item:hover {
background: var(--bg-hover);
}
.ext-chat-sidebar__item--active {
background: var(--accent-dim);
}
.ext-chat-sidebar__item-top {
display: flex;
justify-content: space-between;
align-items: baseline;
margin-bottom: 2px;
}
.ext-chat-sidebar__item-title {
font-weight: 600;
font-size: 13px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
flex: 1;
margin-right: var(--sp-2);
}
.ext-chat-sidebar__item-time {
font-size: 11px;
color: var(--text-3);
white-space: nowrap;
}
.ext-chat-sidebar__item-bottom {
display: flex;
align-items: center;
gap: var(--sp-2);
}
.ext-chat-sidebar__item-preview {
font-size: 12px;
color: var(--text-2);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
flex: 1;
}
.ext-chat-sidebar__badge {
background: var(--accent);
color: var(--text-on-color);
font-size: 11px;
font-weight: 600;
min-width: 18px;
height: 18px;
border-radius: 9px;
display: flex;
align-items: center;
justify-content: center;
padding: 0 5px;
flex-shrink: 0;
}
/* ── Sidebar Search ────────────────────── */
.ext-chat-sidebar__search {
position: relative;
padding: var(--sp-2) var(--sp-4);
border-bottom: 1px solid var(--border-light);
}
.ext-chat-sidebar__search-input {
width: 100%;
border: 1px solid var(--border);
border-radius: 6px;
padding: var(--sp-2) var(--sp-6) var(--sp-2) var(--sp-3);
font-size: 13px;
font-family: inherit;
background: var(--input-bg);
color: var(--text);
box-sizing: border-box;
}
.ext-chat-sidebar__search-input:focus {
outline: none;
border-color: var(--accent);
}
.ext-chat-sidebar__search-clear {
position: absolute;
right: 22px;
top: 50%;
transform: translateY(-50%);
background: none;
border: none;
color: var(--text-3);
cursor: pointer;
font-size: 16px;
padding: 0 var(--sp-1);
line-height: 1;
}
.ext-chat-sidebar__search-clear:hover {
color: var(--text);
}
.ext-chat-sidebar__search-results {
flex: 1;
overflow-y: auto;
}
.ext-chat-sidebar__search-section {
padding: var(--sp-2) var(--sp-4) var(--sp-1);
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
color: var(--text-3);
}
.ext-chat-sidebar__search-loading {
display: flex;
justify-content: center;
padding: var(--sp-4);
}
.ext-chat-sidebar__item--search-msg .ext-chat-sidebar__item-preview {
font-size: 13px;
white-space: normal;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
/* ── Message Thread ─────────────────────── */
.ext-chat-thread {
flex: 1;
display: flex;
flex-direction: column;
min-height: 0;
}
.ext-chat-thread--empty {
align-items: center;
justify-content: center;
color: var(--text-3);
}
.ext-chat-thread__messages {
flex: 1;
overflow-y: auto;
padding: var(--sp-4);
display: flex;
flex-direction: column;
gap: var(--sp-1);
}
.ext-chat-thread__loading {
display: flex;
justify-content: center;
padding: var(--sp-6);
}
.ext-chat-thread__loading-more {
display: flex;
justify-content: center;
padding: var(--sp-2);
}
.ext-chat-thread__load-more {
align-self: center;
background: none;
border: 1px solid var(--border);
border-radius: 4px;
padding: var(--sp-1) var(--sp-3);
font-size: 12px;
color: var(--text-2);
cursor: pointer;
margin-bottom: var(--sp-2);
}
.ext-chat-thread__load-more:hover {
background: var(--bg-hover);
}
.ext-chat-thread__typing {
padding: var(--sp-1) var(--sp-4) var(--sp-2);
font-size: 12px;
color: var(--text-3);
font-style: italic;
}
/* ── Message Bubble ─────────────────────── */
.ext-chat-msg {
display: flex;
align-items: flex-start;
gap: var(--sp-2);
padding: var(--sp-1) 0;
position: relative;
}
.ext-chat-msg--own {
flex-direction: row-reverse;
}
.ext-chat-msg--system {
justify-content: center;
padding: 2px 0;
}
.ext-chat-msg--system span {
font-size: 12px;
color: var(--text-3);
font-style: italic;
}
.ext-chat-msg--deleted {
justify-content: center;
padding: 2px 0;
}
.ext-chat-msg--deleted em {
font-size: 12px;
color: var(--text-3);
}
.ext-chat-msg__body {
max-width: 65%;
background: var(--bg-raised);
border-radius: 12px;
padding: var(--sp-2) var(--sp-3);
}
.ext-chat-msg--own .ext-chat-msg__body {
background: var(--accent);
color: var(--text-on-color);
}
.ext-chat-msg__name {
font-size: 11px;
font-weight: 600;
color: var(--text-2);
display: block;
margin-bottom: 2px;
}
.ext-chat-msg__content {
font-size: 14px;
line-height: 1.4;
white-space: pre-wrap;
word-break: break-word;
}
.ext-chat-msg__meta {
display: flex;
gap: var(--sp-2);
align-items: center;
margin-top: 2px;
}
.ext-chat-msg__time {
font-size: 10px;
color: var(--text-3);
}
.ext-chat-msg--own .ext-chat-msg__time {
color: rgba(255, 255, 255, 0.7);
}
.ext-chat-msg__edited {
font-size: 10px;
color: var(--text-3);
font-style: italic;
}
.ext-chat-msg--own .ext-chat-msg__edited {
color: rgba(255, 255, 255, 0.7);
}
/* ── Message Actions ────────────────────── */
.ext-chat-msg__actions {
display: flex;
gap: 2px;
position: absolute;
top: 0;
right: 0;
background: var(--bg-surface);
border: 1px solid var(--border);
border-radius: 6px;
box-shadow: var(--shadow-lg);
padding: 2px;
}
.ext-chat-msg--own .ext-chat-msg__actions {
right: auto;
left: 0;
}
.ext-chat-msg__action {
background: none;
border: none;
padding: var(--sp-1) var(--sp-2);
cursor: pointer;
border-radius: 4px;
font-size: 14px;
line-height: 1;
color: var(--text-2);
}
.ext-chat-msg__action:hover {
background: var(--bg-hover);
}
.ext-chat-msg__action--danger:hover {
background: var(--danger-bg);
color: var(--danger);
}
/* ── Message Edit ───────────────────────── */
.ext-chat-msg__edit {
display: flex;
flex-direction: column;
gap: var(--sp-2);
}
.ext-chat-msg__edit-input {
width: 100%;
min-width: 200px;
border: 1px solid var(--border);
border-radius: 6px;
padding: var(--sp-2) var(--sp-2);
font-size: 14px;
font-family: inherit;
resize: vertical;
background: var(--input-bg);
color: var(--text);
}
.ext-chat-msg__edit-actions {
display: flex;
gap: var(--sp-2);
justify-content: flex-end;
}
/* ── Compose Bar ────────────────────────── */
.ext-chat-compose {
display: flex;
align-items: flex-end;
gap: var(--sp-2);
padding: var(--sp-3) var(--sp-4);
border-top: 1px solid var(--border);
background: var(--bg);
}
.ext-chat-compose__input {
flex: 1;
border: 1px solid var(--border);
border-radius: 8px;
padding: var(--sp-2) var(--sp-3);
font-size: 14px;
font-family: inherit;
resize: none;
line-height: 1.4;
max-height: 160px;
background: var(--input-bg);
color: var(--text);
}
.ext-chat-compose__input:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 2px var(--accent-dim);
}
/* ── Participant Sidebar ────────────────── */
.ext-chat-participants {
width: 240px;
min-width: 240px;
border-left: 1px solid var(--border);
display: flex;
flex-direction: column;
background: var(--bg-secondary);
}
.ext-chat-participants__header {
display: flex;
align-items: center;
justify-content: space-between;
padding: var(--sp-3) var(--sp-4);
border-bottom: 1px solid var(--border);
font-weight: 600;
font-size: 13px;
}
.ext-chat-participants__list {
flex: 1;
overflow-y: auto;
padding: var(--sp-2) 0;
}
.ext-chat-participants__item {
display: flex;
align-items: center;
gap: var(--sp-2);
padding: var(--sp-2) var(--sp-4);
}
.ext-chat-participants__name {
flex: 1;
font-size: 13px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.ext-chat-participants__badge {
font-size: 10px;
color: var(--accent);
font-weight: 600;
margin-left: var(--sp-1);
}
.ext-chat-participants__status {
width: 8px;
height: 8px;
border-radius: 50%;
background: var(--text-3);
flex-shrink: 0;
}
.ext-chat-participants__status--online {
background: var(--success);
}
.ext-chat-participants__remove {
background: none;
border: none;
color: var(--text-3);
cursor: pointer;
font-size: 16px;
padding: 0 var(--sp-1);
line-height: 1;
}
.ext-chat-participants__remove:hover {
color: var(--danger);
}
/* ── New Conversation Dialog ────────────── */
.ext-chat-new {
display: flex;
flex-direction: column;
gap: var(--sp-3);
min-width: 320px;
}
.ext-chat-new__type {
display: flex;
gap: var(--sp-4);
}
.ext-chat-new__type label {
display: flex;
align-items: center;
gap: var(--sp-2);
font-size: 13px;
cursor: pointer;
}
.ext-chat-new__title {
border: 1px solid var(--border);
border-radius: 6px;
padding: var(--sp-2) var(--sp-3);
font-size: 14px;
font-family: inherit;
background: var(--input-bg);
color: var(--text);
}
.ext-chat-new__selected {
display: flex;
flex-wrap: wrap;
gap: var(--sp-2);
}
.ext-chat-new__chip {
display: inline-flex;
align-items: center;
gap: var(--sp-1);
background: var(--accent-dim);
color: var(--accent);
font-size: 12px;
font-weight: 500;
padding: 3px var(--sp-2);
border-radius: 12px;
}
.ext-chat-new__chip button {
background: none;
border: none;
color: inherit;
cursor: pointer;
font-size: 14px;
padding: 0;
line-height: 1;
}
/* ── Dialog UserPicker overflow fix ─────── */
/* Allow the autocomplete dropdown to overflow the dialog body.
Applies to both New Conversation and Add Participant dialogs. */
[data-ext="chat"] .sw-dialog__body:has(.sw-user-picker) {
overflow: visible;
}
[data-ext="chat"] .sw-dialog:has(.sw-user-picker) {
overflow: visible;
}