phase: 116_modal_scrollbar_theme
All verification complete — every gate re-run independently and green. Final report: **Phase 116 final verification pass — all green (work was already in the tree; verified, nothing to fix)** - **Verified** `styles.css`: `--scrollbar-thumb`/`--scrollbar-track` tokens in `:root` (color-mix derivations — follow the saved theme, not in BUILTIN_COLORS; contrast 3.73:1 ≥ 3:1, recomputed independently) + scoped rules `.doc-modal .doc-raw` (overflow-x already owned by the element) - **Verified** E2E test 8 `test_raw_code_block_themed_scrollbar`: overflow, scroll action, computed-style theme assertions, screenshot - **Screenshots visually confirmed**: headed `doc_modal_scrollbar_themed_1280.png` shows muted rounded thumb on dark track, no native light-gray bar; headless suite shot records scrolled state (headless Chromium paints no bar UI — documented in test docstring) **Test / lint / coverage (re-run by me):** - `uv run pytest tests/e2e/test_document_viewer.py -v --no-cov` → **8 passed** (isolation) - `uv run pytest --cov=app --cov-report=term` → **2457 passed, app/ 99%** (>90% ✓) - `uv run pytest tests/e2e/test_dark_tech_theme.py -v --no-cov` → **6 passed** (no token collision) - `uv run ruff check .` → clean; `uv run pyright` → 0 errors, 0 warnings **Completion criteria:** 1. Modal scrolls horizontally, scrollbar themed, screenshot shows no native bar — ✅ 2. No global scrollbar change (all new selectors under `.doc-modal`; grep-confirmed), regressions green — ✅ 3. pytest green, coverage >90%, e2e isolated green, ruff+pyright clean — ✅ 4. `--no-gpg-sign` commit + phase move — harness job (left uncommitted in working tree, per rules) **No defects found; no deviations. Next pending phase:** none — `todo/` contains only phase 116.
This commit is contained in:
@@ -35,6 +35,19 @@
|
||||
--err-ink: #fca5a5; /* 9.3:1 on --err-bg */
|
||||
--err-line: #ef4444; /* 4.6:1 on --err-bg (UI boundary, not text) */
|
||||
|
||||
/* Scrollbar tokens (phase 116, task 01) — the document modal's raw
|
||||
code block scrolls horizontally (locked A1: code never wraps), so
|
||||
its scrollbar must match the theme instead of the browser-native
|
||||
light bar. Like the derived state colors above, COMPUTED in :root
|
||||
from the identity palette via color-mix(): NOT stored, NOT
|
||||
tab-controlled, NOT in BUILTIN_COLORS (theming.py) — every saved
|
||||
theme repaints them. Muted thumb on a near-code-background track
|
||||
(the .doc-raw background is --surface); the thumb holds >= 3:1
|
||||
non-text contrast against the track (WCAG 2.1 AA — 3.7:1 at the
|
||||
built-in palette). */
|
||||
--scrollbar-thumb: color-mix(in srgb, var(--ink-soft) 60%, var(--surface));
|
||||
--scrollbar-track: color-mix(in srgb, var(--surface) 75%, var(--bg));
|
||||
|
||||
--radius: 10px;
|
||||
--radius-sm: 6px;
|
||||
--shadow: 0 1px 2px rgb(0 0 0 / 0.30), 0 4px 16px rgb(0 0 0 / 0.35);
|
||||
@@ -4330,6 +4343,26 @@ details.thinking .thinking-text ul { margin: 0 0 0.5rem; }
|
||||
overflow: auto;
|
||||
padding: 1rem 1.25rem 1.5rem;
|
||||
}
|
||||
/* Themed horizontal scrollbar for the modal's raw code block (phase 116,
|
||||
task 01): the .doc-raw pre already owns its overflow (its own
|
||||
`overflow-x: auto` + `white-space: pre` — locked A1, code never
|
||||
wraps), so the native light-gray bar a long line reveals is the pre's
|
||||
own. Both engine families are themed, scoped to THIS modal only (no
|
||||
global scrollbar restyle — the TODO's scope): scrollbar-color / -width
|
||||
for Firefox, the ::-webkit-scrollbar pseudos for Chromium (height 8px
|
||||
= the horizontal bar; the pre does not scroll vertically). The tokens
|
||||
follow the saved theme via the :root color-mix derivation; the muted
|
||||
thumb keeps >= 3:1 non-text contrast on the near-surface track. */
|
||||
.doc-modal .doc-raw {
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
|
||||
}
|
||||
.doc-modal .doc-raw::-webkit-scrollbar { height: 8px; }
|
||||
.doc-modal .doc-raw::-webkit-scrollbar-track { background: var(--scrollbar-track); }
|
||||
.doc-modal .doc-raw::-webkit-scrollbar-thumb {
|
||||
background: var(--scrollbar-thumb);
|
||||
border-radius: 4px;
|
||||
}
|
||||
.doc-modal-loading { margin: 1.5rem auto; text-align: center; color: var(--ink-soft); }
|
||||
|
||||
/* No motion under reduced motion (same pattern as the phase-25 layers). */
|
||||
|
||||
Reference in New Issue
Block a user