2026-02-05 21:05:14 +00:00
|
|
|
/*
|
|
|
|
|
* Copyright 2025 Element Creations Ltd.
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
|
|
|
|
* Please see LICENSE files in the repository root for full details.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
.roomListItem {
|
|
|
|
|
/* Remove button default style */
|
|
|
|
|
background: unset;
|
|
|
|
|
border: none;
|
|
|
|
|
padding: 0;
|
|
|
|
|
text-align: unset;
|
|
|
|
|
|
2026-02-17 10:58:16 +01:00
|
|
|
/* Needed to position the selected marker */
|
|
|
|
|
position: relative;
|
2026-02-05 21:05:14 +00:00
|
|
|
cursor: pointer;
|
2026-02-17 10:58:16 +01:00
|
|
|
height: 44px;
|
2026-02-05 21:05:14 +00:00
|
|
|
width: 100%;
|
2026-02-17 10:58:16 +01:00
|
|
|
/* Gap between items, accounted for in ROOM_LIST_ITEM_HEIGHT */
|
|
|
|
|
margin-bottom: var(--cpd-space-2x);
|
2026-02-05 21:05:14 +00:00
|
|
|
|
|
|
|
|
font: var(--cpd-font-body-md-regular);
|
2026-02-17 10:58:16 +01:00
|
|
|
letter-spacing: var(--cpd-font-letter-spacing-body-md);
|
|
|
|
|
color: var(--cpd-color-text-secondary);
|
2026-02-05 21:05:14 +00:00
|
|
|
|
|
|
|
|
/* Hide the menu by default */
|
|
|
|
|
.hoverMenu {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Show hover menu and background on hover/focus/menu-open states */
|
|
|
|
|
.roomListItem:hover,
|
|
|
|
|
.roomListItem:focus-visible,
|
|
|
|
|
/* When the context menu is opened */
|
|
|
|
|
.roomListItem[data-state="open"],
|
|
|
|
|
/* When the options and notifications menu are opened */
|
|
|
|
|
.roomListItem:has(.hoverMenu > button[data-state="open"]) {
|
2026-02-17 10:58:16 +01:00
|
|
|
color: var(--cpd-color-text-primary);
|
|
|
|
|
|
|
|
|
|
.container {
|
|
|
|
|
background-color: var(--cpd-color-bg-action-tertiary-hovered);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Preserve selected background on hover/focus/menu-open states */
|
|
|
|
|
&.selected .container {
|
|
|
|
|
background-color: var(--cpd-color-bg-action-tertiary-selected);
|
|
|
|
|
}
|
2026-02-05 21:05:14 +00:00
|
|
|
|
|
|
|
|
.hoverMenu {
|
|
|
|
|
display: flex;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* When the menu is visible, hide the notification decoration to avoid clutter */
|
|
|
|
|
.notificationDecoration {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
2026-02-17 10:58:16 +01:00
|
|
|
}
|
2026-02-05 21:05:14 +00:00
|
|
|
|
2026-02-17 10:58:16 +01:00
|
|
|
.container {
|
|
|
|
|
flex: 1;
|
|
|
|
|
height: 100%;
|
|
|
|
|
margin: 0 var(--cpd-space-3x);
|
|
|
|
|
padding: 0 var(--cpd-space-2x);
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
min-width: 0;
|
2026-02-05 21:05:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.content {
|
|
|
|
|
flex: 1;
|
|
|
|
|
min-width: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.text {
|
|
|
|
|
min-width: 0;
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-17 10:58:16 +01:00
|
|
|
.ellipsis,
|
2026-02-05 21:05:14 +00:00
|
|
|
.roomName {
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.selected {
|
2026-02-17 10:58:16 +01:00
|
|
|
.container {
|
|
|
|
|
background-color: var(--cpd-color-bg-action-tertiary-selected);
|
|
|
|
|
font: var(--cpd-font-body-md-semibold);
|
|
|
|
|
color: var(--cpd-color-text-primary);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Visual marker at the left on the container when the room is selected */
|
|
|
|
|
.container::before {
|
|
|
|
|
content: "";
|
|
|
|
|
position: absolute;
|
|
|
|
|
/* Marker height is 34px, room list item height is 44px. So position is at 5px and top and bottom */
|
|
|
|
|
top: 5px;
|
|
|
|
|
bottom: 5px;
|
|
|
|
|
left: 0;
|
|
|
|
|
width: 4px;
|
|
|
|
|
background-color: var(--cpd-color-bg-accent-rest);
|
|
|
|
|
border-radius: 0 8px 8px 0;
|
|
|
|
|
}
|
2026-02-05 21:05:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.bold .roomName {
|
|
|
|
|
font: var(--cpd-font-body-md-semibold);
|
2026-02-17 10:58:16 +01:00
|
|
|
color: var(--cpd-color-text-primary);
|
2026-02-05 21:05:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Set icon color for hover menu buttons */
|
|
|
|
|
.hoverMenu svg {
|
|
|
|
|
fill: var(--cpd-color-icon-primary);
|
|
|
|
|
}
|