2024-07-15 15:50:56 +02:00

302 lines
6.0 KiB
SCSS

@use "../../../styles/mixins";
.SymbolMenu {
&.attachment-modal-symbol-menu {
position: absolute;
z-index: var(--z-symbol-menu-modal);
}
&.mobile-menu {
position: fixed;
left: 0;
right: 0;
bottom: 0;
background: var(--color-background);
z-index: var(--z-symbol-menu-mobile);
transition: transform var(--layer-transition);
padding-right: env(safe-area-inset-right);
padding-bottom: 0;
padding-left: env(safe-area-inset-left);
transform: translate3d(0, calc(var(--symbol-menu-height)), 0);
&.open:not(.in-attachment-modal) {
transform: translate3d(0, 0, 0);
body.is-media-viewer-open & {
transform: translate3d(0, calc(var(--symbol-menu-height)), 0);
}
}
&.open.in-attachment-modal {
z-index: calc(var(--z-modal) + 1);
transform: translate3d(0, calc(var(--symbol-menu-height)), 0);
}
body.no-page-transitions & {
transition: none;
}
&.left-column-open.in-middle-column {
transform: translate3d(100vw, 0, 0) !important;
}
}
&-main {
height: calc(var(--symbol-menu-height) - var(--symbol-menu-footer-height));
max-height: calc(100vh - var(--symbol-menu-footer-height));
@media (max-width: 600px) {
max-height: calc(100vh - var(--symbol-menu-footer-height) - env(safe-area-inset-bottom));
}
}
&-footer {
height: var(--symbol-menu-footer-height);
display: flex;
align-items: center;
justify-content: center;
/* stylelint-disable-next-line plugin/whole-pixel */
box-shadow: 0 -0.5px var(--color-borders-alternate);
position: relative;
.Button {
flex-shrink: 0;
width: 2.125rem !important;
height: 2.125rem;
margin: 0 0.25rem;
padding: 0;
&.activated {
pointer-events: none;
color: var(--color-text);
}
&.symbol-tab-button {
margin: 0 0.75rem;
}
&.symbol-search-button {
position: absolute;
left: 0.25rem;
}
&.symbol-delete-button {
position: absolute;
right: 0.25rem;
}
}
}
.Transition.slide {
height: 100%;
.Loading {
height: var(--symbol-menu-height);
}
}
.is-pointer-env & {
> .backdrop {
position: absolute;
top: -1rem;
left: 0;
right: auto;
width: 3.5rem;
height: 4.5rem;
}
&.attachment-modal-symbol-menu > .backdrop {
bottom: 0;
top: auto;
}
}
// TODO Remove this monster with context menu refactor
.Button.bot-menu:not(.open) ~ &,
.Button.bot-commands ~ &,
.Button.send-as-button ~ & {
.is-pointer-env & > .backdrop {
left: 3rem;
width: 3.25rem;
}
}
.Button.bot-menu.open ~ & {
.is-pointer-env & > .backdrop {
left: calc(var(--bot-menu-text-width, 0) + 3rem);
}
}
.bubble {
--offset-y: 4rem;
border-radius: 1.25rem;
width: calc(var(--symbol-menu-width) + var(--scrollbar-width));
padding: 0;
overflow: hidden;
body:not(.no-menu-blur) & {
background: var(--color-background-compact-menu);
backdrop-filter: blur(25px);
}
&:not(.open) {
transform: scale(0.85) !important;
}
transition-duration: 200ms !important;
}
.StickerButton.custom-emoji, .sticker-set-cover {
color: var(--color-text);
}
.picker-disabled {
height: var(--symbol-menu-height);
display: flex;
align-items: center;
justify-content: center;
color: var(--color-text-secondary);
}
.symbol-close-button {
display: none;
position: absolute;
right: max(0.25rem, env(safe-area-inset-right));
top: max(0.25rem, env(safe-area-inset-top));
}
@media (orientation: landscape) {
.symbol-close-button {
display: block;
}
}
}
.symbol-set {
margin-bottom: 0.75rem;
position: relative;
display: flex;
flex-direction: column;
&-header {
display: flex;
align-items: center;
justify-content: space-between;
color: rgba(var(--color-text-secondary-rgb), 0.75);
}
&-title {
display: flex;
gap: 0.5rem;
align-items: center;
font-size: 1rem;
line-height: 1.6875rem;
font-weight: 500;
margin: 0;
padding: 0 0.25rem 0.125rem;
overflow: hidden;
unicode-bidi: plaintext;
z-index: 1;
&-external {
color: var(--color-text);
text-align: start;
margin-right: 0.5rem;
}
}
&-name {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
text-align: center;
}
&-amount {
font-size: 0.875rem;
font-weight: normal;
text-align: left;
color: rgba(var(--color-text-secondary-rgb), 0.75);
unicode-bidi: plaintext;
white-space: nowrap;
}
&-chat {
background-color: var(--color-text-secondary);
color: var(--color-background);
border-radius: 1rem;
padding-inline: 0.25rem;
white-space: nowrap;
}
&-add-button {
margin-bottom: 0.25rem;
}
&-remove {
right: 0;
position: absolute;
font-size: 1rem;
cursor: var(--custom-cursor, pointer);
border-radius: 50%;
padding: 0.25rem;
transition: background-color 0.15s;
&:active,
&:focus {
background-color: var(--color-interactive-element-hover);
}
@media (hover: hover) {
&:hover {
background-color: var(--color-interactive-element-hover);
}
}
}
&-button {
flex-shrink: 0;
width: 2.125rem !important;
height: 2.125rem;
margin: 0 0.25rem;
padding: 0;
}
@include mixins.while-transition() {
overflow: hidden;
}
}
.effect-emojis.symbol-set-container {
--emoji-size: 2.25rem;
}
.symbol-set-container {
display: grid !important;
justify-content: space-between;
grid-template-columns: repeat(auto-fill, var(--emoji-size, 4.5rem));
row-gap: 0.25rem;
column-gap: var(--symbol-set-gap-size, 0.625rem);
text-align: initial;
@media (max-width: 600px) {
grid-gap: 0.5rem;
}
&:not(.shown) {
display: block;
}
&.closing {
transition: none;
}
> .EmojiButton,
> .StickerButton {
margin: 0;
}
}