Repository navigation
Breadcrumb: swap Bootstrap classes for td- semantic classes - #2722
Merged
Merged
Conversation
- 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.
…(adversarial-review L1)
- 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
…covered only the ratchet copy)
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.
td-vocabulary:breadcrumb→td-breadcrumbs__list,breadcrumb-item→td-breadcrumbs__item, andactive→ no class — the styling hook for the current item is now[aria-current="page"](site CSS/JS keyed on.activeinside breadcrumbs must move to the attribute).@extend(the theme's existing.td-navbaridiom), 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.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 aBS mirror:audit marker.term.html's replaceRE post-processing, re-targeted: with attribute-keyed state, strippingaria-currentalso strips its styling; the term golden pins the coupling.visualjob).