Add spacing size variables to theme sizes#320073
Merged
Merged
Conversation
Co-authored-by: Copilot <copilot@github.com>
Contributor
There was a problem hiding this comment.
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. |
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>
alexdima
approved these changes
Jun 5, 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.
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.
Theme: Design Tokens – Spacing
spacing.size20,spacing.size100,spacing.size400, etc.) tobaseSizes.ts, each corresponding to a specific pixel value, to standardize spacing across the application.vscode-known-variables.jsonto include the new spacing CSS variables, ensuring they are recognized and linted correctly.