TelegramPWA/src/components/middle/message/SimilarChannels.module.scss

248 lines
4.4 KiB
SCSS

.root {
max-width: 45rem;
margin-top: 0.625rem;
position: relative;
--more-channel-background: #d8d8d8;
--more-channel-background-dark: #8f8f8f;
--more-channel-badge: #8f8f8f;
--more-channel-badge-overlay: #00000033;
}
.notch {
display: flex;
justify-content: center;
margin-top: 0.1875rem;
}
.notch-path {
fill: var(--color-background);
}
.join-text {
cursor: pointer;
}
.header {
padding: 0.375rem 0.375rem 0 0.75rem;
display: flex;
justify-content: space-between;
align-items: center;
position: sticky;
top: 0;
left: 0;
}
.title {
font-size: 0.875rem;
font-weight: 500;
line-height: 1.5rem;
}
.close {
width: auto;
height: auto;
font-size: 1.25rem;
padding: 0.125rem;
border-radius: 50%;
> .icon {
margin-left: 0.0625rem;
}
}
.skeleton {
height: 8.5rem;
border-radius: 0.9375rem;
margin-top: 0.625rem;
}
.inner {
background: var(--color-background);
border-radius: 0.9375rem;
}
.is-appearing {
animation: 0.15s ease-out channels-appear forwards;
}
.is-hiding {
animation: 0.15s ease-out channels-disappear forwards;
}
@keyframes channels-appear {
from {
transform: scale(0) translateY(-50%);
opacity: 0;
/* stylelint-disable-next-line plugin/no-low-performance-animation-properties */
height: 0;
}
to {
transform: none;
opacity: 1;
/* stylelint-disable-next-line plugin/no-low-performance-animation-properties */
height: 8.9375rem;
}
}
@keyframes channels-disappear {
from {
transform: none;
opacity: 1;
/* stylelint-disable-next-line plugin/no-low-performance-animation-properties */
height: 8.9375rem;
}
to {
transform: scale(0) translateY(-50%);
opacity: 0;
/* stylelint-disable-next-line plugin/no-low-performance-animation-properties */
height: 0;
}
}
.channel-list {
padding-bottom: 0.25rem;
padding-left: 0.25rem;
display: flex;
overflow-x: auto;
overflow-y: hidden;
white-space: nowrap;
border-bottom-left-radius: 0.9375rem;
border-bottom-right-radius: 0.9375rem;
}
.item {
height: 6.375rem;
position: relative;
display: flex;
flex-direction: column;
align-items: center;
margin-right: 0.5rem;
padding: 0.5rem 0.5rem 0.25rem 0.5rem;
&:not(:last-child) {
&:hover {
background: var(--color-chat-hover);
border-radius: 0.625rem;
cursor: pointer;
}
}
}
.last-item {
margin: 0;
padding: 0.5rem 0 0.25rem 0;
cursor: pointer;
min-width: 5rem;
margin-right: 0.75rem;
align-items: flex-start;
}
.avatar {
width: 3.75rem;
height: 3.75rem;
}
.last-item .avatar {
z-index: 3;
outline: 0.125rem solid var(--color-background);
}
.last-item .badge {
z-index: 4;
align-self: center;
background: var(--more-channel-background);
:global(.theme-dark) & {
background: var(--more-channel-background-dark);
&::before {
background-color: unset;
}
}
}
.badge {
max-width: 3.75rem;
height: 0.9375rem;
margin-top: -0.8125rem;
outline: 0.0625rem solid var(--color-background);
padding: 0.125rem 0.1875rem 0.125rem 0.25rem;
border-radius: 0.625rem;
z-index: 1;
display: flex;
justify-content: center;
align-items: center;
color: var(--color-white);
position: relative;
&::before {
content: "";
background-color: var(--more-channel-badge-overlay);
position: absolute;
max-width: 3.75rem;
width: 100%;
height: 0.9375rem;
border-radius: 0.625rem;
z-index: -1;
}
}
.icon {
font-size: 0.4375rem;
margin-right: 0.0625rem;
}
.members-count {
font-size: 0.5625rem;
font-weight: 700;
line-height: 0.6875rem;
}
.channel-title {
text-align: center;
height: 1.625rem;
font-size: 0.6875rem;
font-weight: 400;
line-height: 0.8125rem;
max-width: 3.4375rem;
margin-top: 0.125rem;
white-space: normal;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
unicode-bidi: plaintext;
}
.last-item .channel-title {
color: var(--color-text-secondary);
align-self: center;
}
.fake-avatar {
border-radius: 50%;
width: 3.75rem;
height: 3.75rem;
position: absolute;
left: 0.625rem;
background: var(--more-channel-background);
outline: 0.125rem solid var(--color-background);
z-index: 2;
:global(.theme-dark) & {
background: var(--more-channel-background-dark);
}
}
.fake-avatar-inner {
width: 100%;
height: 100%;
}
.last-fake-avatar {
left: 1.25rem;
z-index: 1;
}