Repository navigation
site(style): design-token layer and shared components — palette roles, type/spacing scales, capsule buttons, chips, cards, unified H1/H2, zh/ja hero phrase breaks - #349
Merged
objectstack-fleet[bot] merged 1 commit intoNov 2, 2026
Conversation
…scale (#345) Phase 1 of the style audit under the visual-style ruling on #340: direction A "Governed editorial", system fonts, palette roles, capsule buttons. Base.astro carries the token layer: 17 named colour roles per theme (--brand for identity and interaction, --green for emphasis, --ink for action, amber and red for status only, --panel-ink with its on-panel trio), twelve fixed type steps plus three fluid display steps, five line heights, 4px spacing with one --space-section, four measures, three radii and three shadows. The shared .btn (primary / secondary / ghost), .chip / .chip-brand, .card / .card-grid, .pill-nav, .eyebrow and .panel-dark classes replace the five templates' own buttons, chips and cards; home, the evidence pages, pricing, security and the cluster pages are migrated, with the header, blog, post, glossary, legal and 404 surfaces. H1 is one step on every page template (hero 40-64px, page 36-56px), marketing H2 is 28-40px, weights are 400 / 600 / 700. The zh/ja hero lead and edition paragraph take the headings' phrase <wbr> and keep-all. The decorative tri-colour bars are a single green rule. No palette hue is new: the existing colours map onto the roles. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FeA1nwBz1ohH65dvffUGKr
Contributor
Author
席位核对Verdict: ACCEPT. Reviewed against GitHub, not the report. This implements style-audit phase 1 under the ruling on #340 (comment 6570301123): direction A, system fonts, palette roles, capsule buttons.
Generated by Claude Code |
This was referenced Nov 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #345
Style-audit phase 1 under the visual-style ruling on #340 (comment 6570301123, maintainer 2026-11-02): direction A "Governed editorial", system fonts, palette roles, capsule buttons. Blocked-by #342 has landed; this is on top of
4e37285(#341, #347, #348 included).What changed
src/layouts/Base.astro. Every colour, type size, line height, measure, radius and shadow a component uses is now a named token; a component declares layout and picks tokens.--on-panel*/--panel-inkvalues are the same in both):--bg --surface --surface-sunk --line,--ink --ink-soft --muted,--brand(indigo: logo, links, focus, selected state, topic chips, card hover),--brand-soft,--green(emphasis: eyebrows, the hero's second line, indexes, marks),--amber/--red(status only),--panel-inkwith--on-panel --on-panel-soft --on-panel-accent,--status-archived.--accent/--accent-soft/--ringare gone (--ringis derived from--brand);--surface-glassis derived from--surface.#3d58f0/#91a3ffis--brand; the two greens (#057a58home/blog/404,#087f5belsewhere) are one--green: #087f5b; the three blues (--home-blue #3157d8,--sec-blue #2563eb,#8fa3ff) fold into--brand; the three ambers (#93600f,#b45309,#b7791f) into--amber: #93600f; the two reds into--red: #bd4b4b; the dark panel greens (#172b26,#12352c→#183f35,rgba(23,43,38,.96)) into--panel-ink: #172b26. The Tailwind defaults site(style): phase-0 quick wins — font-stack order, dark CTA, dark cover dimming, prose measure, CJK title line-height, tabular numerals, hamburger at 1024 #341 could not move (#10b981live dot,#292524media note,#0f172a/#111827-family video frames,#6ee7b7/#34d399poster accents) now take--green,--ink,--panel-inkand--on-panel-accent. The body's paper wash iscolor-mixof the grounds and accents (two stops move by 1-3 units of 255). The only literals left outside the:rootblocks are the#000alpha masks of the scroll-edge fades and the logo's own#4F46E5(logo colour is a phase-2 decision on site(style): phase-0 quick wins from the visual-style audit — font-stack order, dark-mode CTA contrast, dark-mode cover dimming, prose measure, CJK title line-height, tabular numerals #340).--fs-12 … --fs-44(12 13 14 15 16 17 18 20 24 30 36 44 px) plus three fluid display steps--fs-h2(28-40),--fs-h1(36-56) and--fs-hero(40-64). The two h1 steps keep the evidence pages'vhterm, so a 1366×625 laptop still holds the primary CTA in its first screen.--lh-display 1.05 / heading 1.25 / ui 1.45 / body 1.65 / prose 1.8, with--lh-display: 1.2on zh/ja/ko page roots.--sp-1 … --sp-10on a 4px base and one--space-section: clamp(3.5rem, 8vw, 7rem)shared by home, evidence and security sections.--measure-lead 36rem / prose 44rem / wide 54rem / media 60rem(plus--maxw); three radii--r-control 6px / card 8px / pill 999px; three shadows--shadow-sm / md / lg..btnwith.btn-primary(ink capsule, inverts on.on-darkpanels and in the dark theme),.btn-secondary(surface + line),.btn-ghost(underlined text link),.btn-smfor the header bar;.chipand.chip-brand;.card/.card-linkand.card-grid;.pill-nav;.eyebrow/.section-kicker;.panel-dark. The five templates are migrated: home, evidence pages, pricing, security, cluster — plus the header CTA and drawer CTA, blog cards, post header, glossary, legal and 404. The five primary-button styles (header capsule, home 6px gradient, evidence capsule, pricing 10px indigo, security 6px white) are one. The pricing recommended card is the primary ink button with a 2px--brandoutline and a 2px--brandcard edge; the recommended badge stays..hero-leadand.hero-editionsrender throughphraseHtmland takekeep-all, like the headings: the zh lead now breaks…AI 编写它,/ 运行时运行它,…, the ja lead…をひとつ。/ AI が書き、ランタイムが動かし、/ エージェントが…at 390 (was 运/行时, ひと/つ).--greenrule. The decorative tones on home solution/AI cards, evidence loop steps and card labels, and the security deployment titles (blue/amber) are gone: marks and indexes are--green, hover edges and arrows--brand, titles ink.Out of scope and untouched: the nav structure and labels (#348), the cover spec in AGENTS.md and the cover scripts, inline scripts (the CSP digests are unchanged;
seo:smokechecks them), the logo colour, webfonts. AGENTS.md is untouched (a governed surface; a note naming the token layer can go in a separate small PR).Token inventory (component
<style>blocks,scripts-free count of distinct declared values)font-sizeem/cqwrelatives in the hero strong, card arrow, inline code and the video poster)line-height1on mono indexes)font-weightbox-shadowborder-radius0+ the blockquote's one-sided card radius)#000alpha masks, logo#4F46E5)max-width--maxw+100%/none/two phonemin()floors/one 320px caption)letter-spacingComputed-style diff
8 pages (home, pricing, compare, security, glossary, blog index, a post, a cluster page) × 6 viewports × light/dark × en and zh-Hans = 192 snapshots before (
4e37285) and after; every element keyed by DOM path, 23 properties. Colour syntax is normalised, so a token that resolves to the same bytes is not a change. No element is missing after, no page's scroll width changed. 868 distinct (element, property, before → after) changes, all in the families below; the full table isscratchpad/tok-345/diff-final.md.--lh-*steps (31 values → 5; CJK display 1.2)currentColoredges followingcolor, plus card edges on--lineand the pricing/brand edges--shadow-sm/md/lg; green-tinted and inset shadows removed; cards that had none take--shadow-sm#087f5b; blues/ambers on marks, indexes, labels, step titles →--greenor ink; links/arrows/hover →--brand; blog kicker brand → green; panel text white →--on-panel; Tailwind greys/greens → tokens; non-topic post chips brand →--ink-soft(two chip styles)--space-section(home 112 → 109-112, evidence 80 → 112, security 96 → 112 at desktop; phones 51-60 → 56-64) and button/chip boxes--panel-ink), chips (sunk / brand-soft), video frame-0.01em; 0.03-0.07em small caps → 0.08em.btn44 (header 36), chips 24, pill-nav 32Inter, …stack →--font-sanscolor-mix(±3/255), button and panel gradients → solid tokens, cluster-link tint on the new greenkeep-all; chipsnowrapContrast and axe
--greenon an 8% green tint, 4.48) is fixed: the text leans 10% toward ink on a 6% tint, 5.0:1.target-sizeon two footer links at 390 (a[href$="approvals/"], the Why-ObjectOS column's seventh link), present on main since site(nav): phase 2 — Why ObjectOS top level, GitHub into Developers, Guides column, four-column footer, ruled 8-locale labels #348 and not touched here. Nothing new.Locales and viewports
Screenshots in
scratchpad/www/shots-tok-345/(174 + 64 element crops, andheader/with the bar at 1100/1366/390 light and dark for en, de, fr, zh-Hans, the drawer open at 390, and the hero at 1366/390 in en and zh-Hans after the 13px bar labels): en on all ten page types × six viewports × light/dark; zh-Hans on home/security/post/blog/pricing/cluster at 1366 and 390 light/dark; zh-Hant, ja, ko, de, es, fr home at 1366 and 390, security and blog at 390, a post at 1366 dark. No page overflows its viewport (checked on every shot). Header fit: the bar labels take the 13px step (at 14px French had 6px to spare at 1100);.barscrollWidth = clientWidth in all eight locales at 1100 and 1366, the gap between the nav and the right-hand group is 41px (fr), 54 (es), 106 (de), 135 (en) at 1100, and the logo keeps its width.Gates
pnpm content:lint— passed (399 files, 46 glossary terms).pnpm check— 0 errors, 0 warnings, 0 hints (167 files).pnpm build— passed, including the cover gates,og:imagesand the three--distlints (964 pages, 0 CJK segment breaks, 109,909 links).pnpm seo:smoke— passed (954 pages; 4 inline script digests CSP-checked, unchanged).node scripts/post-deploy-probe.mjs --base-url <local dist>— PASS 6/6.Acceptance notes
--fs-44is declared for the scale's completeness and has no consumer yet.inset 0 0 0 1pxhairline on hovered nav triggers (Header.astro) is a box-shadow that is really a border; left as is.--brand, image language, astyle:lintgate against literal values returning.🤖 Generated with Claude Code
https://claude.ai/code/session_01FeA1nwBz1ohH65dvffUGKr