Skip to content

v5.3.1: bs4-compat review fixes - #18

Merged
gmpassos merged 1 commit into
masterfrom
fix/bs4-compat-review
Oct 8, 2026
Merged

gmpassos merged 1 commit into
masterfrom
fix/bs4-compat-review

Conversation

@gmpassos

@gmpassos gmpassos commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes from the review of the Bootstrap 4 compatibility SCSS (#15), in lib/bootstrap-5/bs4-compat:

  • .accordion-flush: no doubled 2px separators (the restored item top border now skips flush accordions).
  • Accordion header (.card-header): the first header gets the item top radius (calc(var(--bs-accordion-border-radius) - var(--bs-accordion-border-width))), so its background no longer shows square corners past the rounded item; padding/background from $card-cap-padding-y/x and $card-cap-bg (cards and accordions stay consistent when themed).
  • .navbar-toggler: no focus ring only after a tap/click (:focus:not(:focus-visible)), as in Bootstrap 4; the keyboard focus keeps the Bootstrap 5 ring. Before, $navbar-toggler-focus-width: 0 removed any focus indicator.
  • $prefix: the accordion button colors follow an app $prefix (were hard-coded var(--bs-link-color)).
  • Lists indent: padding-left: revert (the browser default, 40px whatever the root font size; was 2.5rem).
  • Class aliases: Bootstrap 4 skip links (sr-only sr-only-focusable) are visible when focused: .sr-only only extends .visually-hidden (whose !important kept them hidden) without .sr-only-focusable.
  • README: the accordion header line keeps the .card-header color (as in Bootstrap 4); the compatibility targets the light Bootstrap 4 look (no color modes) and how to opt back.

Not applied: the review's "focus border color overridden" finding: in Bootstrap 5.3.8 .accordion-button:focus sets no border color ($accordion-button-focus-border-color is deprecated since 5.3.3 and unused).

Checked in an app using bs4-compat: computed styles still match its Bootstrap 4 production CSS (lists 40px; the header radius only changes transparent headers).

Tests

  • Compatibility VM tests for each fix (flush, header radius and $card-cap-*, toggler focus, app $prefix, lists revert, skip link aliases).
  • dart test -p vm: 33 passed. dart test -p chrome: 73 passed. dart analyze: clean.

🤖 Generated with Claude Code

- .accordion-flush: no doubled separators.
- Accordion header: first header top radius; $card-cap-padding-*/$card-cap-bg.
- .navbar-toggler: no focus ring only after a tap/click
  (:focus:not(:focus-visible)); keyboard focus keeps the Bootstrap 5 ring.
- Accordion button colors follow the app $prefix.
- Lists indent: padding-left: revert (browser default, 40px).
- Class aliases: sr-only sr-only-focusable skip links visible on focus.
- README: header line color, color modes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gmpassos
gmpassos merged commit a9ec122 into master Oct 8, 2026
1 check passed
@gmpassos
gmpassos deleted the fix/bs4-compat-review branch October 8, 2026 04:40
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