Commit c872384
committed
Aesthetic polish — scrollbar, code blocks, focus, button (Phase 5)
New stylesheet src/css/skainet-polish.css that layers the
SKaiNET visual touches on top of the upstream Antora UI base.
Imported last from src/css/site.css so its selectors win the
cascade where they share specificity with upstream defaults.
## What landed
1. **6px thin scrollbar** — `scrollbar-width: thin` + a custom
`::-webkit-scrollbar` block. Thumb color comes from
`--scrollbar-thumb-color` (defined in vars.css per theme),
so it picks the right shade in light vs dark mode without
any duplicate rules.
2. **Rounded code blocks with proper backgrounds** — `.doc
pre.highlight` (and the literalblock + listingblock variants)
now ship with `background: var(--pre-background)`,
`border-radius: 8px`, a 1px border in `--pre-border-color`,
and a subtle shadow. In light mode that's GitHub-light
`#f6f8fa`; in dark mode it flips to GitHub-dark `#0d1117` —
matching the structured-coroutines reference aesthetic.
3. **Inline `<code>` reset** — `.doc :not(pre) > code` gets the
same color tokens, a tighter padding, and `border-radius:
4px` so inline code visually distinguishes itself from prose.
4. **Theme-toggle button styling** — `.navbar .theme-toggle`
resets the native `<button>` chrome (no border, transparent
background, inherit font + color) so it sits cleanly inside
`.navbar-item`. Hover background uses
`--navbar-menu_hover-background` (matches the rest of the
nav). Focus shows a primary-red glow via `box-shadow` +
`color-mix(in sRGB, var(--color-skainet-red) 40%, transparent)`.
5. **Icon swap on dark mode** — `[data-theme="dark"]
.theme-toggle-icon` hides the `🌓` source glyph
(`font-size: 0`) and renders a `🌙` via `::before`, so the
icon clearly indicates the active mode.
6. **Primary-red focus glow on links** — applied to `.doc a`,
`.nav a`, `.toc a`, `.toolbar a`, and `.pagination a` via
`:focus-visible`. Same `box-shadow` shape as the toggle.
`:focus-visible` (not `:focus`) so mouse clicks don't trigger
the glow — only keyboard navigation.
7. **Section heading dividers** — `.doc h2` gets a top border
in `--section-divider-color` and 2.5rem of margin-top, so
long pages get clear visual section breaks.
8. **Light-mode card elevation on the doc body** — at
`min-width: 1024px` the `.doc` element gets a
`border-radius: 12px`, padding, and a soft two-layer
`box-shadow`. Only in light mode (gated on `[data-theme="light"]`)
so the dark mode keeps the flat-on-black look.
## Stylelint corrections during authoring
Two rules tripped on the first pass and were resolved:
- `no-duplicate-selectors` — initially I had two
`[data-theme="dark"] .theme-toggle-icon` blocks (one for the
parent rule, one for `::before`). Merged the parent rules and
kept only the `::before` block separate.
- `value-keyword-case` — stylelint requires `sRGB` (not `srgb`)
in `color-mix(in sRGB, ...)`. Both occurrences updated.
## Verification
`npx gulp bundle` runs clean — clean → lint:css → lint:js →
build → bundle:pack — and produces build/ui-bundle.zip with
skainet-polish.css inlined into css/site.css.
Phase 5 of the six-PR delivery plan. Phase 6 is the v1.0.0
release tag + GitHub Actions release workflow + downstream
consumer wiring.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 2a8ec41 commit c872384
2 files changed
Lines changed: 143 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
0 commit comments