Skip to content

Add spacing size variables to theme sizes#320073

Merged
mrleemurray merged 3 commits into
mainfrom
mrleemurray/direct-green-mongoose
Jun 5, 2026
Merged

Add spacing size variables to theme sizes#320073
mrleemurray merged 3 commits into
mainfrom
mrleemurray/direct-green-mongoose

Conversation

@mrleemurray
Copy link
Copy Markdown
Contributor

@mrleemurray mrleemurray commented Jun 5, 2026

This pull request introduces a new set of standardized spacing tokens to the design system, making it easier to apply consistent spacing throughout the codebase. These tokens represent a fixed ramp of spacing values, each mapped to a specific pixel size, and are now available for use in padding, margins, and gaps.

image

Theme: Design Tokens – Spacing

  • Added new spacing tokens (e.g., spacing.size20, spacing.size100, spacing.size400, etc.) to baseSizes.ts, each corresponding to a specific pixel value, to standardize spacing across the application.
  • Updated vscode-known-variables.json to include the new spacing CSS variables, ensuring they are recognized and linted correctly.

Co-authored-by: Copilot <copilot@github.com>
Copilot AI review requested due to automatic review settings June 5, 2026 10:32
@mrleemurray mrleemurray enabled auto-merge (squash) June 5, 2026 10:32
@mrleemurray mrleemurray self-assigned this Jun 5, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR extends VS Code’s theme size registry with a standardized spacing ramp, making spacing values available as first-class design tokens (and corresponding --vscode-* CSS variables) for consistent padding/margins/gaps across the UI.

Changes:

  • Added spacing.size* size contributions (including a fixed spacing ramp) to the theme sizes registry.
  • Added the corresponding --vscode-spacing-* entries to the stylelint known-variables list so CSS usage is recognized/linted.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/vs/platform/theme/common/sizes/baseSizes.ts Registers the new spacing size tokens (ramp) via registerSize, including localized descriptions.
build/lib/stylelint/vscode-known-variables.json Adds the generated CSS variable names for the new spacing tokens to the stylelint allowlist.

Comment thread src/vs/platform/theme/common/sizes/baseSizes.ts Outdated
Comment thread build/lib/stylelint/vscode-known-variables.json Outdated
mrleemurray and others added 2 commits June 5, 2026 11:41
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@mrleemurray mrleemurray merged commit d97df0a into main Jun 5, 2026
25 checks passed
@mrleemurray mrleemurray deleted the mrleemurray/direct-green-mongoose branch June 5, 2026 11:11
@vs-code-engineering vs-code-engineering Bot added this to the 1.124.0 milestone Jun 5, 2026
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.

3 participants