Files
Haven/public/css/style-thread-unread.css

124 lines
3.1 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-grid;
padding: 0;
border: 0;
background: none;
font: inherit;
cursor: pointer;
}
/* "N new" and "Mark read" sit in the same spot; pointing at it swaps them. */
.thread-list-new > span {
grid-area: 1 / 1;
justify-self: end;
align-self: center;
display: inline-flex;
}
.thread-list-new .thread-preview-new { margin-left: 0; }
.thread-list-new-mark { visibility: hidden; }
.thread-list-new:hover .thread-list-new-count,
.thread-list-new:focus-visible .thread-list-new-count { visibility: hidden; }
.thread-list-new:hover .thread-list-new-mark,
.thread-list-new:focus-visible .thread-list-new-mark { visibility: visible; }
.thread-list-new:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 999px; }
.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;
}