Skip to content

Remove table, form text and navbar toggler tokens that no rule reads - #43223

Merged
julien-deramond merged 1 commit into
mainfrom
v6-jd-remove-unread-tokens
Oct 28, 2026
Merged

julien-deramond merged 1 commit into
mainfrom
v6-jd-remove-unread-tokens

Conversation

@julien-deramond

Copy link
Copy Markdown
Member

Spotted in julien-deramond/bootstrap-test-playground#125

Some token maps declare tokens that no rule reads, so setting them changes nothing. These are leftovers from v6 refactors that moved the value somewhere else, so this removes them. No rendered value changes. The removed tokens are --table-striped-bg, --table-active-bg, --table-hover-bg, --form-text-margin-top, and the six --navbar-toggler-* tokens for width, padding, font size, border color and border radius, with the dark variant's border color.

The table tokens went unread in #41789. The striped, active and hover rules now mix their color on each cell, from --theme-fg when a .theme-* class sets it. A token declared on .table can't see a --theme-fg set on a row, so reading these three again would take the tint off themed rows. The *-bg-factor tokens are the ones to set.

The navbar toggler tokens went unread in #42048, which made the toggler a .btn-icon. Its size, padding, border and radius now come from the button tokens, and only its transition and icon tokens are read. That PR read --navbar-toggler-width at first, then commented the line out and deleted it, and the token stayed behind.

The form text margin was commented out in #41983, and the migration guide says the parent .form-field grid gap gives the spacing. The commented-out line goes with the token.

The "How do the variants and accented tables work?" section of tables.mdx named the removed table tokens and still described the v5 variants. It now says the variants are the .theme-* classes, quotes the current box-shadow with its --bs-theme-bg-subtle fallback, and names the factor tokens. The commented-out table-variants-loop example and the --table-bg-scale line under "Customizing" are gone, since neither exists in v6.

The Sass output loses only those custom property declarations. PostCSS adds the bs- prefix after this step, so dist/ shows the same lines as --bs-…:

@@ -915,13 +915,10 @@
     --table-group-separator-color: currentcolor;
     --table-striped-color: var(--table-color);
     --table-striped-bg-factor: 5%;
-    --table-striped-bg: color-mix(in srgb, var(--table-color) var(--table-striped-bg-factor), transparent);
     --table-active-color: var(--table-color);
     --table-active-bg-factor: 10%;
-    --table-active-bg: color-mix(in srgb, var(--table-color) var(--table-active-bg-factor), transparent);
     --table-hover-color: var(--table-color);
     --table-hover-bg-factor: 7.5%;
-    --table-hover-bg: color-mix(in srgb, var(--table-color) var(--table-hover-bg-factor), transparent);
     --table-color-type: initial;
     --table-bg-type: initial;
     --table-color-state: initial;
@@ -3271,7 +3268,6 @@
 }
 @layer forms {
   .form-text {
-    --form-text-margin-top: 0.25rem;
     --form-text-font-size: var(--font-size-sm);
     --form-text-color: var(--fg-2);
     font-size: var(--form-text-font-size);
@@ -7778,12 +7774,6 @@
     --navbar-brand-color: var(--fg-body);
     --navbar-brand-hover-color: var(--fg-body);
     --navbar-nav-link-padding-x: 0.75rem;
-    --navbar-toggler-width: 2rem;
-    --navbar-toggler-padding-y: 0.25rem;
-    --navbar-toggler-padding-x: 0.75rem;
-    --navbar-toggler-font-size: var(--font-size-lg);
-    --navbar-toggler-border-color: color-mix(in oklch, var(--fg-body) 15%, transparent);
-    --navbar-toggler-border-radius: var(--radius-5);
     --navbar-toggler-transition: box-shadow 0.15s ease-in-out;
     --navbar-toggler-icon-size: 1.25rem;
     --navbar-toggler-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath stroke='black' stroke-linecap='round' stroke-width='1' d='M1 3.5h14M1 8h14M1 12.5h14'/%3e%3c/svg%3e");
@@ -8165,7 +8155,6 @@
     --navbar-active-color: var(--white);
     --navbar-brand-color: var(--white);
     --navbar-brand-hover-color: var(--white);
-    --navbar-toggler-border-color: color-mix(in oklch, var(--white) 10%, transparent);
   }
 }
 .drawer, .\32 xl\:drawer, .xl\:drawer, .lg\:drawer, .md\:drawer, .sm\:drawer {

Three other unread tokens stay. --check-active-bg and --check-active-border-color, with the --control-active-* root tokens they default to, came in #42113 for a checkbox :active state that no rule draws yet. --menu-spacer is the gap static menus used before the Floating UI migration, and no rule positions a display: 'static' menu now. Both look like something to wire, not to remove.

A search of scss/, js/src/, site/ and build/ found no other use of a removed token. npm run css-lint and npm run css-test pass. I didn't build the docs.

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@julien-deramond julien-deramond added docs Documentation site and its content css Sass sources or compiled CSS v6 v6, the main branch labels Oct 28, 2026
@julien-deramond
julien-deramond requested a review from a team as a code owner October 28, 2026 20:48
@github-project-automation github-project-automation Bot moved this to Inbox in v6.0.0 Oct 28, 2026
@julien-deramond julien-deramond added this to the v6.0.0-alpha.2 milestone Oct 28, 2026
@julien-deramond
julien-deramond merged commit 0cc9057 into main Oct 28, 2026
14 checks passed
@julien-deramond
julien-deramond deleted the v6-jd-remove-unread-tokens branch October 28, 2026 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

css Sass sources or compiled CSS docs Documentation site and its content v6 v6, the main branch

Projects

Status: Inbox
Status: Inbox

Development

Successfully merging this pull request may close these issues.

1 participant