Skip to content

feat(tokens): opt-in colour ladders and a semantic token layer - #120

Merged
drewstone merged 1 commit into
mainfrom
feat/ladders
Sep 24, 2026
Merged

drewstone merged 1 commit into
mainfrom
feat/ladders

Conversation

@drewstone

Copy link
Copy Markdown
Contributor

The colour system from the Tangle Agents redesign, at its source.
Builder (agents.tangle.tools) already ships byte-identical copies of these two files ahead of this release (tangle-network/agent-builder#438); once Builder installs a brand with them, it imports these and deletes its copies.

What changes

  • styles/ladders.css: 12 ramps × 12 steps, light and dark, from Radix Colors 3.0.0. Mauve is the neutral, iris the brand, green/amber/red/blue carry status, and plum, orange, grass, bronze, crimson and olive are domain ramps. Role aliases (--gray-*, --accent-*, --success-*, --warning-*, --danger-*, --info-*) and [data-domain] → --domain-1..12.
  • styles/system.css: every tokens.css family (hsl, md3, depth, bg, text, border, surface, status, btn, sidebar) mapped to a ladder step, plus semantic tokens (--bg-page, --line, --fg-muted, --accent-text, --ink), role radii, type roles, motion and a three-level shadow scale.
  • scripts/gen-ladders.mjs + radix-ramps.json generate both files (pnpm --filter @tangle-network/brand gen:ladders).
  • Package exports for both files, a README section and a minor changeset.

Why opt in, not a remap of tokens.css
system.css turns light pages white and changes every token an app reads. Importing it is a per-app decision, so no other Tangle app changes when this releases.

Contrast, measured in the browser on Builder

  • Light status chips use step 12 text: step 11 on step 3 is 4.21–4.25:1.
  • --accent-text (iris 11): 6.07:1 on white, 8.33:1 on dark step 2.
  • --line-field (mauve 9): 3.30:1 on white, 3.45:1 on dark step 2.
  • --domain-bubble (light step 11): 4.51–6.07:1 with white text across the nine domain ramps.

Checked: pnpm test (374 passed), pnpm --filter @tangle-network/brand build, and the generator output diffed byte-for-byte against Builder's shipped copies.

- styles/ladders.css: 12 ramps x 12 steps, light and dark, from Radix Colors
  3.0.0, with role aliases and a per-domain ramp under [data-domain].
- styles/system.css: every tokens.css family mapped to a ladder step, plus
  semantic tokens, role radii, type roles, motion and three shadow levels.
- scripts/gen-ladders.mjs and radix-ramps.json generate both files, so an app
  that ships ahead of a release keeps an identical copy.

Opt in: nothing changes for an app that does not import the two files.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Sep 24, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 74a994d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@tangle-network/brand Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@tangletools tangletools left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Auto-approved drewstone PR — 74a994db

This PR was opened by the trusted drewstone account.
No automated review runs on this PR. This approval rests on the rule above alone.

tangletools · auto-approval · reason: drewstone_author · 2026-09-24T02:14:28Z

@drewstone
drewstone merged commit 1eff8ab into main Sep 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants