TelegramPWA/src/components/middle/composer/AttachmentModal.module.scss
2023-01-24 00:17:55 +01:00

163 lines
2.6 KiB
SCSS

.root {
--border-radius-default: 0.625rem;
:global {
.modal-dialog {
max-width: 26.25rem;
@media (max-width: 600px) {
max-height: 100%;
}
}
.modal-header-condensed {
padding: 0.3125rem 0.5rem !important;
border-bottom: 1px solid transparent;
transition: border-color 250ms ease-in-out;
}
.modal-content {
display: flex;
flex-direction: column;
padding: 0;
// Full height - header - margins
max-height: calc(100vh - 3.25rem - 5rem);
overflow-x: auto;
}
}
&.header-border :global(.modal-header-condensed) {
border-bottom-color: var(--color-borders);
}
}
.attachments {
max-height: 26rem;
min-height: 5rem;
overflow: auto;
flex-shrink: 1;
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
margin: 0 0.25rem;
padding: 0.5rem 0.25rem 0;
@media (max-width: 600px) {
max-height: 80vh;
}
}
.attachments-bottom-padding {
padding-bottom: 0.5rem;
}
.caption-wrapper {
position: relative;
padding: 0 0.5rem;
border-top: 1px solid transparent;
transition: border-color 250ms ease-in-out;
:global {
.form-control {
background: var(--color-background);
}
.MentionTooltip {
right: 0 !important;
z-index: 0;
}
}
}
.caption-top-border {
border-top-color: var(--color-borders);
}
.caption {
display: flex;
align-items: center;
gap: 0.5rem;
}
.drop-target {
display: flex;
flex-direction: column;
position: relative;
overflow: hidden;
&::before,
&::after {
content: "";
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
border-radius: var(--border-radius-default);
pointer-events: none;
opacity: 0;
transition: 250ms opacity;
z-index: 1;
}
&::before {
background-image: var(--drag-target-border-hovered);
background-color: var(--color-background);
}
&::after {
content: attr(data-attach-description);
display: flex;
justify-content: center;
align-items: center;
color: var(--color-primary);
}
}
.hovered {
.drop-target::before {
opacity: 0.95;
}
.drop-target::after {
opacity: 1;
}
.caption-wrapper,
.attachments,
:global(.input-scroller) {
pointer-events: none;
}
}
.send-wrapper {
align-self: flex-end;
position: relative;
padding-bottom: 0.5rem;
margin-right: 0.375rem;
}
.send {
height: 2.5rem;
padding: 0 1rem;
}
:global {
.CustomSendMenu {
bottom: 2.25rem;
.is-pointer-env & > .backdrop {
width: 100%;
top: -2rem;
bottom: auto;
height: 3.5rem;
}
}
}