Files
deepseek-harness/packages/client/web/src/base.css
T
mektpoy 7dfad90748 fix(client): keep the drag watcher alive through a slide and stop a float being dragged
The recall watcher now tolerates a short quiet window so a report that arrives before a CSS transition moves anything cannot end the loop on its first unchanged sample, re-arms on a transition or animation that touches a marked row, and re-arms on a child list change in a container holding one. A dock picture withdraws its strip's drag claim while a pane floats, because a float sorted before that row would otherwise sit earlier in the document and lose its own subtraction. The settings panel closes when an onboarding step appears, since the step's overlay marks only #root inert. Prose and the two Agent Notes record the Windows narrowing of the Platform overlay return bar, the collection rule, and the rows' one home in the ui-theme manifest.
2026-09-23 19:45:14 +08:00

119 lines
4.5 KiB
CSS

/* Shell-owned mount defaults. Theme tokens arrive with the ui-theme client
* plugin before the loader roster activates. */
html,
body,
#root {
height: 100%;
margin: 0;
}
body {
font-family: var(
--dsw-font-family,
-apple-system,
BlinkMacSystemFont,
'Segoe UI',
'PingFang SC',
'Hiragino Sans GB',
'Microsoft YaHei',
'Helvetica Neue',
Helvetica,
Arial,
sans-serif
);
/* Grayscale antialiasing over subpixel rendering: WebKit/Blink and the
Firefox macOS equivalent; other engines ignore both lines. */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
color: var(--dsw-alias-label-primary, #0f1115);
background: var(--dsw-alias-bg-base, #fff);
/* Supporting browsers insert CJK/Latin spacing in inherited prose. */
text-autospace: normal;
}
/* macOS desktop (the Electron preload sets data-platform): the window's
sidebar vibrancy shows only through a transparent page background. */
html[data-platform='darwin'],
html[data-platform='darwin'] body {
background: transparent;
}
/* The transparent window disables backdrop-filter: Chromium composites it
against the root surface, which vibrancy leaves transparent, so the blur in
--dsw-menu-backdrop-filter renders as nothing and half-opaque menu fills
let underlying text bleed through. Compensate with near-opaque fills on the
same design-platform hues (light 248 249 250 / dark 48 49 54). */
html[data-platform='darwin'] body {
--dsw-specific-menu: rgba(248, 249, 250, 0.94);
}
html[data-platform='darwin'] body[data-ds-dark-theme] {
--dsw-specific-menu: rgba(48, 49, 54, 0.94);
}
/* macOS desktop: the one drag declaration. A chrome row marks itself in markup
(`data-window-drag`) and its own box becomes its draggable geometry, so no fixed
band has to match any row's height; the ui-theme app-region gate's CHROME_ROWS
manifest is the list of rows that must carry the mark. Electron composes
app-regions from geometry, not hit testing, so a surface covering a row would
otherwise drag the window instead of receiving clicks; every covering overlay
portals to document.body beside #root, which also puts it after every drag row
in document order, and one rule subtracts them all. */
html[data-platform='darwin'] [data-window-drag] {
-webkit-app-region: drag;
}
/* One-frame app-region pulse that forces Electron to recollect the window's drag
rects (electron#32341): a change to a computed app-region value is what dirties
them. The shell's window drag watcher (window-drag/recall.ts) sets this
attribute on the body for each frame in which a marked row's box moved, and
clears it on the frame that finds the geometry settled. The box it subtracts
is the body's own: the row marks inside still declare drag and win over it in
document order, so the pulse changes nothing about the composed surface — it
only makes Electron collect it again. */
html[data-platform='darwin'] [data-window-drag-recall] {
-webkit-app-region: no-drag;
}
html[data-platform='darwin'] body > :not(#root) {
-webkit-app-region: no-drag;
}
/* Inside #root, interactive controls and raised surfaces (dialogs, menus)
subtract themselves from any drag row they overlap, wherever they render.
Electron composes app-regions from geometry in document order, so a drag rule
must sit on a chrome row that precedes the overlays covering it — never on a
content container, which would override every overlay mounted earlier in the
DOM. One selector on the native elements, ARIA roles, and tabindexed custom
widgets replaces per-component no-drag opt-outs. */
html[data-platform='darwin'] :is(
button, a, input, select, textarea, summary, [contenteditable='true'], [tabindex],
[role='dialog'], [role='alertdialog'], [role='menu'], [role='listbox'], [role='tooltip'],
[role='button'], [role='link'], [role='tab'], [role='menuitem'], [role='menuitemcheckbox'],
[role='menuitemradio'], [role='option'], [role='checkbox'], [role='radio'], [role='switch'],
[role='slider'], [role='combobox'], [role='textbox']
) {
-webkit-app-region: no-drag;
}
code,
pre,
[data-diff],
[data-read],
[data-search],
[data-terminal] {
/* Literal payloads retain source spacing and column alignment. */
text-autospace: no-autospace;
}
/* Form controls don't inherit the body font (UA sheets pin their families —
Chrome buttons fall back to Arial, textareas to monospace), so the app
stack is re-applied to them explicitly, as upstream's global reset does. */
button,
input,
select,
textarea {
font-family: inherit;
}