mirror of
https://github.com/ancsemi/Haven.git
synced 2026-10-27 00:54:56 +00:00
Every new reply scrolled the thread to the bottom. It now follows only a reader within 40px of the end (or their own reply); otherwise the view stays put and a button at the foot counts the new replies and jumps to the latest.
105 lines
2.4 KiB
CSS
105 lines
2.4 KiB
CSS
/* Thread replies you have not seen (app-thread-unread.js). */
|
|
|
|
/* "N new" on the thread chip under its message. */
|
|
.thread-preview-new {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.25rem;
|
|
margin-left: 0.25rem;
|
|
padding: 0.0625rem 0.375rem;
|
|
border-radius: 999px;
|
|
background: var(--accent);
|
|
color: var(--accent-text, #fff);
|
|
font-size: 0.6875rem;
|
|
font-weight: 700;
|
|
line-height: 1.3;
|
|
white-space: nowrap;
|
|
}
|
|
.thread-new-dot {
|
|
width: 0.375rem;
|
|
height: 0.375rem;
|
|
border-radius: 50%;
|
|
background: currentColor;
|
|
flex-shrink: 0;
|
|
}
|
|
.thread-preview.thread-preview-has-new .thread-preview-count {
|
|
font-weight: 700;
|
|
}
|
|
|
|
/* The channel header's Threads button with news in it. */
|
|
#threads-toggle-btn.threads-btn-has-new {
|
|
position: relative;
|
|
}
|
|
.threads-btn-badge {
|
|
position: absolute;
|
|
top: -0.25rem;
|
|
right: -0.25rem;
|
|
min-width: 1rem;
|
|
height: 1rem;
|
|
padding: 0 0.25rem;
|
|
border-radius: 999px;
|
|
background: var(--accent);
|
|
color: var(--accent-text, #fff);
|
|
font-size: 0.625rem;
|
|
font-weight: 700;
|
|
line-height: 1rem;
|
|
text-align: center;
|
|
pointer-events: none;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
/* A row in the Threads list. */
|
|
.thread-list-new {
|
|
margin-left: auto;
|
|
display: inline-flex;
|
|
}
|
|
.thread-list-new + .thread-list-when,
|
|
.thread-list-when + .thread-list-new {
|
|
margin-left: 0.375rem;
|
|
}
|
|
|
|
/* The sidebar dot for news in a thread you take part in, drawn like the
|
|
forum dot. */
|
|
.channel-thread-dot {
|
|
width: 0.5rem;
|
|
height: 0.5rem;
|
|
margin-left: 0.375rem;
|
|
border-radius: 50%;
|
|
background: var(--accent);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
/* The foot of the thread panel: replies that came in while you were scrolled
|
|
up, and a way back to the newest (app-thread-scroll.js). The wrapper takes
|
|
no room; the button floats up over the end of the replies. */
|
|
.thread-jump-wrap {
|
|
position: relative;
|
|
height: 0;
|
|
flex-shrink: 0;
|
|
}
|
|
.jump-to-bottom.thread-jump-latest {
|
|
bottom: 0.75rem;
|
|
right: 1rem;
|
|
z-index: 5;
|
|
}
|
|
.jump-to-bottom.thread-jump-latest.has-count {
|
|
width: auto;
|
|
height: 2rem;
|
|
padding: 0 0.75rem;
|
|
gap: 0.375rem;
|
|
border-radius: 999px;
|
|
background: var(--accent);
|
|
border-color: var(--accent);
|
|
color: var(--accent-text, #fff);
|
|
font-size: 0.75rem;
|
|
font-weight: 700;
|
|
right: 50%;
|
|
transform: translateX(50%);
|
|
}
|
|
.jump-to-bottom.thread-jump-latest.has-count:not(.visible) {
|
|
transform: translate(50%, 8px);
|
|
}
|
|
.thread-jump-latest:not(.has-count) .thread-jump-count {
|
|
display: none;
|
|
}
|