дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-27 04:56:08 +02:00
Follow-up to #4481: hovering a coloured project tab made the custom colour disappear. The hover rule layered the opaque `--bg-hover` surface on top of the tint (`linear-gradient(var(--bg-hover), var(--bg-hover)), var(--tab-tint-mix)`), so while the pointer was over the tab only the plain grey hover surface remained. The hover rule now mixes the project colour into the hover surface instead, mirroring how the selected rule mixes into `--bg-island`: ```css .item[data-tinted]:hover { background: color-mix(in srgb, var(--project-color) 12%, var(--bg-hover)); } Co-authored-by: happut <[email protected]>
113 рядки
2.3 KiB
CSS
113 рядки
2.3 KiB
CSS
.bar {
|
|
display: flex;
|
|
flex: none;
|
|
align-items: center;
|
|
position: relative;
|
|
padding: 0 var(--window-tabs-right, 40px) var(--island-gap) var(--window-tabs-left, 40px);
|
|
min-width: 0;
|
|
}
|
|
.tabs {
|
|
display: flex;
|
|
flex: 1;
|
|
overflow-x: auto;
|
|
min-width: 0;
|
|
}
|
|
/* Tabs share the row equally with the title centred, the close button on the left on hover. */
|
|
.item {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
flex: 1 1 0;
|
|
min-width: 0;
|
|
box-sizing: border-box;
|
|
border-radius: var(--island-radius);
|
|
margin: 0 1px;
|
|
color: var(--fg-muted);
|
|
}
|
|
.close {
|
|
position: absolute;
|
|
left: 6px;
|
|
width: 22px;
|
|
height: 22px;
|
|
opacity: 0;
|
|
}
|
|
.item:hover .close,
|
|
.item:focus-within .close {
|
|
opacity: 1;
|
|
}
|
|
.item:hover {
|
|
background: var(--bg-hover);
|
|
}
|
|
.item {
|
|
touch-action: none;
|
|
user-select: none;
|
|
}
|
|
.dragging {
|
|
opacity: 0.55;
|
|
}
|
|
.selected,
|
|
.selected:hover {
|
|
background: var(--bg-island);
|
|
color: var(--fg);
|
|
}
|
|
/* Only a user-chosen colour tints the tab; the default keeps the plain surface. */
|
|
.item[data-tinted] {
|
|
--tab-tint-mix: color-mix(in srgb, var(--project-color) 12%, transparent);
|
|
background: var(--tab-tint-mix);
|
|
}
|
|
.item[data-tinted]:hover {
|
|
background: color-mix(in srgb, var(--project-color) 12%, var(--bg-hover));
|
|
}
|
|
.selected[data-tinted],
|
|
.selected[data-tinted]:hover {
|
|
background: color-mix(in srgb, var(--project-color) 25%, var(--bg-island));
|
|
}
|
|
.tab {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex: 1;
|
|
min-width: 0;
|
|
height: 30px;
|
|
padding: 0 28px;
|
|
border: 0;
|
|
color: inherit;
|
|
background: transparent;
|
|
font: inherit;
|
|
cursor: default;
|
|
}
|
|
.tab span {
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
.tab:focus-visible {
|
|
outline: 2px solid var(--accent);
|
|
outline-offset: -2px;
|
|
border-radius: var(--radius-small);
|
|
}
|
|
|
|
.item:not(.selected):not(:hover):not(:last-child):not(:has(+ .selected, + :hover))::after {
|
|
position: absolute;
|
|
top: 5px;
|
|
right: -1px;
|
|
bottom: 5px;
|
|
width: 1px;
|
|
background: var(--border-strong);
|
|
content: "";
|
|
pointer-events: none;
|
|
}
|
|
|
|
/* The per-tab detach button mirrors .close on the right edge, centred like it by the row. */
|
|
.detach {
|
|
position: absolute;
|
|
right: 6px;
|
|
width: 22px;
|
|
height: 22px;
|
|
opacity: 0;
|
|
}
|
|
.item:hover .detach,
|
|
.item:focus-within .detach {
|
|
opacity: 1;
|
|
}
|