discourse/plugins/chat/assets/stylesheets/mobile/chat-channel-row.scss
chapoi d7cd09d4ab
UX: Chat Sizing on Mobile (#25543)
* UX: increase font-size of last message + decrease emoji size

* UX: decrease size of username emoji

* UX: Mobile chat index cleanup

* UX: decrease size of chat-channel-title in thead list
2024-02-02 14:29:07 +01:00

132 lines
2.5 KiB
SCSS

:root {
--channel-list-avatar-size: 43px;
}
.chat-channel-row {
margin: 0;
border-radius: 0;
border-bottom: 1px solid var(--primary-low);
transition: height 0.25s ease-in-out, opacity 0.25s ease-out;
transform-origin: top center;
will-change: height, opacity, left;
position: relative;
height: 4em;
&.-fade-out {
.chat-channel-row__content {
background-color: var(--danger-low);
}
height: 0 !important;
overflow: hidden;
opacity: 0.5 !important;
}
&__content {
padding-inline: 1.5rem;
padding-block: 0.5rem;
z-index: 2;
box-sizing: border-box;
transition: border-radius 0.25s ease-in-out;
//for sliding delete animation
background: var(--primary-very-low);
height: 100%;
&.-animate-reset {
transition: margin-right 0.15s ease-out;
margin-right: 0px !important;
}
&:not(.-animate-reset) {
border-top-right-radius: 0.25rem;
border-bottom-right-radius: 0.25rem;
}
}
&__info {
.is-category & {
display: flex;
justify-content: space-between;
align-items: center;
flex-grow: 1;
}
.is-dm & {
display: grid;
grid-template-areas:
"name metadata"
"msg msg";
width: 100%;
align-items: center;
&:has(.chat-channel-unread-indicator) {
grid-template-areas:
"name metadata"
"msg metadata";
}
}
}
&__action-btn {
z-index: 1;
display: flex;
justify-content: flex-end;
align-items: center;
position: absolute;
top: 0px;
bottom: 0px;
right: 0px;
left: 0px;
background: var(--danger);
color: var(--primary-very-low);
.d-icon {
transform-origin: 50% 50%;
transform-box: fill-box;
transition: scale 0.2s ease-out;
margin-inline: 0 1.5rem;
}
&.-not-at-threshold {
.d-icon {
scale: 0.7;
}
}
&.-at-threshold {
.d-icon {
scale: 1.5;
}
}
}
.chat-channel {
&__user-info,
&__channel-info {
grid-area: name;
}
&__metadata {
grid-area: metadata;
.chat-channel-unread-indicator {
font-size: var(--font-down-2);
margin-top: 0.25rem;
}
}
&__metadata-date {
font-size: var(--font-down-2);
}
&__last-message {
@include ellipsis;
grid-area: msg;
color: var(--primary-high);
.emoji {
width: 1em;
height: 1em;
}
}
}
.chat-channel-icon {
&.--users-count {
font-size: var(--font-up-2);
}
}
}