TelegramPWA/src/components/common/StickerButton.scss

171 lines
2.8 KiB
SCSS

.StickerButton {
--custom-emoji-size: 2.25rem;
--premium-gradient: linear-gradient(88.39deg, #6C93FF -2.56%, #976FFF 51.27%, #DF69D1 107.39%);
position: relative;
display: inline-block;
flex-shrink: 0;
width: 4.5rem;
height: 4.5rem;
border-radius: var(--border-radius-messages-small);
background: transparent no-repeat center;
background-size: contain;
transition: background-color 0.15s ease, opacity 0.3s ease !important;
&.custom-emoji {
width: var(--custom-emoji-size);
height: var(--custom-emoji-size);
margin: 0.3125rem;
color: var(--color-primary);
&.status-default {
padding: 0.125rem;
font-size: 2rem;
color: var(--color-text);
}
}
&.effect-emoji .sticker-locked {
width: 0.875rem;
height: 0.875rem;
font-size: 0.75rem;
}
&.set-expand {
align-self: center;
justify-self: center;
padding: 0;
font-weight: var(--font-weight-medium);
vertical-align: bottom;
}
.sticker-locked {
position: absolute;
z-index: 2;
right: 0;
bottom: 0;
display: flex;
align-items: center;
justify-content: center;
width: 1.25rem;
height: 1.25rem;
border-radius: 50%;
color: white;
opacity: 0.75;
background: var(--premium-gradient);
}
.sticker-premium {
position: absolute;
z-index: 1;
right: 0;
bottom: 0;
display: flex;
align-items: center;
justify-content: center;
width: 1.25rem;
height: 1.25rem;
border-radius: 50%;
color: white;
background: var(--premium-gradient);
}
&.selected {
background-color: var(--color-interactive-element-hover);
}
&.interactive {
cursor: var(--custom-cursor, pointer);
&:hover {
background-color: var(--color-interactive-element-hover);
.sticker-remove-button {
opacity: 1;
}
}
}
&.set-button {
width: 2.75rem !important;
height: 2.75rem;
margin: 0 0.5rem;
}
&.large {
width: 10rem;
height: 10rem;
margin: 0;
}
.AnimatedSticker,
.sticker-media {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.sticker-media {
user-select: none;
object-fit: contain;
-webkit-touch-callout: none;
}
.sticker-remove-button {
position: absolute;
z-index: 2;
top: -0.125rem;
right: -0.125rem;
width: 1.25rem;
height: 1.25rem;
padding: 0.125rem;
opacity: 0;
transition: opacity 0.15s ease;
.icon {
font-size: 1rem;
}
}
@media (max-width: 600px) {
&, &.custom-emoji {
margin: 0.25rem;
}
}
}
.sticker-context-menu {
cursor: var(--custom-cursor, default);
position: absolute;
z-index: var(--z-header-menu);
.bubble {
width: auto !important;
}
.SymbolMenu & .bubble {
--offset-y: 0;
}
}