| 1 |
|
| 2 |
|
| 3 |
.chat-room { |
| 4 |
display: flex; |
| 5 |
flex-direction: column; |
| 6 |
border: 1px solid var(--border); |
| 7 |
background: var(--light-background); |
| 8 |
} |
| 9 |
|
| 10 |
|
| 11 |
page is what lets the island keep the newest message in view without moving |
| 12 |
the thing the reader is typing into. |
| 13 |
.chat-log { |
| 14 |
list-style: none; |
| 15 |
margin: 0; |
| 16 |
padding: 0.5rem; |
| 17 |
height: 60vh; |
| 18 |
min-height: 15rem; |
| 19 |
overflow-y: auto; |
| 20 |
overscroll-behavior: contain; |
| 21 |
} |
| 22 |
|
| 23 |
.chat-message { |
| 24 |
display: flex; |
| 25 |
align-items: baseline; |
| 26 |
gap: 0.4rem; |
| 27 |
padding: 0.25rem 0.35rem; |
| 28 |
line-height: 1.45; |
| 29 |
} |
| 30 |
|
| 31 |
.chat-message:hover { |
| 32 |
background: var(--surface-alt); |
| 33 |
} |
| 34 |
|
| 35 |
.chat-avatar { |
| 36 |
align-self: center; |
| 37 |
border-radius: 50%; |
| 38 |
flex-shrink: 0; |
| 39 |
} |
| 40 |
|
| 41 |
.chat-author { |
| 42 |
font-weight: bold; |
| 43 |
color: var(--detail); |
| 44 |
white-space: nowrap; |
| 45 |
} |
| 46 |
|
| 47 |
.chat-time { |
| 48 |
font-family: "IBM Plex Mono", monospace; |
| 49 |
font-size: 0.75rem; |
| 50 |
color: var(--text-muted); |
| 51 |
white-space: nowrap; |
| 52 |
} |
| 53 |
|
| 54 |
.chat-body { |
| 55 |
flex: 1; |
| 56 |
min-width: 0; |
| 57 |
overflow-wrap: anywhere; |
| 58 |
} |
| 59 |
|
| 60 |
|
| 61 |
message is on screen the instant it is typed, and the dimming is the only |
| 62 |
thing saying it is not confirmed. |
| 63 |
.chat-message.is-pending { |
| 64 |
opacity: 0.55; |
| 65 |
} |
| 66 |
|
| 67 |
.chat-message.is-failed { |
| 68 |
opacity: 1; |
| 69 |
border-left: 2px solid var(--danger); |
| 70 |
} |
| 71 |
|
| 72 |
|
| 73 |
chat scrolls, the highlight has to survive being one of forty messages, and |
| 74 |
there is deliberately no notification behind it. |
| 75 |
.chat-message.is-mention { |
| 76 |
background: var(--surface-alt); |
| 77 |
border-left: 2px solid var(--highlight); |
| 78 |
} |
| 79 |
|
| 80 |
.chat-error { |
| 81 |
color: var(--danger); |
| 82 |
font-size: 0.85rem; |
| 83 |
} |
| 84 |
|
| 85 |
|
| 86 |
message is under the pointer, and both are always reachable by keyboard. |
| 87 |
.chat-remove, |
| 88 |
.chat-retry { |
| 89 |
background: none; |
| 90 |
border: 1px solid transparent; |
| 91 |
color: var(--text-muted); |
| 92 |
cursor: pointer; |
| 93 |
font-family: "IBM Plex Mono", monospace; |
| 94 |
font-size: 0.75rem; |
| 95 |
padding: 0 0.3rem; |
| 96 |
} |
| 97 |
|
| 98 |
.chat-remove { |
| 99 |
opacity: 0; |
| 100 |
margin-left: auto; |
| 101 |
} |
| 102 |
|
| 103 |
.chat-message:hover .chat-remove, |
| 104 |
.chat-remove:focus-visible { |
| 105 |
opacity: 1; |
| 106 |
} |
| 107 |
|
| 108 |
.chat-remove:hover, |
| 109 |
.chat-retry:hover { |
| 110 |
color: var(--danger); |
| 111 |
border-color: var(--border); |
| 112 |
} |
| 113 |
|
| 114 |
.chat-status { |
| 115 |
margin: 0; |
| 116 |
padding: 0.35rem 0.6rem; |
| 117 |
border-top: 1px solid var(--border); |
| 118 |
background: var(--surface-alt); |
| 119 |
color: var(--text-muted); |
| 120 |
font-size: 0.85rem; |
| 121 |
} |
| 122 |
|
| 123 |
.chat-composer { |
| 124 |
display: flex; |
| 125 |
gap: 0.5rem; |
| 126 |
padding: 0.5rem; |
| 127 |
border-top: 1px solid var(--border); |
| 128 |
} |
| 129 |
|
| 130 |
.chat-composer input[type="text"] { |
| 131 |
flex: 1; |
| 132 |
min-width: 0; |
| 133 |
background: var(--input-background); |
| 134 |
border: 1px solid var(--border); |
| 135 |
color: var(--detail); |
| 136 |
padding: 0.45rem 0.6rem; |
| 137 |
} |
| 138 |
|
| 139 |
.chat-notice { |
| 140 |
padding: 0.6rem; |
| 141 |
border-top: 1px solid var(--border); |
| 142 |
color: var(--text-muted); |
| 143 |
font-size: 0.9rem; |
| 144 |
} |
| 145 |
|
| 146 |
|