дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-21 00:50:47 +02:00
File colours, excluded folders and data source colours were painted as the row's own background: inset from the tree's edges, rounded per row, or dropped under hover and selection, so a run of tinted rows read as a ragged stack. The tint is now a full-width band under the row; hover and selection stay rounded on top. Excluded folders and data source colours share the rowTint path. Fixes #3616
216 рядки
4.6 KiB
CSS
216 рядки
4.6 KiB
CSS
.wrap {
|
|
position: relative;
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-height: 0;
|
|
height: 100%;
|
|
}
|
|
/* Tree.border 4,12,4,12 minus the island padding; rows are inset so the rounded selection floats. */
|
|
.tree {
|
|
flex: 1;
|
|
min-height: 0;
|
|
overflow: auto;
|
|
outline: none;
|
|
padding: 0 var(--tree-inset, 6px);
|
|
}
|
|
.tree::-webkit-scrollbar {
|
|
width: 10px;
|
|
height: 10px;
|
|
}
|
|
.tree::-webkit-scrollbar-thumb {
|
|
background-color: var(--scrollbar-thumb);
|
|
border: 2px solid transparent;
|
|
border-radius: 5px;
|
|
background-clip: content-box;
|
|
}
|
|
.tree::-webkit-scrollbar-thumb:hover {
|
|
background-color: var(--scrollbar-thumb-hover);
|
|
}
|
|
.tree::-webkit-scrollbar-track,
|
|
.tree::-webkit-scrollbar-corner {
|
|
background: transparent;
|
|
}
|
|
.emptyWrap {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: var(--fg-faint);
|
|
}
|
|
.sizer {
|
|
position: relative;
|
|
width: 100%;
|
|
/* Keeps the tint bands of rows above the tree's background. */
|
|
isolation: isolate;
|
|
}
|
|
.row {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-1);
|
|
padding-right: 8px;
|
|
border-radius: var(--radius-selection, 5px);
|
|
color: var(--fg-strong);
|
|
white-space: nowrap;
|
|
}
|
|
/* At least the visible width so the selection covers it; wider rows overflow the sizer. */
|
|
.wideRow {
|
|
width: max-content;
|
|
min-width: 100%;
|
|
}
|
|
.contentWidth {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
height: 1px;
|
|
pointer-events: none;
|
|
}
|
|
.row:hover {
|
|
background: var(--bg-tree-hover, color-mix(in srgb, var(--fg-strong) 4%, transparent));
|
|
}
|
|
/* File Colors: a full-width band under the row, so runs of tinted rows read as one block;
|
|
hover and selection stay rounded on top of it. */
|
|
.tinted::before {
|
|
content: "";
|
|
position: absolute;
|
|
inset: 0 calc(-1 * var(--tree-inset, 6px));
|
|
z-index: -1;
|
|
background: color-mix(in srgb, var(--row-tint) var(--row-tint-strength, var(--file-tint-strength, 14%)), transparent);
|
|
pointer-events: none;
|
|
}
|
|
/* Tree.selectionInactiveBackground when unfocused, selectionBackground when focused. */
|
|
.selected,
|
|
.selected:hover {
|
|
background: var(--bg-tree-selected-inactive);
|
|
}
|
|
.tree:focus .selected,
|
|
.tree:focus-within .selected {
|
|
background: var(--bg-tree-selected);
|
|
}
|
|
/* Adjacent selected rows merge into one rounded block. */
|
|
.joinPrev {
|
|
border-top-left-radius: 0;
|
|
border-top-right-radius: 0;
|
|
}
|
|
.joinNext {
|
|
border-bottom-left-radius: 0;
|
|
border-bottom-right-radius: 0;
|
|
}
|
|
.tree:focus-visible .lead:not(.selected) {
|
|
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--focus-ring) 50%, transparent);
|
|
}
|
|
.loading {
|
|
color: var(--fg-faint);
|
|
}
|
|
.before::before,
|
|
.after::after {
|
|
content: "";
|
|
position: absolute;
|
|
left: 0;
|
|
right: 0;
|
|
height: 2px;
|
|
background: var(--focus-ring);
|
|
pointer-events: none;
|
|
z-index: 1;
|
|
}
|
|
.before::before {
|
|
top: 0;
|
|
}
|
|
.after::after {
|
|
bottom: 0;
|
|
}
|
|
.chevron {
|
|
flex: none;
|
|
width: 16px;
|
|
height: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: var(--fg-muted);
|
|
}
|
|
.icon {
|
|
flex: none;
|
|
margin-right: 2px;
|
|
color: var(--fg-muted);
|
|
}
|
|
.label {
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
.detail {
|
|
flex-shrink: var(--tree-detail-flex-shrink, 1);
|
|
min-width: 0;
|
|
margin-left: 4px;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
color: var(--fg-muted);
|
|
}
|
|
/* SpeedSearch popup above the tree. */
|
|
.speedSearch {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 8px;
|
|
z-index: var(--z-panel);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-1-5);
|
|
height: 26px;
|
|
max-width: calc(100% - 16px);
|
|
padding: 0 10px 0 8px;
|
|
border-radius: var(--radius-control, 4px);
|
|
background: var(--bg-popup);
|
|
border: 1px solid var(--border-popup);
|
|
box-shadow: var(--shadow-popup);
|
|
color: var(--fg-muted);
|
|
font-size: var(--fs-ui);
|
|
pointer-events: none;
|
|
}
|
|
/* The field variant sits on the 32px toolbar row above the tree, covering its first buttons. */
|
|
.speedField {
|
|
top: auto;
|
|
bottom: calc(100% + 2px);
|
|
left: 6px;
|
|
gap: var(--space-1);
|
|
height: 28px;
|
|
min-width: 160px;
|
|
padding: 0 2px 0 8px;
|
|
box-shadow: none;
|
|
pointer-events: auto;
|
|
}
|
|
.speedField .speedQuery {
|
|
margin-left: 2px;
|
|
}
|
|
.caret {
|
|
flex-shrink: 0;
|
|
width: 1px;
|
|
height: 16px;
|
|
margin: 0 auto 0 -2px;
|
|
background: var(--fg-strong);
|
|
animation: caret-blink 1s steps(1) infinite;
|
|
}
|
|
@keyframes caret-blink {
|
|
50% {
|
|
opacity: 0;
|
|
}
|
|
}
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.caret {
|
|
animation: none;
|
|
}
|
|
}
|
|
.onlyMatches {
|
|
flex-shrink: 0;
|
|
}
|
|
.speedQuery {
|
|
color: var(--fg-strong);
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: pre;
|
|
}
|
|
.noMatch .speedQuery {
|
|
color: var(--danger);
|
|
}
|