refactor styles

This commit is contained in:
2025-11-10 11:30:16 +01:00
parent b4a1821a55
commit 585caaee58
31 changed files with 4873 additions and 4867 deletions
+584
View File
@@ -0,0 +1,584 @@
.folder-tree {
list-style: none;
margin: 0;
padding: 0;
}
.folder-node {
margin: 0;
}
.folder-row {
display: flex;
align-items: center;
gap: 0.22rem;
padding: 0.32rem 0.48rem;
border-radius: 8px;
cursor: pointer;
color: inherit;
transition: background 0.12s ease, color 0.12s ease;
position: relative;
overflow: hidden;
user-select: none;
-webkit-user-select: none;
}
.folder-row .name-wrap {
display: inline-flex;
align-items: center;
gap: 0.25rem;
flex: 1;
min-width: 0;
}
.folder-row .name-wrap .name__label {
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.folder-row .folder-icon-image {
flex-shrink: 0;
}
.folder-row:hover {
background: var(--sidebar-hover-bg);
color: var(--fg);
}
.folder-row.active {
background: var(--sidebar-active-bg);
color: var(--fg);
}
.folder-row .toggle {
width: 1.05rem;
display: inline-flex;
align-items: center;
justify-content: center;
user-select: none;
flex-shrink: 0;
transition: transform 0.18s ease;
}
.folder-row .toggle.invisible {
visibility: hidden;
}
.toggle-icon {
width: 0.9rem;
height: 0.9rem;
transition: transform 0.18s ease;
}
.folder-row .toggle.expanded .toggle-icon {
transform: rotate(90deg);
}
.folder-row__actions {
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
display: flex;
gap: 0;
opacity: 0;
pointer-events: none;
transition: opacity 0.12s ease;
background-color: var(--surface-overlay);
border-radius: 8px;
padding: 0 0.18rem;
}
.folder-row__actions .icon-button {
margin: 0;
}
.folder-row:hover .folder-row__actions,
.folder-row:focus-within .folder-row__actions {
opacity: 1;
pointer-events: auto;
}
.folder-children {
list-style: none;
margin: 0 0 0 0.45rem;
padding: 0;
}
.sidebar-section {
margin-top: 1rem;
display: flex;
flex-direction: column;
gap: 0.4rem;
}
.sidebar {
gap: 0;
overflow: hidden;
color: var(--sidebar-fg);
display: flex;
flex-direction: column;
width: 20em;
max-width: 20em;
flex: 0 0 20em;
background: var(--bg);
}
.sidebar__body {
flex: 1;
display: flex;
flex-direction: column;
padding: 0.5rem 1rem;
gap: 0.75rem;
overflow-y: auto;
min-height: 0;
}
.sidebar__footer {
margin-top: auto;
padding: 0.75rem 1rem 1rem;
border-top: 1px solid var(--border);
background: var(--surface-subtle);
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.sidebar__title {
margin: 0;
font-size: 1rem;
font-weight: 600;
color: var(--fg);
padding-left: 0.25rem;
}
.sidebar__tenant {
color: var(--muted);
font-weight: 500;
}
.sidebar__header {
position: relative;
}
.sidebar__title-button {
display: inline-flex;
align-items: center;
gap: 0.35rem;
border: none;
background: none;
color: inherit;
font: inherit;
cursor: pointer;
padding: 0;
}
.sidebar__title-button:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
.sidebar__title-chevron {
transition: transform 0.2s ease;
}
.sidebar__title-chevron.is-open {
transform: rotate(180deg);
}
.menu {
position: absolute;
top: 100%;
left: 1em;
right: auto;
background: var(--surface);
border: 1px solid var(--border-muted, var(--border));
border-radius: 0.5rem;
box-shadow: 0 12px 28px var(--shadow-strong);
min-width: 220px;
z-index: 20;
overflow: hidden;
}
.menu__list {
max-height: 260px;
overflow-y: auto;
padding: 0.35rem 0;
display: flex;
flex-direction: column;
gap: 0.15rem;
}
.menu__heading {
padding: 0.5rem 1rem 0.25rem;
font-size: 0.82rem;
font-weight: 600;
color: var(--muted);
}
.menu button.menu__item,
.menu .menu__item {
display: flex;
align-items: center;
justify-content: flex-start;
gap: 0.6rem;
width: 100%;
padding: 0.55rem 1rem;
border: none;
background: none;
color: inherit;
font: inherit;
text-align: left;
cursor: pointer;
transition: background 0.15s ease, color 0.15s ease;
}
.menu button.menu__item:hover,
.menu button.menu__item:focus-visible,
.menu .menu__item:hover,
.menu .menu__item:focus-visible {
background: var(--sidebar-hover-bg);
color: var(--fg);
}
.menu button.menu__item.active,
.menu .menu__item.active {
font-weight: 600;
color: var(--accent);
}
.menu button.menu__item:focus-visible,
.menu .menu__item:focus-visible {
outline: 2px solid var(--accent);
outline-offset: -2px;
}
.menu__label {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
}
.menu__check-slot {
width: 1rem;
display: flex;
align-items: center;
justify-content: center;
color: var(--accent);
}
.menu__active-indicator {
font-size: 0.75rem;
color: var(--muted);
}
.menu__empty {
display: block;
padding: 0.6rem 0.75rem;
color: var(--muted);
font-size: 0.85rem;
}
.menu__footer {
border-top: 1px solid var(--border-muted, var(--border));
padding: 0.35rem 0.5rem;
display: flex;
flex-direction: column;
gap: 0.25rem;
}
.menu--simple .menu__footer {
border-top: none;
}
.menu__settings {
width: 100%;
display: inline-flex;
align-items: center;
gap: 0.4rem;
border: none;
background: none;
color: inherit;
font: inherit;
cursor: pointer;
padding: 0.4rem 0.5rem;
border-radius: 0.35rem;
}
.menu__settings:hover,
.menu__settings:focus-visible {
background: var(--sidebar-hover-bg);
}
.menu__logout {
width: 100%;
display: inline-flex;
align-items: center;
gap: 0.4rem;
border: none;
background: none;
color: var(--danger);
font: inherit;
cursor: pointer;
padding: 0.4rem 0.5rem;
border-radius: 0.35rem;
}
.menu__logout:hover,
.menu__logout:focus-visible {
background: var(--surface-danger-subtle);
}
.sidebar__search {
display: flex;
align-items: center;
gap: 0.4rem;
margin: 0 0 0.75rem;
}
.sidebar__search input[type='search'] {
flex: 1;
padding: 0.4rem 0.6rem;
border-radius: 4px;
border: 1px solid var(--border);
background: var(--surface);
color: var(--fg);
}
.sidebar__search button {
padding: 0.35rem 0.75rem;
border: 1px solid transparent;
border-radius: 4px;
background: transparent;
color: var(--accent);
font-size: 0.85rem;
cursor: pointer;
}
.sidebar__search button:hover:not([disabled]) {
background: var(--sidebar-hover-bg);
}
.sidebar__footer .sidebar-section {
margin-top: 0;
}
.sidebar__footer .sidebar-section__actions {
gap: 0.4rem;
}
.sidebar-section:first-of-type,
.sidebar-section--folders {
margin-top: 0;
}
.sidebar-section--folders {
display: flex;
flex-direction: column;
}
.sidebar-section__header {
display: flex;
align-items: center;
font-size: 0.75rem;
justify-content: space-between;
color: var(--muted);
}
.sidebar-section__title {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.4rem;
width: 100%;
background: transparent;
border: none;
border-radius: 6px;
padding: 0.25rem 0.35rem;
margin: -0.25rem -0.35rem;
color: inherit;
font: inherit;
cursor: pointer;
text-align: left;
}
.sidebar-section__title:hover:not([disabled]),
.sidebar-section__title:focus-visible {
background: var(--sidebar-hover-bg);
color: var(--fg);
}
.sidebar-section__title:hover:not([disabled]) h3,
.sidebar-section__title:focus-visible h3 {
color: var(--fg);
}
.sidebar-section__header h3 {
margin: 0;
font-weight: 600;
}
.sidebar-section__actions {
display: inline-flex;
align-items: center;
gap: 0.35rem;
}
.sidebar-section__actions .meta {
font-size: 0.75rem;
color: var(--muted);
}
.sidebar-slider {
display: flex;
align-items: center;
gap: 0.5rem;
font-size: 0.8rem;
color: var(--muted);
}
.sidebar-slider input[type='range'] {
flex: 1;
accent-color: var(--accent);
}
.sidebar-slider__value {
min-width: 3rem;
text-align: right;
color: var(--fg);
font-variant-numeric: tabular-nums;
}
.sidebar-item {
background: transparent;
padding: 0.16rem 0.26rem;
text-align: left;
color: var(--sidebar-fg);
border-radius: 2px;
cursor: pointer;
transition: background 0.12s ease, color 0.12s ease;
display: flex;
align-items: center;
gap: 0.38rem;
width: 100%;
}
.sidebar-item:hover {
background: var(--sidebar-hover-bg);
color: var(--fg);
}
.sidebar-item.active {
background: var(--sidebar-active-bg);
color: var(--fg);
font-weight: 600;
}
.sidebar-item:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
.sidebar-item__icon {
width: 1rem;
height: 1rem;
flex-shrink: 0;
color: var(--accent);
}
.sidebar-item.active .sidebar-item__icon {
color: currentColor;
}
.sidebar-tag-cloud {
display: flex;
flex-wrap: wrap;
gap: 0.35rem;
padding: 0.25rem 0 0.1rem;
}
.sidebar-tag-pill {
border-radius: 999px;
padding: 0.25rem 0.6rem;
font-size: 0.75rem;
font-weight: 600;
line-height: 1;
cursor: pointer;
background: var(--surface-soft);
color: var(--fg);
transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease,
opacity 0.12s ease;
box-shadow: 0 1px 2px var(--shadow-faint);
}
.sidebar-tag-pill:hover {
transform: none;
box-shadow: 0 2px 6px var(--shadow-pop);
border-color: var(--accent-soft);
}
.sidebar-tag-pill:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
.sidebar-tag-pill.active {
border-color: var(--sidebar-active-pill-border);
box-shadow: 0 0 0 1.5px var(--sidebar-active-pill-border);
}
.sidebar-tag-pill--untagged {
border: 1px dashed var(--border);
background: var(--surface-subtle);
color: var(--muted);
}
.sidebar-tag-pill--untagged.active {
color: var(--fg);
}
.sidebar-tag-cloud--has-active .sidebar-tag-pill:not(.active) {
opacity: 0.45;
}
.sidebar-correspondent-list {
list-style: none;
margin: 0.4rem 0 0;
padding: 0;
display: flex;
flex-direction: column;
gap: 0.25rem;
}
.sidebar-correspondent-item {
display: block;
background: transparent;
border-radius: 4px;
padding: 0.35rem 0.5rem;
text-align: left;
color: var(--sidebar-fg);
cursor: pointer;
font-size: 0.85rem;
transition: background 0.15s ease, box-shadow 0.15s ease;
}
.sidebar-correspondent-item:hover {
background: var(--sidebar-hover-bg);
color: var(--fg);
}
.sidebar-correspondent-item:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
.sidebar-correspondent-item.active {
background: var(--sidebar-active-bg);
color: var(--fg);
}