Skip to content

Map the color palette onto the design system's scales - #3262

Merged
enf0rc3 merged 3 commits into
mainfrom
wl/design-tokens-palette
Jul 28, 2026
Merged

Map the color palette onto the design system's scales#3262
enf0rc3 merged 3 commits into
mainfrom
wl/design-tokens-palette

Conversation

@enf0rc3

@enf0rc3 enf0rc3 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Background

We want to update the docs website to use the new design system tokens

This pr follows #3261, which added the token stylesheets.

There will be many PR's each addressing different aspects, to limit the amount of change, this first pr aims to just include the non-functional changes, (mapping existing colours to the same in the design system tokens that are 1 for 1).

Whereas the docs dark theme was hand-rolled from a different palette so we will do that separately that we would want to check is correct.

Results

The raw palette in vars.css duplicated hex literals that already exist in @octopusdeploy/design-system-tokens. Eighteen entries now reference the matching --colorScales* token.

-  --navy-700: #2e475dff;
+  --navy-700: var(--colorScalesNavy700);

--black, --white, --navy-100…700, --blue-100/200/500, --green-400/500, --red-500, --orange-400/500, --grey-500, and --blue-grey-lighter (which is navy 500 in the design system's scale).

Also removes one dead line: the dark block set --scrollbar-color: var(--navy-300), which is #a9bbcb — the same value :root already resolves to. Pre-existing dead code, found while mapping the palette.

Why only the palette

Scale tokens are theme-invariant, so this layer can move with zero visual risk.

The semantic variables above it (--color-text, --body-link-color, --code-background) resolve through this layer unchanged.

Testing

AI generated test:

Every value was verified identical to its token before the swap — 18 exact, 0 mismatched.

Then snapshotted all 886 computed custom properties plus the rendered color, background-color, border-color and font of seven elements (body, paragraph, body link, heading, nav link, code, footer), in both themes, before and after:

PASS: 886 computed properties and 7 rendered elements identical in both themes.
      (93 values changed hex casing / dropped a redundant ff alpha - same color.)

The --scrollbar-color removal was verified separately against both the post-palette state and the original baseline. Production build clean: 2,697 pages.

Left as literals

--blue-qqq, --green, --light-green, --grey, --grey-light, and the --blue-midnight/--blue-grey families have no scale equivalent. Nothing else became unused — --blue-qqq and --octo-blue-lighter are both still referenced.

🤖 Generated with Claude Code

Base automatically changed from wl/design-system-tokens-css to main July 28, 2026 20:22
enf0rc3 and others added 3 commits July 29, 2026 08:25
The raw palette in vars.css duplicated hex literals that already exist in
@octopusdeploy/design-system-tokens. Eighteen entries now reference the
matching --colorScales* token instead.

Scale tokens are theme-invariant and every value was verified identical
before the swap, so this is a no-op. Only palette entries are touched -
semantic variables (--color-text, --body-link-color and the rest) still
resolve through this layer unchanged, and the html[data-theme='dark']
block is untouched, including its --navy-200 override.

Verified by snapshotting all 886 computed custom properties plus the
rendered colour, background, border and font of seven elements, in both
themes, before and after: identical. 93 values changed hex casing or
dropped a redundant ff alpha (#2e475dff -> #2E475D), which is the same
colour.

Left alone: --blue-qqq, --green, --light-green, --grey, --grey-light and
the --blue-midnight/--blue-grey families have no scale equivalent.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
:root sets --scrollbar-color to #a9bbcb and the dark block set it to
var(--navy-300), which is the same colour, so the override never changed
anything. Pre-existing dead code, found while mapping the palette.

Verified with the same snapshot harness: 886 computed properties and seven
rendered elements identical in both themes, both against the post-palette
state and against the original baseline.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@enf0rc3
enf0rc3 force-pushed the wl/design-tokens-palette branch from b46c8bc to 6581e98 Compare July 28, 2026 20:26
@enf0rc3 enf0rc3 changed the title Map the colour palette onto the design system's scales Map the color palette onto the design system's scales Jul 28, 2026
@team-marketing-branch-protections

Copy link
Copy Markdown

Pull request environment is available at https://stoctodocspr3262.z22.web.core.windows.net.

You can view the ephemeral environment status in Octopus Deploy.

This environment will be automatically deprovisioned when the pull request is closed, or after 7 days of inactivity.

Comment thread public/docs/css/vars.css
--page-inline-margin: 2rem;

/* Theme colors */
--black: #000000ff;

@enf0rc3 enf0rc3 Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

These changes map to the globals css you can view here:

https://github.com/OctopusDeploy/OctopusDeploy/blob/main/frontend/packages/design-system-tokens/src/generated/globals.css

(they have the added ending FF) though

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

FF represents the alpha channel, it just means the colour is completely solid

@borland borland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Staging site looks good, approved

@enf0rc3
enf0rc3 merged commit 3964829 into main Jul 28, 2026
7 checks passed
@enf0rc3
enf0rc3 deleted the wl/design-tokens-palette branch July 28, 2026 21:24
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.

4 participants