TelegramPWA/src/components/middle/MiddleColumn.module.scss
2025-09-19 14:25:30 +02:00

100 lines
2.2 KiB
SCSS

.background {
position: absolute;
z-index: -1;
top: 0;
right: 0;
bottom: 0;
left: 0;
overflow: hidden;
background-color: var(--theme-background-color);
&::before {
content: "";
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-repeat: no-repeat;
background-position: center;
background-size: cover;
}
:global(html.theme-light) &:not(.customBgImage)::before {
background-image: url('../../assets/chat-bg-br.png');
}
&:not(.customBgImage).customBgColor::before {
display: none;
}
&.customBgImage::before {
transform: scale(1.1);
background-image: var(--custom-background) !important;
}
:global(body:not(.no-page-transitions)) &.withTransition {
transition: background-color 0.2s;
&.customBgImage::before {
transition: background-image var(--layer-transition);
}
}
&.customBgImage.blurred::before {
filter: blur(12px);
}
:global(html.theme-light body:not(.no-page-transitions)) &:not(.customBgImage).withRightColumn::before {
@media screen and (min-width: 1276px) {
transform: scaleX(0.73) !important;
}
@media screen and (min-width: 1921px) {
transform: scaleX(0.8) !important;
}
@media screen and (min-width: 2600px) {
transform: scaleX(0.95) !important;
}
}
/* stylelint-disable-next-line @stylistic/max-line-length */
:global(html.theme-light body:not(.no-page-transitions)) &:not(.customBgImage).withRightColumn.withTransition::before {
transition: transform var(--layer-transition);
}
&:not(.customBgImage):not(.customBgColor)::after {
content: "";
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-image: url('../../assets/chat-bg-pattern-light.png');
background-repeat: repeat;
background-position: top right;
background-size: 510px auto;
mix-blend-mode: overlay;
:global(html.theme-dark) & {
background-image: url('../../assets/chat-bg-pattern-dark.png');
mix-blend-mode: unset;
}
}
@media screen and (min-width: 1276px) {
:global(body:not(.no-page-transitions)) &:not(.customBgImage)::before {
transform-origin: left center;
transform: scale(1);
overflow: hidden;
}
}
}