Files
fluxer/fluxer_app/src/features/channel/components/ChannelAttachmentArea.module.css
T

344 lines
6.3 KiB
CSS

/* SPDX-License-Identifier: AGPL-3.0-or-later */
.scroller {
margin: 0 0 0.125rem 0.375rem;
}
.channelAttachmentArea {
display: flex;
gap: 1.5rem;
padding: 1.25rem 0.625rem 0.625rem;
position: relative;
z-index: 1;
}
.upload {
display: inline-flex;
flex-direction: column;
background: var(--background-primary);
border-radius: 0.25rem;
margin: 0;
padding: 0.5rem;
position: relative;
min-width: 12.5rem;
max-width: 12.5rem;
min-height: 12.5rem;
max-height: 12.5rem;
}
.uploadContainer {
display: flex;
position: relative;
flex-direction: column;
height: 100%;
justify-content: space-between;
}
.mediaContainer {
position: relative;
flex: 1;
min-height: 0;
background-color: var(--background-tertiary);
border-radius: 0.25rem;
}
.clickableMedia {
cursor: pointer;
width: 100%;
height: 100%;
display: block;
border: none;
background: none;
padding: 0;
margin: 0;
}
.mediaContainer > div:not([aria-expanded='false']),
.mediaContainer > div:not([aria-expanded='false']) > div {
height: 100%;
}
.spoilerContainer {
height: 100%;
position: relative;
filter: blur(0);
border-radius: 0.25rem;
background-color: hsla(0, 0%, 100%, 0.1);
}
.spoilerContainer.hidden {
overflow: hidden;
}
.spoilerContainer.hiddenSpoiler {
cursor: pointer;
}
.spoilerWarning {
text-transform: uppercase;
font-size: 0.9375rem;
background-color: hsla(0, 0%, 0%, 0.6);
cursor: pointer;
font-weight: 600;
border-radius: 1.25rem;
transition: background-color 0.2s;
}
.spoilerWarning:hover {
background-color: hsla(0, 0%, 0%, 0.8);
}
.obscureWarning {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
display: flex;
flex-direction: column;
align-items: center;
z-index: 1;
padding: 0.5rem 0.75rem;
user-select: none;
-webkit-user-select: none;
color: hsl(216, 10%, 90%);
}
.spoilerInnerContainer {
width: 100%;
height: 100%;
}
.spoilerWrapper {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
width: 100%;
position: relative;
}
.spoiler {
filter: blur(2.75rem);
pointer-events: none;
}
.media {
border-radius: 0.25rem;
width: 100%;
height: 100%;
object-fit: cover;
object-position: center;
color: transparent;
font-size: 0;
}
.tags {
position: absolute;
left: 0.1875rem;
bottom: 0.375rem;
}
.filenameContainer {
display: flex;
flex-direction: column;
gap: 0.125rem;
margin-top: 0.5rem;
padding: 0 0.25rem;
min-height: 2.5rem;
flex-shrink: 0;
z-index: 1;
}
.filename {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 0.8125rem;
font-weight: 500;
line-height: 1.2;
color: var(--text-primary);
}
.fileDetails {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 0.6875rem;
color: var(--text-tertiary);
font-weight: 400;
}
.fileSize {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.fileExtension {
text-transform: uppercase;
font-weight: 600;
color: var(--brand-primary-light);
flex-shrink: 0;
margin-left: 0.25rem;
}
.actionBarContainer {
position: absolute;
top: 0;
right: 0;
}
.actionBar {
composes: toolbar from '@app/features/ui/action_toolbar/ActionToolbar.module.css';
--attachment-action-bar-surface: var(--form-surface-background);
--attachment-action-bar-border: var(--background-modifier-accent);
--attachment-action-bar-hover-background: var(--surface-interactive-hover-bg);
--attachment-action-bar-danger-text: color-mix(in srgb, var(--status-danger) 78%, var(--text-primary) 22%);
--attachment-action-bar-danger-background: color-mix(
in srgb,
var(--status-danger) 6%,
var(--surface-interactive-hover-bg)
);
--action-toolbar-surface: var(--attachment-action-bar-surface);
--action-toolbar-border: var(--attachment-action-bar-border);
position: relative;
z-index: 1;
transform: translate(25%, -25%);
}
.button {
composes: item from '@app/features/ui/action_toolbar/ActionToolbar.module.css';
}
:global(:where(html.window-focused, html.unfocused-fully-interactive):not(.window-focus-activation-guard))
.button:not(.danger):hover {
color: var(--text-primary);
background: var(--attachment-action-bar-hover-background);
}
.button.danger {
color: var(--attachment-action-bar-danger-text);
}
:global(:where(html.window-focused, html.unfocused-fully-interactive):not(.window-focus-activation-guard))
.button.danger:hover {
background: var(--attachment-action-bar-danger-background);
}
.actionBarIcon {
width: 1.125rem;
height: 1.125rem;
display: block;
flex: 0 0 auto;
object-fit: contain;
}
.altTag {
color: black;
mix-blend-mode: screen;
background: var(--text-primary);
margin-right: 0.25rem;
text-transform: uppercase;
font-size: 0.625rem;
font-weight: 600;
padding: 0.25rem;
border-radius: 0.25rem;
}
.icon {
display: flex;
align-items: center;
justify-content: center;
flex: 1;
min-height: 0;
background-color: var(--background-tertiary);
border-radius: 0.25rem;
}
.iconImage {
width: 6.25rem;
height: 6.25rem;
color: var(--brand-primary-light);
}
.loadingOverlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: hsla(0, 0%, 0%, 0.5);
display: flex;
align-items: center;
justify-content: center;
border-radius: 0.25rem;
}
.spinner {
width: 2.5rem;
height: 2.5rem;
border: 0.25rem solid hsla(0, 0%, 100%, 0.3);
border-radius: 50%;
border-top-color: hsl(0, 0%, 100%);
animation: spin 1s ease infinite;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.videoModal {
display: flex;
align-items: center;
justify-content: center;
border: none;
border-radius: 0;
background-color: transparent;
box-shadow: none;
}
.videoContainer {
position: relative;
}
.divider {
height: 0.0625rem;
background-color: var(--user-area-divider-color);
margin-left: -1rem;
margin-right: -1rem;
}
.dropIndicatorLeft::before {
content: '';
position: absolute;
top: 0.5rem;
bottom: 0.5rem;
left: 0;
width: 0.125rem;
background: var(--brand-primary-light);
border-radius: 0.0625rem;
z-index: 1;
}
.dropIndicatorRight::after {
content: '';
position: absolute;
top: 0.5rem;
bottom: 0.5rem;
right: 0;
width: 0.125rem;
background: var(--brand-primary-light);
border-radius: 0.0625rem;
z-index: 1;
}
:global(.theme-light) .dropIndicatorLeft::before,
:global(.theme-light) .dropIndicatorRight::after {
background: var(--brand-primary);
}