Files
openidea/src/features/settings/dialog/SettingsDialog.module.css
T
arookieofc 58ff3e93d0 fix(linux): paint a hairline edge on the frameless settings window
Linux compositors draw no shadow for undecorated windows (Wayland has
no server-side decorations at all), so the frameless settings window is
indistinguishable from the desktop there — #595's follow-up after the
Windows DWM-shadow fix. Paint a 1px --border-window inset ring around
the window root: the webview draws the same hairline on every
windowing system.
2026-11-02 20:50:29 +08:00

223 lines
3.9 KiB
CSS

/* IDEA Settings: one flat dialog surface, sidebar split by a hairline, window-style title bar. */
.dialog {
height: min(720px, calc(100vh - 48px));
background: var(--bg-dialog, var(--bg-elev));
}
.layout {
height: 100%;
display: flex;
min-height: 0;
min-width: 0;
}
.sidebar {
flex: none;
width: 240px;
display: flex;
flex-direction: column;
min-height: 0;
border-right: 1px solid var(--border);
}
.search {
margin: 10px;
}
.tree {
flex: 1;
min-height: 0;
display: flex;
flex-direction: column;
padding-bottom: 6px;
}
.node {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.topLevel {
font-weight: 600;
color: var(--fg-strong);
}
/* Selection stays blue and full-width even when the tree is not focused (IDEA settings tree). */
.tree [role="tree"] {
padding-inline: 0;
}
.tree [role="treeitem"] {
margin-inline: 0;
border-radius: 0;
}
.tree [role="treeitem"][aria-selected="true"] {
background: var(--bg-tree-selected);
}
.dirty {
color: var(--accent);
}
.noMatch {
padding: 8px 12px;
color: var(--fg-subtle);
}
.main {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
min-height: 0;
}
.pageHeader {
flex: none;
display: flex;
align-items: center;
gap: 12px;
height: 40px;
padding: 0 12px 0 20px;
}
.history {
display: inline-flex;
gap: 2px;
}
.crumbs {
flex: 1;
min-width: 0;
display: flex;
align-items: center;
overflow: hidden;
white-space: nowrap;
color: var(--fg-strong);
font-weight: 600;
}
.crumb {
display: inline-flex;
align-items: center;
}
.crumbSep {
margin: 0 4px;
color: var(--fg-subtle);
}
.reset {
flex: none;
padding: 0;
border: 0;
background: none;
color: var(--link);
font: inherit;
cursor: pointer;
}
.reset:hover {
color: var(--link-hover);
text-decoration: underline;
}
.reset:focus-visible {
outline: 2px solid var(--focus-ring, var(--accent));
}
.scope {
display: inline-flex;
padding: 2px;
border-radius: var(--radius-small);
box-shadow: inset 0 0 0 1px var(--border-strong);
}
.scopeButton {
height: var(--h-control-small);
padding: 0 10px;
border-radius: 3px;
color: var(--fg-muted);
font-size: var(--fs-small);
}
.scopeButton:hover {
color: var(--fg-emphasis);
}
.scopeOn {
background: var(--bg-active);
color: var(--fg-strong);
}
.scopeNote {
display: flex;
align-items: center;
gap: 6px;
margin: 0 16px 6px;
color: var(--fg-subtle);
font-size: var(--fs-small);
}
.pageBody {
flex: 1;
min-height: 0;
overflow: auto;
padding: 4px 20px 20px;
-webkit-user-select: text;
user-select: text;
}
.groupPage {
padding-top: 8px;
}
.groupDescription {
margin: 0 0 14px;
max-width: 720px;
color: var(--fg);
line-height: 1.45;
}
.groupLinks {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 2px;
padding-left: 32px;
}
.groupLink {
height: 20px;
padding: 0;
border: 0;
background: none;
color: var(--link);
font: inherit;
text-align: left;
cursor: pointer;
}
.groupLink:hover {
color: var(--link-hover);
text-decoration: underline;
}
.groupLink:focus-visible {
outline: 2px solid var(--focus-ring, var(--accent));
}
.footerStatus {
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.error {
display: inline-flex;
align-items: center;
gap: 6px;
color: var(--danger);
}
/* Native Settings window (desktop): the same layout filling the window. */
.window {
height: 100%;
display: flex;
flex-direction: column;
min-width: 0;
background: var(--bg-dialog, var(--bg-elev));
color: var(--fg);
}
/* Linux draws no shadow for a frameless window (Wayland/KDE give undecorated
windows no CSD), so mark its edge in CSS instead. */
.windowEdge {
box-shadow: inset 0 0 0 1px var(--border-window);
}
.windowBody {
flex: 1;
min-height: 0;
}
.windowFooter {
flex: none;
display: flex;
align-items: center;
justify-content: flex-end;
gap: 12px;
padding: 12px 16px;
}