Problem/Motivation
The default_admin theme (the Gin contrib theme brought into core) shipped with several overlapping CSS custom-property systems inherited from its Seven → Claro → Gin lineage: a Claro layer (--color-*, --space-*, --font-size-*, --input-*, …) and a Gin layer (--gin-*) that cross-referenced each other. Many tokens were duplicated with diverging values, a large share were dead, dark mode was driven by class-based overrides on only part of the system, and component stylesheets reached straight into raw primitive values.
The goal is a single, documented, canonical token API for the theme (and for contrib that builds on it), with first-class light/dark support.
Proposed resolution
Consolidate everything into one --admin-* namespace, organised in three tiers:
- Primitives — the raw palette (gray/blue/red ramps) and base scales. Not intended for use in components.
- Semantic tokens — the public API components consume: text, surfaces/backgrounds, borders, status families, link/primary, focus, etc.
- Component tokens — per-component values, seeded from the semantic layer.
Mode-aware tokens are expressed as a single light-dark() declaration driven by the color-scheme property, replacing the previous class-based dark-mode override blocks. The accent-color system continues to drive the --admin-color-primary* tokens.
What changed
- Split the monolithic variables file into category files under
css/_variables/(color, color-accent, spacing, typography, components, misc). - Color: consolidated the Claro and Gin color layers into one
--admin-color-*system; moved dark mode ontolight-dark(); composed the semantic layer from the primitive ramps where they align. - Spacing: one canonical spacing scale plus a density-aware scale tied to the layout-density setting; layout dimensions namespaced to avoid collision with core navigation tokens.
- Radius, typography, motion, icon sizes and misc tokens migrated to
--admin-*, merging the duplicate Claro/Gin pairs. - Routed component stylesheets off raw primitives and onto the semantic tokens.
- Fixed a class of dark-mode bugs where a fixed white was used for surfaces that should adapt.
- Pruned dead custom properties (keeping those that are live cross-module contracts).
The migration was kept value-preserving wherever practical, so the visual output is unchanged apart from a small number of deliberate, signed-off adjustments. The legacy --gin-* custom-property surface has been removed.
Remaining tasks
- Scope the component-level tokens to their component selectors rather than the global root (follow-up).
- Remove the remaining
gin-prefixes from class and attribute names (separate task; also touches JS and Twig). - Accessibility pass on the consolidated tokens (e.g. contrast review of a couple of static link/text colors in dark mode).
Notes
- Source of truth for the token definitions:
core/themes/default_admin/css/_variables/. Edit the*.pcss.csssources, never the compiled*.css. - This was accomplished with Claude code and I both doing planning, Claude doing the grunt-work, and me doing testing, cleaning up, etc.
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | admin-theme-article-fields-button-delete-after.png | 245.67 KB | dharizza |
| #14 | admin-theme-article-fields-button-delete-before.png | 252.38 KB | dharizza |
| #14 | admin-theme-article-fields-after.png | 505.12 KB | dharizza |
| #14 | admin-theme-article-fields-before.png | 511.78 KB | dharizza |
| #11 | Screenshot 2026-06-17 at 1.02.47 PM.png | 242.13 KB | bernardm28 |
Issue fork drupal-3599680
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3599680-consolidate-merge-and
changes, plain diff MR !16090
Comments
Comment #2
mherchelComment #3
mherchelComment #5
godotislateComment #6
mherchelThis is in a good place. In fact, way better place (although not perfect). I think this is good to make the theme beta.
Comment #7
mherchelComment #8
mherchelComment #9
mherchelNote that this was accomplished with Claude code and I both doing planning, Claude doing the grunt-work, and me doing testing, cleaning up, etc.
Comment #10
jurgenhaasI went through almost all pages and couldn't find any regressions. Looks like another great job.
Comment #11
bernardm28 commentedI just looked into it and not only does it seem to work as well as before, but it solve some small bugs.
For example on:
/admin/structure/menu/link/system.admin_structure/edit?destination=/admin/structure/menu/manage/admin
Before
After
All that to say this looks ready to go.
Comment #12
mherchelYeah, because of the rush of this (to get into 11.4 as beta), I fixed a few dark mode things.
The fix above was a CSS specificity fix, although the selectors and styles for the toggles are ripe for refactoring.
Comment #13
mherchelComment #14
dharizza commentedHi team,
I want to note I do see a couple of differences between this branch and main, nothing major but there's things like this:
In this case the icons from the sidebar look bolder than in main:
Before:

After:

Another case related to the buttons, here the "Delete" button shows the text in blue instead of red.

Before:
After:

Comment #15
mherchelGreat catches @dharizza!
Just pushed the fixes. Note that the action link fix is a change to the libraries.yml file. So when testing, be sure to clear the cache.
Comment #16
dharizza commentedPerfect! This fixed it! I think in main there was a regression in terms of padding and tabs border but it is now looking good in this branch (just as in the latest version of Gin). Thanks Mike!
Comment #22
lauriiiBesides the small nit that I pushed as a commit, this looks solid!