Files
fluxer/fluxer_app/src/components/channel/Messages.module.css

179 lines
3.3 KiB
CSS

/*
* Copyright (C) 2026 Fluxer Contributors
*
* This file is part of Fluxer.
*
* Fluxer is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Fluxer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Fluxer. If not, see <https://www.gnu.org/licenses/>.
*/
.messagesWrapper {
position: relative;
display: flex;
flex-direction: column;
flex: 1 1 0%;
min-height: 0;
min-width: 0;
height: 100%;
font-size: var(--font-size, 16px);
--scrollbar-track-bg: var(--background-secondary-lighter);
--message-group-spacing: 16px;
}
.nativeAnchor {
overflow-anchor: auto !important;
}
.scrollerContainer {
position: absolute;
inset: 0;
display: flex;
flex-direction: column;
min-height: 0;
min-width: 0;
height: 100%;
width: 100%;
}
.scrollerContent {
display: flex;
flex-direction: column;
flex: 1 0 auto;
min-height: 100%;
overflow-anchor: none;
}
.scrollerSpacer {
display: block;
height: var(--scroller-spacer-height);
pointer-events: none;
width: 100%;
flex-shrink: 0;
}
.placeholderSpacer {
flex: 0 0 auto;
height: 16px;
}
.groupSpacer,
.groupSpacerHalf {
flex: 0 0 auto;
}
.groupSpacer {
height: var(--message-group-spacing);
}
.groupSpacerHalf {
height: calc(var(--message-group-spacing) / 2);
}
.scrollerInner {
display: flex;
flex-direction: column;
justify-content: flex-end;
min-height: 100%;
padding-left: 0.75rem;
padding-right: 0.75rem;
position: relative;
}
@media (min-width: 768px) {
.scrollerInner {
padding-left: var(--chat-horizontal-padding);
padding-right: var(--chat-horizontal-padding);
}
}
.newMessagesBar {
position: absolute;
left: 0.5rem;
right: 0.5rem;
top: -8px;
z-index: var(--z-index-elevated-3);
display: flex;
align-items: center;
justify-content: space-between;
height: 40px;
padding-top: 6px;
border-radius: 0 0 0.5rem 0.5rem;
background: var(--brand-primary);
border: none;
padding-left: 0.75rem;
padding-right: 0.75rem;
cursor: pointer;
transition:
transform 0.1s ease-out,
box-shadow 0.1s ease-out;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}
.newMessagesBar:active {
transform: translateY(2px);
box-shadow: 0 0 0 rgba(0, 0, 0, 0.15);
}
.newMessagesBarText {
color: white;
font-size: 0.875rem;
font-weight: 500;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.newMessagesBarAction {
display: flex;
align-items: center;
gap: 0.375rem;
color: white;
font-size: 0.875rem;
font-weight: 600;
flex-shrink: 0;
}
.loadMoreContainer {
display: flex;
justify-content: center;
align-items: center;
padding: 0.75rem 0;
}
.loadMoreTopPadding {
padding-top: 1.25rem;
}
.loadMoreBottomPadding {
padding-bottom: 1.25rem;
}
.unreadOverlay {
position: absolute;
left: 0;
right: 0;
z-index: 1;
pointer-events: none;
}
.unreadSlot {
display: none;
pointer-events: none;
}
.unreadSlot[data-visible='1'] {
display: block;
padding-top: 0.25rem;
padding-bottom: 0.25rem;
}