v3: fix chatbox scroll position on reply, small visual tweaks
All checks were successful
Build and Publish Docker Image / build-and-push (push) Successful in 40s
All checks were successful
Build and Publish Docker Image / build-and-push (push) Successful in 40s
This commit is contained in:
@@ -391,7 +391,10 @@ export function ChatModal({ onClose }: { onClose: () => void }) {
|
|||||||
const node = listRef.current;
|
const node = listRef.current;
|
||||||
if (node && stickToBottomRef.current) node.scrollTop = node.scrollHeight;
|
if (node && stickToBottomRef.current) node.scrollTop = node.scrollHeight;
|
||||||
});
|
});
|
||||||
}, [messages, typingOthers.length]);
|
// `replyTarget` is a dependency because the reply bar inserts itself
|
||||||
|
// between the list and the composer, shrinking the list: when pinned we
|
||||||
|
// must re-anchor to the bottom so the last message isn't hidden behind it.
|
||||||
|
}, [messages, typingOthers.length, replyTarget]);
|
||||||
|
|
||||||
const handleScroll = useCallback(() => {
|
const handleScroll = useCallback(() => {
|
||||||
const el = listRef.current;
|
const el = listRef.current;
|
||||||
|
|||||||
@@ -170,6 +170,18 @@
|
|||||||
transform: translate(2px, 2px);
|
transform: translate(2px, 2px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* In the light variant the resting text colour is dark, but on hover the
|
||||||
|
danger button fills with the dark --color-danger-hover. Force light text on
|
||||||
|
hover so the label stays legible. */
|
||||||
|
@media (prefers-color-scheme: light) {
|
||||||
|
:root[data-style="brutalist"]:not([data-color-scheme]) .btn-danger:hover {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
:root[data-style="brutalist"][data-color-scheme="light"] .btn-danger:hover {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
/* Ghost / icon-only buttons — keep borderless, no press effect */
|
/* Ghost / icon-only buttons — keep borderless, no press effect */
|
||||||
[data-style="brutalist"] .modal-close-btn,
|
[data-style="brutalist"] .modal-close-btn,
|
||||||
[data-style="brutalist"] .playlist-remove-btn,
|
[data-style="brutalist"] .playlist-remove-btn,
|
||||||
|
|||||||
@@ -289,6 +289,18 @@
|
|||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* In the light variant the resting text colour is dark, but on hover the
|
||||||
|
danger button fills with the dark --color-danger-hover. Force light text on
|
||||||
|
hover so the label stays legible. */
|
||||||
|
@media (prefers-color-scheme: light) {
|
||||||
|
:root[data-style="geocities"]:not([data-color-scheme]) .btn-danger:hover {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
:root[data-style="geocities"][data-color-scheme="light"] .btn-danger:hover {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
/* The shared .vote-btn declares `background: transparent`, which leaves the
|
/* The shared .vote-btn declares `background: transparent`, which leaves the
|
||||||
chunky outset bevel see-through against the card. Give the resting state a
|
chunky outset bevel see-through against the card. Give the resting state a
|
||||||
solid raised-panel fill; the voted (--active) state keeps its accent
|
solid raised-panel fill; the voted (--active) state keeps its accent
|
||||||
|
|||||||
@@ -189,6 +189,18 @@
|
|||||||
--fab-radius: 0;
|
--fab-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* In the light variant the resting text colour is dark, but on hover the
|
||||||
|
danger button fills with the dark --color-danger-hover. Force light text on
|
||||||
|
hover so the label stays legible. */
|
||||||
|
@media (prefers-color-scheme: light) {
|
||||||
|
:root[data-style="nyt"]:not([data-color-scheme]) .btn-danger:hover {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
:root[data-style="nyt"][data-color-scheme="light"] .btn-danger:hover {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
/* ── Headlines — display serif ───────────────────────────────────── */
|
/* ── Headlines — display serif ───────────────────────────────────── */
|
||||||
[data-style="nyt"] h1,
|
[data-style="nyt"] h1,
|
||||||
[data-style="nyt"] .app-header-brand,
|
[data-style="nyt"] .app-header-brand,
|
||||||
|
|||||||
Reference in New Issue
Block a user