Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 55 additions & 5 deletions res/css/views/rooms/RoomListPanel/_RoomListItemView.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,33 @@

padding-left: var(--cpd-space-3x);
font: var(--cpd-font-body-md-regular);
transition: all 0.2s ease;

/* Hide the menu by default */
.mx_RoomListItemView_menu {
display: none;
}

&:hover,
&:focus-visible,
&:hover:not(.mx_RoomListItemView_selected),
&:focus-visible:not(.mx_RoomListItemView_selected),
/* When the context menu is opened */
&[data-state="open"],
&[data-state="open"]:not(.mx_RoomListItemView_selected),
/* When the options and notifications menu are opened */
&:has(.mx_RoomListItemMenuView > button[data-state="open"]) {
&:has(.mx_RoomListItemMenuView > button[data-state="open"]):not(.mx_RoomListItemView_selected) {
background-color: var(--cpd-color-bg-action-secondary-hovered);

.mx_RoomListItemView_menu {
display: flex;
}

/* Shift avatar and content to the left on hover */
> :first-child {
transform: translateX(-8px);
}

.mx_RoomListItemView_content {
transform: translateX(-8px);
}

&.mx_RoomListItemView_has_menu {
/**
Expand Down Expand Up @@ -71,6 +81,7 @@
box-sizing: border-box;
min-width: 0;
padding-right: var(--cpd-space-5x);
transition: transform 0.2s ease;

.mx_RoomListItemView_text {
min-width: 0;
Expand All @@ -93,7 +104,46 @@
}

.mx_RoomListItemView_selected {
background-color: var(--cpd-color-bg-action-secondary-pressed);
position: relative;
background-color: transparent;
border-left: none;
border-radius: 0 8px 8px 0;
margin-left: 8px;
margin-right: 8px;
width: calc(100% - 16px);
padding-left: var(--cpd-space-3x);

/* The curved left indicator - Uses Compound accent color (green) */
&::before {
content: "";
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 4px;
background-color: var(--cpd-color-text-action-accent);
border-radius: 0 8px 8px 0;
z-index: 0;
}

/* Background that starts after the gap - Uses Compound subtle secondary color */
&::after {
content: "";
position: absolute;
left: 8px;
top: 0;
right: 0;
bottom: 0;
background-color: var(--cpd-color-bg-subtle-secondary);
border-radius: 8px;
z-index: 0;
}

/* Ensure content appears above backgrounds */
> * {
position: relative;
z-index: 1;
}
}

.mx_RoomListItemView_bold .mx_RoomListItemView_roomName {
Expand Down
Loading