Skip to content

Breadcrumb: swap Bootstrap classes for td- semantic classes - #2722

Merged
chalin merged 12 commits into
docsy:mainfrom
chalin:chalin-m24-breadcrumb-td-2026-0817
Aug 18, 2026
Merged

chalin merged 12 commits into
docsy:mainfrom
chalin:chalin-m24-breadcrumb-td-2026-0817

Conversation

@chalin

@chalin chalin commented Aug 17, 2026 •

Copy link
Copy Markdown
Collaborator
  • Contributes to Cleanup: don't hard-code styles into layouts #783; the first class-swap increment on the tests: markup, framework-class, and visual baselines for chrome partials #2719/tests: replace the framework-class template scanner with a literal-token lint #2721 harness.
  • Swaps the breadcrumb partial's classes to the td- vocabulary: breadcrumb → td-breadcrumbs__list, breadcrumb-item → td-breadcrumbs__item, and active → no class — the styling hook for the current item is now [aria-current="page"] (site CSS/JS keyed on .active inside breadcrumbs must move to the attribute).
  • Binds the Bootstrap styling by @extend (the theme's existing .td-navbar idiom), so the skin tracks the installed Bootstrap instead of drifting as a copied snapshot; simple-selector extends only, verified byte-identical under libsass and dart-sass.
  • Keys the active-item styling on aria-current="page" instead of a state class: the styling hook is the a11y annotation, so the two can't drift; the written-out state rule consumes Bootstrap's prefix-aware breadcrumb active-color custom property and carries a BS mirror: audit marker.
  • Keeps term.html's replaceRE post-processing, re-targeted: with attribute-keyed state, stripping aria-current also strips its styling; the term golden pins the coupling.
  • Clears the partial in the migration ratchet, red-first: the lint and the output net both failed before the swap and are driven green by it, with the sentinel binding proof now active.
  • Review artifacts: the markup-golden diff is pure class renames plus the state-class removal; visual goldens are untouched (all 28 golden comparisons pass unchanged in the authoritative Linux visual job).

chalin added 12 commits August 17, 2026 16:48
- Renames the breadcrumb partial's classes to the td- BEM vocabulary; SCSS maps Bootstrap's breadcrumb styling onto the new selectors, still consuming the --bs-* customization vars
- Replaces term.html's replaceRE class-string surgery with an explicit partial summary mode (same rendered shape, proven by the term golden)
- Clears the partial in the migration ratchet (red-first: lint and output net both failed before the swap); markup goldens refresh to the renamed classes; visual goldens unchanged
- Defers the partial summary-mode idea: the Page-or-dict context would change the published partial's API, out of a class-swap PR's scope
- The surgery stays class-coupled by design; the term golden pins it (a rename that forgets this caller goes red)
- Bootstrap-skin form: td- classes @extend their Bootstrap counterparts, so the styling stays by reference (tracks Bootstrap bumps, splices in at Bootstrap's cascade position) instead of a drifting vendored copy
- State classes are written out against Bootstrap's public vars: extending a generic state class (.active) would splice into every compound using it
…r class

- State styling keys on semantic attributes, not classes (decision recorded at the project chronicle): the styling hook is the a11y annotation, so the two can't drift, and an attribute-keyed skin is first-class in the Tailwind ecosystem
- Deletes the --active modifier and its emission logic; the partial already emits aria-current="page"
- term.html's replaceRE reduces to its aria strip: removing the attribute now also removes the styling
- Adds the BS-mirror marker to the written-out state rule (greppable upgrade-audit inventory)
The pattern's rationale has one home (the project record + PR body); the
file keeps only the per-rule BS-mirror citation.
- One .td-breadcrumbs block, elements and state nested BEM-style; drops the redundant descendant scoping on the list override (td- classes only ever render inside the block)
- Render-proven identical: 26/30 goldens pass, and the 4 print shots render byte-identical to the pre-rewrite HEAD (their failures are a pre-existing harness scheme leak, not this change)
…rial r2)

- Restores descendant scoping on the list overrides: @extend rewrites a consumer's .breadcrumb hook to include the td- selector, where a flat same-specificity rule loses by source order (the consolidation had silently flipped that outcome)
- Consumes the active-color var prefix-aware (--#{$prefix}...), matching the mirrored Bootstrap rule under a customized $prefix; byte-identical under the default
@chalin
chalin merged commit b89ab7f into docsy:main Aug 18, 2026
17 checks passed
@chalin
chalin deleted the chalin-m24-breadcrumb-td-2026-0817 branch August 18, 2026 12:20
@chalin chalin added this to the 0.17.0 milestone Aug 26, 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.

1 participant