2021-06-20 17:09:18 -04:00
|
|
|
.attachment {
|
2021-07-05 04:32:05 -04:00
|
|
|
display: grid;
|
|
|
|
grid-auto-columns: min(100%, 480px);
|
|
|
|
grid-auto-flow: row dense;
|
2021-06-20 17:09:18 -04:00
|
|
|
|
2021-07-05 04:32:05 -04:00
|
|
|
width: max-content;
|
2021-07-07 07:45:55 -04:00
|
|
|
|
2021-07-05 04:32:05 -04:00
|
|
|
border-radius: 6px;
|
|
|
|
margin: .125rem 0 .125rem;
|
2021-07-02 22:40:53 -04:00
|
|
|
|
2021-06-20 17:09:18 -04:00
|
|
|
&[data-spoiler="true"] {
|
|
|
|
filter: blur(30px);
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
&[data-has-content="true"] {
|
|
|
|
margin-top: 4px;
|
|
|
|
}
|
|
|
|
|
2021-07-08 10:22:42 -04:00
|
|
|
&.image, &.video > video {
|
|
|
|
cursor: pointer;
|
2021-07-05 04:32:05 -04:00
|
|
|
|
2021-07-08 10:22:42 -04:00
|
|
|
aspect-ratio: var(--width) / var(--height);
|
|
|
|
max-height: min(640px, var(--height-px));
|
|
|
|
max-width: min(480px, 100%, var(--width-px));
|
2021-07-05 04:32:05 -04:00
|
|
|
|
|
|
|
object-fit: contain;
|
2021-07-08 10:22:42 -04:00
|
|
|
}
|
2021-07-05 04:32:05 -04:00
|
|
|
|
2021-07-08 10:22:42 -04:00
|
|
|
&.image {
|
|
|
|
&.long {
|
|
|
|
width: min(100%, var(--width-px));
|
2021-07-05 04:32:05 -04:00
|
|
|
height: auto;
|
|
|
|
}
|
2021-07-08 10:22:42 -04:00
|
|
|
|
|
|
|
&.tall {
|
|
|
|
height: min(100%, var(--height-px));
|
|
|
|
width: auto;
|
|
|
|
}
|
2021-06-20 17:09:18 -04:00
|
|
|
}
|
|
|
|
|
2021-07-07 07:45:55 -04:00
|
|
|
&.video {
|
2021-06-20 17:09:18 -04:00
|
|
|
.actions {
|
|
|
|
padding: 10px 12px;
|
|
|
|
border-radius: 6px 6px 0 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
video {
|
|
|
|
border-radius: 0 0 6px 6px;
|
2021-07-05 04:32:05 -04:00
|
|
|
|
2021-07-08 10:22:42 -04:00
|
|
|
&.long {
|
|
|
|
height: auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.tall {
|
|
|
|
width: auto;
|
|
|
|
}
|
2021-06-20 17:09:18 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.audio {
|
|
|
|
gap: 4px;
|
|
|
|
padding: 6px;
|
|
|
|
display: flex;
|
|
|
|
border-radius: 6px;
|
|
|
|
flex-direction: column;
|
|
|
|
background: var(--secondary-background);
|
|
|
|
max-width: 400px;
|
|
|
|
|
|
|
|
> audio {
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.file {
|
|
|
|
> div {
|
|
|
|
width: 400px;
|
|
|
|
padding: 12px;
|
|
|
|
user-select: none;
|
|
|
|
width: fit-content;
|
|
|
|
border-radius: 6px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.text {
|
2021-07-05 04:32:05 -04:00
|
|
|
width: 100%;
|
2021-06-20 17:09:18 -04:00
|
|
|
max-width: 800px;
|
2021-07-05 04:32:05 -04:00
|
|
|
overflow: hidden;
|
|
|
|
grid-auto-columns: unset;
|
|
|
|
|
2021-06-20 17:09:18 -04:00
|
|
|
border-radius: 6px;
|
|
|
|
|
|
|
|
.textContent {
|
|
|
|
height: 140px;
|
|
|
|
padding: 12px;
|
|
|
|
overflow-x: auto;
|
|
|
|
overflow-y: auto;
|
|
|
|
border-radius: 0 !important;
|
|
|
|
background: var(--secondary-header);
|
|
|
|
|
|
|
|
pre {
|
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
pre code {
|
2021-07-04 12:56:18 -04:00
|
|
|
font-family: var(--monoscape-font), sans-serif;
|
2021-06-20 17:09:18 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
&[data-loading="true"] {
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
> * {
|
|
|
|
flex-grow: 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-05 04:32:05 -04:00
|
|
|
.actions.imageAction {
|
|
|
|
grid-template:
|
2021-07-06 09:58:54 -04:00
|
|
|
"name icon external download" auto
|
|
|
|
"size icon external download" auto
|
2021-07-05 04:32:05 -04:00
|
|
|
/ minmax(20px, 1fr) min-content min-content;
|
|
|
|
}
|
|
|
|
|
2021-06-20 17:09:18 -04:00
|
|
|
.actions {
|
2021-07-05 04:32:05 -04:00
|
|
|
display: grid;
|
|
|
|
grid-template:
|
2021-07-06 09:58:54 -04:00
|
|
|
"icon name external download" auto
|
|
|
|
"icon size external download" auto
|
2021-07-05 04:32:05 -04:00
|
|
|
/ min-content minmax(20px, 1fr) min-content;
|
|
|
|
|
|
|
|
align-items: center;
|
2021-07-06 09:33:26 -04:00
|
|
|
column-gap: 12px;
|
2021-07-05 04:32:05 -04:00
|
|
|
|
|
|
|
width: 100%;
|
2021-06-20 17:09:18 -04:00
|
|
|
padding: 8px;
|
|
|
|
overflow: none;
|
2021-07-05 04:32:05 -04:00
|
|
|
|
2021-06-20 17:09:18 -04:00
|
|
|
color: var(--foreground);
|
|
|
|
background: var(--secondary-background);
|
|
|
|
|
2021-07-05 04:32:05 -04:00
|
|
|
span {
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
white-space: nowrap;
|
|
|
|
overflow: hidden;
|
2021-06-20 17:09:18 -04:00
|
|
|
}
|
|
|
|
|
2021-07-05 04:32:05 -04:00
|
|
|
.filesize {
|
|
|
|
grid-area: size;
|
2021-06-20 17:09:18 -04:00
|
|
|
|
2021-07-05 04:32:05 -04:00
|
|
|
font-size: 10px;
|
|
|
|
color: var(--secondary-foreground);
|
|
|
|
}
|
2021-06-20 17:09:18 -04:00
|
|
|
|
2021-07-05 04:32:05 -04:00
|
|
|
.downloadIcon {
|
|
|
|
grid-area: download;
|
|
|
|
}
|
|
|
|
|
2021-07-06 09:58:54 -04:00
|
|
|
.externalType {
|
|
|
|
grid-area: external;
|
|
|
|
}
|
|
|
|
|
2021-07-05 04:32:05 -04:00
|
|
|
.iconType {
|
|
|
|
grid-area: icon;
|
2021-06-20 17:09:18 -04:00
|
|
|
}
|
|
|
|
}
|