refactor(sns): open contact timeline from sidebar

This commit is contained in:
aits2026
2026-03-06 16:07:48 +08:00
parent 9575ba2a9f
commit f4caa51da5
3 changed files with 30 additions and 97 deletions

View File

@@ -1228,9 +1228,8 @@
border-radius: var(--sns-border-radius-md);
cursor: pointer;
transition: background 0.2s ease, transform 0.2s ease;
border: 2px solid transparent;
border: 1px solid transparent;
margin-bottom: 4px;
/* Separation for unselected items */
&:hover {
background: var(--hover-bg);
@@ -1238,41 +1237,6 @@
z-index: 10;
}
&.selected {
background: rgba(var(--primary-rgb), 0.1);
border-color: var(--primary);
box-shadow: none;
z-index: 5;
margin-bottom: 0;
/* Remove margin to merge */
.contact-meta {
.contact-name {
color: var(--primary);
font-weight: 600;
}
}
/* If the NEXT item is also selected */
&:has(+ .contact-row.selected) {
border-bottom: none;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
padding-bottom: 12px;
/* Compensate for missing border (+2px) */
}
}
/* If the PREVIOUS item is selected */
&.selected+.contact-row.selected {
border-top: none;
border-top-left-radius: 0;
border-top-right-radius: 0;
margin-top: 0;
padding-top: 12px;
/* Compensate for missing border */
}
.contact-meta {
flex: 1;
min-width: 0;
@@ -1315,13 +1279,6 @@
animation: spin 0.8s linear infinite;
}
}
&.selected {
.contact-post-count {
color: var(--primary);
font-weight: 600;
}
}
}
}