Add top-level highlights before the detailed migration notes. Link
the main changes to their related guides and component docs so
readers can find the upgrade steps.
* Prose: space blockquote and details children, keep media aspect ratio
Reboot removes margins from blockquote children, so paragraphs in a quote touch. Details had the same problem. Images with width and height attributes became distorted after max-width shrank them. Block-level media that are direct children stretched across the flex column. Also remove a duplicate img max-width rule.
* fix(prose): honor font weights and preserve excluded content
Custom font weights did not reach prose headings or description terms.
Use the shared weight tokens. Keep child spacing outside not-prose
content so an excluded block retains its own layout.
* docs(prose): show the elements covered by prose styles
The example used one-paragraph quotes and utility-styled placeholders,
so it did not show the spacing and media fixes. Add a disclosure,
plain images, heading code, and excluded content to show those rules.
* docs(prose): give the mobile example more room
The bordered example narrowed the text on phones. Extend its top and
bottom borders to the viewport edges, remove the side borders, and
add vertical padding. Keep its content aligned with the page gutters.
* docs(prose): replace the retired themes image
Use the existing Bootstrap and Vite illustration to show how images
keep their aspect ratio in Prose.
* feat(grid): prototype flexbox gutters with native gap
Size numbered columns and offsets against a gap-aware track width so
mixed spans fit the row without column padding or negative margins.
Keep standalone column widths and responsive row-column overrides.
Document the gutter migration and add real-browser layout coverage for
mixed spans, offsets, wrapping, nesting, RTL, and custom column counts.
* docs: highlight responsive grid columns in examples
Match column classes anywhere in the class attribute so responsive-only
columns receive the same background, border, and spacing as other grid
examples. Include the override locally while BUI carries the shared fix.
* docs: consolidate grid example highlighting
Keep the grid example override in the existing docs stylesheet and
include responsive equal-width columns such as sm:col. Remove the extra
stylesheet and retain the same styling for reordered column classes.
* ci: update bundle limits for gap-based grid sizing
Set the four affected CSS limits from measured gzip sizes. Round
limits up to the next 0.25 kB, as the bundlewatch helper does.
* test(grid): account for scrollbars in responsive layouts
Linux browsers reserve space for the vertical scrollbar. Use the
measured row width for expected column widths and offsets.
* fix(grid): preserve padded column widths and explain gap migration
Grid-only builds could wrap padded columns without Reboot. Include
padding and borders in column widths, and check both grid entry
points. Update migration and layout docs for native gaps, nested
rows, column breaks, and the gutter variables used by widths.
* docs(grid): remove container padding from previews
Native grid gaps no longer cancel container padding. Remove the
container classes from grid previews so the columns fill each
example. Keep the classes in the code and StackBlitz examples.
* docs(grid): remove containers from example snippets
Keep the grid previews, code snippets, and StackBlitz markup the
same. Remove container classes from the example source and remove
the preview-only filter. Explain when to add a parent container.
* docs(grid): keep example alignment in docs styles
Remove the outer wrappers and text-center classes from grid
examples. Center the labels with the component example styles.
Keep the code focused on rows, columns, and gaps.
* docs(grid): restore nested snippet indentation
MDX removes two leading spaces from the template lines. Add that
level back in the source so columns and their content remain
indented in the rendered snippets.
Themed chip links and buttons showed the primary focus ring. Use
the chip theme for the ring and for its dismiss button. Keep the
global focus color when no theme applies.
Show themed interactive chips in the docs. Cover direct and
inherited themes, active chips, and dismiss buttons in both modes.
* fix(combobox): support native form values and events
Multiple selections now submit one field per value. Commas stay in the
value, and an empty multiple selection submits no entries. Reuse an
explicit hidden input without removing application-owned fields.
Keep a stable field for input and change listeners. Sync fields before
notifications, restore initial selections on reset, and follow disabled
state and form ownership. Document the update and disposal contracts.
Forward Menu lifecycle events after its transitions. Keep native search
editing keys and cover the sticky search padding with logical CSS.
* feat(combobox): combine editable selection and chip entry
Search and select values from one editable field. Multiple selections
render as removable chips, and explicit free entry supports tags. Keep
query text separate from committed values and preserve native form data.
Use the existing Menu for positioning and lifecycle. Keep focus in the
editor while suggestions are highlighted. Preserve chip nodes, caret
positions, reset behavior, and input-method text during reconciliation.
Retire the separate Chips plugin and chip-input control. Keep static
chip styles and button-triggered Combobox markup. Document the alpha 2
markup, token, method, and event migration.
* fix(combobox): match chip fields to the default input height
Multiple values should fit the same row height as a normal input.
Use shared input spacing and typography, with smaller contextual chips.
Let the field grow when its values wrap.
Replace the text dismiss glyph with the SVG from the chip documentation.
Keep the named removal button and existing chip interaction behavior.
* fix(combobox): separate chip icon size from its hit area
Render the dismiss icon at 12px inside a 24px removal button. Move chips
closer to the field's inline start while keeping normal text padding
for an empty editor. Use logical spacing so the inset follows RTL.
* fix(combobox): tighten chip dismiss spacing
Use negative inline margins to bring the dismiss button closer to the
label and chip edge. Keep its 24px hit area and 12px SVG artwork.
* fix(combobox): derive chip corners from the field radius
Use a nested chip radius based on the wrapping field's radius, border,
and inset. Clamp the result at zero so square fields keep square chips.
* fix(combobox): balance chip insets within the field
Match the field's inline padding to its vertical padding when chips
are present. Derive chip corners from that inset and pull the dismiss
button's end margin in another 2px without reducing its hit area.
* fix(combobox): soften chip corners within balanced fields
Use half the field radius for chips so equal input padding does not
leave their corners nearly square. Keep square fields square.
* fix(combobox): restore chip selection and keyboard behavior
Highlight chips with the filled active state when users navigate or
select them. Restore modifier clicks, anchored ranges, select-all, and
deletion of highlighted chips. Keep native query editing and RTL keys.
Keep chip highlights separate from committed values. Report UI selection
through select.bs.combobox and restore the chip selection methods on
Combobox. Bulk removal honors each cancellation and emits one value
change before recovering focus.
Document the restored interaction and alpha migration. Cover range
anchors, duplicate values, disabled chips, reset, and disposal.
* fix(combobox): select chips on every focus path
Tabbing to a chip's remove button or focusing a chip directly should
show its primary selected state. Apply that highlight without changing
committed values, and dismiss the suggestion popup.
Guard focus controlled by range navigation and modifier clicks so it
does not collapse or undo the user's chip selection.
* fix(combobox): suppress inner chip focus outlines
Keep the filled selected chip and the wrapping field's focus ring as
focus indicators. Suppress the nested outlines on chips and their
remove buttons during keyboard navigation.
* fix(combobox): guard form and editor edge cases
Selection callbacks can change or dispose the component before an outer
operation completes. Stop stale selection and focus work after those
callbacks, and keep pending popup sizing from changing disposed markup.
Handle native composition events through the shared event system. Keep
unfinished input out of blur commits, reconcile completed composition,
and preserve focus after the editor loses it. Let the IME handle its
keys in both Combobox and Menu.
Follow external reset forms without a backing field, omit disabled
single options, and clear references to removed or disabled suggestions.
Add regressions and clarify the synchronous form update requirement.
* docs(chips): move standalone chips to Components
Chips can stand alone or appear within a form component. Place their
docs in Components and describe that wider use. Keep the old Forms URL
as a redirect, and update navigation and cross-links.
* fix(chips): limit hover feedback to interactive chips
Static chips change color and show a pointer cursor on hover, even
when they have no action. Keep static chips neutral and apply hover
feedback to links, buttons, and Combobox chips. A dismiss button keeps
its own hover state without changing the whole chip.
Add interactive examples and correct the documented CSS layer. Allow
for the extra selectors in the unminified CSS bundle budget.
* docs(combobox): lead with editable examples
Show search and selection in the input from the first example. Use
inputs for the shared examples and group the button variants together.
Use the editable markup in the form and setup guidance too.
* docs(combobox): restore the overview feature list
Describe editable inputs and button toggles in the original overview.
Include chips, free entry, form submission, and selection events.
* docs(combobox): preserve example indentation
Match the form field examples by adding the source indentation that
MDX strips. Record the convention in the docs guidance.
* fix(combobox): focus search directly when opening
Clicking a searchable combobox moved focus to the trigger before
the opening animation moved it to search.
Focus search as soon as the menu opens. Keep the trigger in the
tab order and return focus to it on Escape.
* docs(combobox): style the Language example label
* ci(combobox): fix bundle budgets and spelling
Round the three JavaScript bundle limits up to the next quarter
kilobyte to account for the search focus changes. Reword the docs
indentation rule so it passes the spelling check.
* fix(combobox): preserve resets and expose selection state
A canceled second reset could discard a completed reset. Keep each
pending reset until its own callback runs. Give button-mode options
listbox roles, handle Escape on the toggle, and restore chip focus
rings. Keep long values inside the field and use shared state tokens.
* fix(combobox): fit chips to the shared control size
Compact controls were 30px tall, but their fixed-height chips made
the multiple-selection field 34px tall. Derive chip and dismiss-button
heights from the space left by the control padding and borders. Check
compact, default, and spacious controls in the browser.
* docs(combobox): redirect chip input readers to the merged component
The former chip input page now points to Combobox. Explain the
consolidation at the top of that page and link the migration steps
for existing chip inputs.
* chore(combobox): account for the current main bundle size
The rebased build includes the merged Range and hash-link fixes.
Raise the three affected limits to the next standard budget step.
* feat(js): open collapses and tabs from URL hash links
Visiting a page with a fragment left opted-in collapses and tabs
closed, so deep links could not reveal their content.
Add `data-bs-hash` on the target. On load and hashchange, scroll
the trigger, show the panel, then scroll the target into view.
Fixes#34299
* fix(hash): keep fragment scrolling current after page load
A late import missed the initial fragment. An earlier opening could
also scroll after the user chose another fragment. Handle loaded
pages and ignore stale scroll callbacks. Wait for component opening
without leaving shown-event listeners after canceled events.
* fix(range): refresh decorations and honor form resets
Let applications refresh bubble configuration and datalist ticks with
update() while preserving constructor option priority. Keep drag events
on the value-only update path.
Refresh decorations after native form reset and release reset handlers
and pending work on disposal. Use a decorative div for the bubble so
WebKit cannot reset its inner markup as an output control.
Align the fill, bubble, and ticks with the native thumb in RTL layouts.
* docs(range): note accessible tick preset considerations
Record clickable labels as an optional future direction for sparse
presets. Require real buttons, keyboard activation, visible focus, and
usable targets while keeping ordinary ticks decorative by default.
* chore(range): account for the added bundle size
The Range refresh and reset fixes exceed three JavaScript bundle limits
by small amounts. Raise only those limits to the next standard quarter
kilobyte using the repository's bundlewatch helper.
* fix(range): honor shared radius and shadow tokens
Custom pill radii did not reach the range track or thumb. The track
also read a shadow token with no default. Use the shared tokens and
state the required prefix step for Sass builds.
* ci: publish npm releases with trusted publishing
Publish GitHub releases through npm OIDC authentication. Check the
package version against the release tag and build the package before
publishing. Send prereleases to next and stable releases to latest.
* ci: require maintainer approval for npm releases
Stage release packages for npm approval with two-factor authentication.
Install npm 12.2.1 so the workflow supports staged publishing without
relying on the npm version bundled with Node.js.
* ci: use npm 11 for release builds
npm 12 rejects the version_short config passed by the v5 build scripts.
Use npm 11.21.1 to support those builds and staged publishing.
* Keep unpadded accordion contents inside rounded corners
* test(accordion): cover panel corner edge cases
Exercise the reported non-flush list, logical RTL corners, and custom
border sizes. Add open menus with default and body containers to catch
clipping regressions from the panel overflow rule.
---------
Co-authored-by: Mark Otto <markdotto@gmail.com>
Document the browser floor, dialog behavior, and CSS customization
changes since alpha 1 so existing adopters can review their overrides.
Keep the v5.4 modal size mapping and list the new dialog size separately.
- Keep all nav items visible when they fit without the More toggle.
- Count gaps only between visible items, including the toggle when needed.
- Cover exact-fit and toggle-width boundaries.
Fixes#43214
- Keep an open dialog unchanged when an internal trigger targets that same dialog.
- Preserve link default prevention and document explicit dismissal.
- Cover self-targeted buttons and links.
Fixes#43072
- Preserve title and content attributes as written, including decimal and empty strings.
- Cover rendered Popover content, option precedence, and the text/HTML security boundary.
Refs #43090. The v6 fix is complete; the v5 backport remains tracked in that issue.
- Register distinct component types on the same element and use explicit keys for overlay cleanup.
- Cover component coexistence, disposal, and Combobox/Menu reuse.
- Add alpha 2 migration notes and document component lookup and ownership.
Closes#42965
The token was declared in $switch-tokens but never read, so the thumb kept
--switch-indicator-bg when checked. Use it in the checked ::before rule,
keeping --theme-contrast first so themed switches are unchanged.
Fixes#43143
* Restore the close button dark variant
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Apply suggestion from @julien-deramond
* Docs: show the close button dark variant on a dark example
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Apply suggestion from @julien-deramond
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The sheet docs promise support for any placement, which suggests that
start and end sheets stay against the side of the viewport.
Describe the mobile bottom-sheet use case and its centered position
on larger screens. Point readers to regular drawers for side panels.
* fix(dialog): compensate scrollbar offsets with JavaScript
Pages with classic scrollbars reserve a permanent blank gutter even
when they do not scroll. Removing that gutter alone makes the page
shift when a dialog opens.
Measure root and full-width fixed-element expansion when locking
scroll. Restore the original inline styles after the last owner
closes. Share this lock between Dialog and Drawer, including native
close and disposal paths.
* chore(bundlewatch): account for the shared scroll lock
The new Dialog and Drawer scroll lock increases three JavaScript
bundles beyond their size limits. Raise only those limits to the next
quarter-kilobyte boundary using the existing budget update script.
* docs: raise the v6 browser support floor
Set the browser targets for the rest of the v6 release line and document
which platform features they make safe to use. Remove the stale unreleased
versions query and clarify which newer features remain unavailable.
* docs: address browser support review feedback
Keep the minimum-version table in two columns on small screens.
Clarify that the higher browser floors expand support for features
already used as progressive enhancements in alpha 1.
* docs(alert): improve content examples
Explain the alert flex layout and show how to create simple and complex
content layouts with utilities and markup.
* docs(alert): stretch vertical content
Stretch the vertical alert content across the available width and use
valid JSX syntax for the horizontal rule.
Temporal input indicators stay next to their value when the input grows.
Position the native indicator against the input so it stays at the inline
end of the control.
The full non-bundle build uses bare module specifiers for Floating UI
and Vanilla Calendar Pro. Explain that browsers need an import map for
both dependencies, and use the bundle in the direct-loading example.
Pages with long closed dialogs retain their dimensions and gain extra
blank space because Bootstrap overrides the browser's hidden display.
Use display only while the dialog has its open attribute. Keep the
existing exit transition active until JavaScript removes that attribute,
and add starting styles to preserve entry transitions.
* New breadcrumb variable for divider spacing
This change adds a new breadcrum divider variable for cases when we need the breadcrumb to be flush with the content, but also control the spacing for the breadcrumb divider.
The old way was calculating the margin inline based on the divider item's padding-x and dividing it by a value (4), but if padding-x was set to 0, there was no way to customize this without applying an utility class over the divider element itself.
* Update scss/_breadcrumb.scss
Co-authored-by: Mark Otto <markdotto@gmail.com>
* Added alert component custom border width support
* Remove alert border width variable
This was supposed to be for a different PR.
* Update scss/_breadcrumb.scss
---------
Co-authored-by: Mark Otto <markdotto@gmail.com>
* chore(release): prepare Bootstrap 6 alpha
Update release guidance and version tooling for the first Bootstrap 6
alpha from main. Remove stale v6-dev workflow references, pin the
prerelease in agent skills, and make future version updates reliable.
* chore(dist): rebuild for v6.0.0-alpha.1
* docs: use the local logo in the README
Load the tracked Bootstrap logo instead of the deployed documentation
asset, and remove the obsolete fixed height.
* fix(docs): keep the README logo path spellcheckable
Use the literal version placeholder in the local logo path so cspell does
not parse the percent-encoded bracket as an unknown word.
* fix(docs): make site copy cross-platform
Running `npm run docs-build` on Windows fails after Astro finishes
because the build command relies on Unix `rm` and `cp` utilities.
Move the cleanup and recursive copy into a Node script so the docs build
uses the same filesystem operations on every supported platform.
* fix(docs): make Astro cleanup cross-platform
Running the Astro cleanup task on Windows fails because it invokes the
Unix-only `rm` command.
Remove generated Astro directories with the Node.js filesystem API so
the task works consistently across supported platforms.
The asynchronously loaded desktop ad shifts the centered masthead content
when it appears.
Wrap the ad in a stable container and reserve its minimum height at medium
viewports and above so the masthead keeps its initial position.
Docs type errors could accumulate unnoticed because the main lint task did
not run Astro's checker. Add it to the lint suite and correct the existing
component, route, and third-party integration types.
Example pages without a trailing slash resolved local CSS and JavaScript
against the examples root. Resolve relative assets from the canonical
example directory so both URL forms load the same files.
* refactor(docs): consume shared Astro UI primitives
Use the local docs UI package for head metadata, theme controls, search
markup, and Pagefind behavior while retaining Bootstrap-specific layouts,
content readers, versioning, examples, and build integration.
* refactor(docs): delegate the shared shell to docs UI
Replace local navigation, search, theme, layout, footer, ads, and
Table of Contents copies with thin adapters to @twbs/docs-ui.
Keep documentation-only scripts, sidebars, content readers, and examples
local while deduplicating Bootstrap's browser module and shared Sass.
* refactor(docs): consume shared code examples
Delegate Code, Example, ResizableExample, highlighting, clipboard
behavior, placeholder parsing, and example styles to @twbs/docs-ui.
Keep only thin Bootstrap configuration adapters for repository links and
config token replacement.
* refactor(docs): consume the published BUI package
Resolve the shared shell, examples, browser helpers, and styles from
@twbs/bui 0.1.0 instead of a sibling checkout. Configure Bootstrap's Sass
source for the package peer and keep the calendar peer available to docs
builds.
Use BUI's canonical footer configuration so project links stay aligned
across Bootstrap sites.
* fix(docs): refine mobile docs actions
Give page introductions more room below the mobile navbar and use compact
text for the table-of-contents control. Present install downloads as simple
accent links so they fit their table cells cleanly.
* fix(docs): update BUI for self-hosted installs
Bootstrap's root package cannot satisfy a required peer of its docs UI,
so clean installs tried to fetch the unpublished Bootstrap alpha.
Update to BUI 0.1.1, which keeps the compatibility range while making
Bootstrap optional for the self-hosted documentation build.
The range fill, thumb, and thumb hover ring read --primary-base
directly, so .theme-* had no effect on .form-range, unlike .check and
.switch. Fall back from --theme-bg / --theme-focus-ring to primary in
the range tokens, and document the theme colors.
The divider is a `::before` positioned with the physical `left`, so in RTL
it lands on the outer edge of the second button instead of between the two
buttons. Use `inset-inline-start` so it follows the writing direction.
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
* feat(tables): add `.table-card` for rounded tables
People often nest tables in cards to get a bordered, rounded look.
That creates padding, margin, and double-border edge cases.
Add a `.table-card` wrapper that clips and rounds the table itself,
and document the utilities-only equivalent.
Closes#39774
* fix(tables): silence stylelint on `.table-card` cell selectors
The last-row border reset needs the same deep universal cell path as
`.table`, plus a wrapper and optional responsive nest. That trips the
compound, universal, and combinator limits.
* chore(css): increase table-card bundle limit
* fix(forms): always float labels on date and time inputs
Date, time, datetime-local, month, and week inputs do not support
placeholders like text fields, so floating labels looked filled even
when empty and padding stayed inconsistent.
Keep those controls (and selects) in the floated label and padding
state, and document the behavior.
Fixes#39257
* fix(forms): mute date/time separators and dedupe docs
Date and time inputs show hard `/` and `:` dividers that fight the
control’s muted placeholder look in WebKit and Blink.
Color those separators with the control placeholder token, and fold the
duplicate date and time docs section into one.
* feat(forms): add always-floating labels for v6
Port the always-visible floating label opt-in from #36155 to the v6
token and label-first :has() model.
Show placeholders on focus by default, and add .form-floating-always
to keep the label floated with a visible placeholder.
Supersedes #36155
* fix(forms): pass floating label CI checks
Use lint-compatible date, time, and select selectors while preserving
their matches. Raise the minified CSS budget to cover the new floating
label rules.
A range selection without addToSelection calls clearSelection(), which
also resets the anchor chip. The next Shift+Click then has no anchor and
falls back to a single selection. Keep the anchor across the reset.
* fix(popover): keep dismiss-on-next-click open inside the tip
Selecting text or focusing a control inside a focus-triggered
popover closed it, because focus left the trigger.
Keep the tip open for tip focus and tip pointerdown, and dismiss
on outside pointerdown instead.
Fixes#31088
* Bump bundlewatch limits for the tooltip tip-interaction logic
Raise the bootstrap.min.js and bootstrap.bundle.min.js size limits to fit
the added tooltip focus and pointer handling.
* bump
Update the migration guide and agent skills for current component markup,
theme classes, dependencies, container queries, and JavaScript behavior.
Remove stale Calendar guidance and document native Drawer markup, current
browser floors, and the bundled versus standalone dependency model.
Publishing the docs meant building the site and pushing it to gh-pages by
hand. This adds a workflow_dispatch job that builds the site, then copies it
over a gh-pages checkout with rsync. The copy omits --delete, so every older
docs/<version> directory survives while the root files and the current version
get replaced.
The job uses no third-party actions. GitHub's own Pages actions replace the
whole site on each deploy, so they cannot keep the version archive.
Also drop release-drafter. The release UI now generates the notes, and
.github/release.yml keeps the same label categories.
Give maintainers a project skill for the full release path. Include
version preparation, validation, package publishing, release assets,
NuGet publishing, documentation deployment, and final checks.
Require explicit approval before each external release write.
* fix(docs): omit SRI for local assets
The docs site serves its bundled assets from versioned local paths, but the
helpers attach hashes for CDN files in production.
Stop adding integrity attributes to these local URLs so browsers load built
assets when their content differs from CDN artifacts.
* fix(js): remove component listeners on dispose
Disposed chips, comboboxes, and strength meters leave listeners attached to
child elements because their events do not use component namespaces.
Namespace these listeners and remove them during disposal while preserving
listeners that consumers added.
* fix(datepicker): synchronize parsed values
Date-only input values can shift by one day outside UTC, and programmatic
selection changes do not update connected inputs and display elements.
Parse date-only values in local time and route all selection updates through
the same value synchronization path.
* fix(dialog): respect backdrop and swap cancellation
Dialogs and drawers with no backdrop still close on an outside click. Dialog
swaps also close the source when either lifecycle event cancels the swap.
Honor disabled backdrops and check both cancelable lifecycle events before a
swap changes either dialog. Register focus restoration only for accepted
shows.
* fix(tab): ignore stale activation completion
Rapid tab activation lets an earlier transition finish after a newer one. The
stale callback then restores the wrong selected and accessibility state.
Track each activation request and ignore callbacks that no longer match the
latest request.
* chore(bundlewatch): raise JavaScript size limits
The required component fixes increase three generated JavaScript bundles
beyond their existing gzip limits.
Raise each limit to the next quarter kilobyte with the repository's
Bundlewatch update tool.
* Add token playground to theme docs
Show how theme and layout tokens flow to components. Readers change the
radius, spacer, or primary color and see the button, input, alert, and
card update together. The Remint control demonstrates how derived tokens
(bg-subtle, fg, border) restate the theme today.
* Add remint to cspell word list
Clicking the navbar search button opens the dialog but leaves the search
field unfocused. Keyboard shortcuts already focus it.
Focus the field after the dialog entry transition so pointer focus cannot
return to the trigger.
* Add failing test when pasting into OTP input
* Fix OTP input pasting being truncated
* Reduce bundle size, test for disposing paste listener
* fix(otp-input): preserve native paste behavior
Pasting a formatted OTP avoids maxlength truncation, but the custom
handler replaces the complete value for every paste and changes readonly
fields.
Insert partial codes into the selected range, replace the existing value
only for complete codes, and leave readonly or empty pastes unchanged.
Update the paste tests to emulate native maxlength insertion.
* perf(otp-input): reduce paste handler bundle size
The paste behavior fix pushes the unminified bundle above its size limit.
Reuse mutable selection bounds instead of repeated conditional expressions
to preserve the behavior with less generated code.
---------
Co-authored-by: Sondre Aasemoen <sondre@eons.io>
* Close plain navbar drawers on resize past expand
The resize handler only matched responsive `.{bp}:drawer` classes, so
navbar drawers using plain `.drawer` stayed open after expand and kept
overlay styles. Widen the selector and cover it with a unit test.
* fix(drawer): track navbar container resizing
Change an open navbar's width without resizing the viewport: its drawer
can expand inline while the native dialog stays open.
Observe the containing navbar and close the drawer after its computed
position becomes static. Limit resize scans to valid drawer classes so
unrelated dialogs stay open.
* chore(bundlewatch): raise the bundle size limit
The drawer resize observer raises the compressed unminified bundle above
its current limit. Increase that limit by 0.25 kB to cover the change.
Unit tests use nested callbacks for Jasmine structure and async events.
Disable that rule for unit specs. Exclude local Cursor metadata from
Git and ESLint.
* Update placeholder sizing, docs, and animations
* feat(placeholders): favor shimmer for loading states
Use the wave animation for loading skeletons and inline status text.
Move the old opacity effect to placeholder-pulse while keeping the
placeholder-glow class as a compatibility alias.
Update the component docs, migration guidance, migration skill, and
docs search loader to use the new recommendation.
* Fix bundlewatch
* Relocate overflowing nav menus as overflow submenus
A nav item that hosts a menu used to collapse into a plain cloned link.
The menu became unreachable once the nav item overflowed, so a nested
menu was lost at narrow widths.
Move the original `.menu` into a `.submenu` of the overflow menu instead
of cloning it. One live menu keeps its ids, its nested submenus, and its
node state. Only the trigger is cloned, with the menu data attributes
stripped and `aria-haspopup` added. Restore moves the menu back to its
nav item and disposes the menu instances that were created.
* Type a relocated menu parent as ParentNode
`tsc` rejected `parent.append(menu)`, because `Node` does not declare
`append`. Store the parent as `ParentNode`, which does, and which is what
`Node.parentNode` already returns.
* Raise the JS bundlewatch budgets
The submenu relocation adds about 0.4KB gzipped to the minified builds,
and both budgets had under 0.1KB of headroom. Move
`bootstrap.min.js` to 34.0KB and `bootstrap.bundle.min.js` to 56.0KB.
* Handle menu state during nav overflow relocation
An open nav menu kept stale classes when its item moved into overflow.
Menus moved to another container were also missed, and cloned anchor
triggers lost keyboard focus.
Cache each hosted menu before it can move, reset open state during
relocation, and keep anchor triggers focusable. Add regression coverage
for relocation, nested interaction, container menus, and menu rebuilds.
Raise the bundled size budget to fit the added handling.
* Raise the unminified bundlewatch budget
The bundled build is 73.13KB after the nav overflow changes, which is
above the 73KB limit. Raise the limit to 73.25KB.
* Fully round nav pills
The radius token leaves visible corners on taller pill navigation. Use a
component-specific 3rem radius for the pill container and links.
* Fix nav overflow startup and clipped menus
Resizable examples clip the generated overflow menu because their fixed
positioning strategy cannot reach the toggle that NavOverflow creates.
Expose a menu strategy option and use it in those previews.
Hide the expanded nav until its first calculation completes to prevent a
startup flash and scrollbar. Remove the icon line box so icon-only toggles
stay vertically centered.
* Update Vanilla Calendar Pro to v3.4.0 and register only needed extensions
VCP v3.4.0 moves its optional features into extensions that ESM users must
import. The datepicker now registers only `months`, which
`displayMonthsCount` needs. This keeps time, weeks, motion, and annotations
out of `bootstrap.bundle.js`.
The v3.4.0 core is still larger than v3.2.0, so `bootstrap.bundle.min.js`
grows from 55.98 kB to 57.32 kB gzipped. Raise its budget to 57.5 kB, and
lower the unminified bundle budget to 73 kB.
Add `Datepicker.registerExtensions()` so that pages can enable other
features for every datepicker, including those the data API creates.
Extensions in `vcpOptions.extensions` merge with the registered set. The
docs show only core features, plus an Extensions section that explains how
to add the others.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BSipmEzpamwBN3vxKsUcge
* Revert "Add a calendar docs page"
The calendar docs page came with the calendar and datepicker split,
which landed on v6-dev by accident. We are not keeping the split, so
remove the page and its sidebar entry.
This reverts commit 04e526914.
* Merge the calendar Sass back into the datepicker
The calendar and datepicker split landed on v6-dev by accident, pushed
straight from a local branch instead of through this PR. We are not
keeping it, so restore the single `_datepicker.scss` and its
`--datepicker-*` tokens, and drop the calendar tokens from the docs and
the migration guide.
Keep the fix for the month and year grids. VCP 3.2.0 and later wrap
months and years in row and cell elements, so the column grid still has
to go on the row.
The split also broke popup dismissal. The popup rule set `opacity: 1`
with more specificity than `[data-vc-calendar-hidden]`, so a hidden popup
stayed visible. The single file keeps the two rules at equal
specificity, and the hidden rule wins by order.
* Fix the theme sync by caching the ancestor on first lookup
* Let vcpOptions.type through and style VCP's animated transitions
These changes come from the VCP 3.3.1 bump, which a force push dropped
from this branch. The version bump itself is no longer needed.
The datepicker always set VCP's `type` itself, so `vcpOptions.type` was
silently ignored. Let it through when `displayMonthsCount` is 1. More
months still force VCP's required `'multiple'` type. In v3.4.0 the
`'week'` type needs the `weeks` extension, so document that.
With animation on, VCP clips the outgoing view and layers a ghost clone
on top of it. Without the clip and the absolute positioning, the clone
stays in normal flow and shows through under the calendar. Style
`[data-vc-clip]`, `[data-vc-ghost]`, and `[data-vc-collapsing]`.
Co-authored-by: Mark Otto <markdotto@gmail.com>
* Point the VCP CDN URL at v3.4.0
The v3.4.0 upgrade bumped the package but left the docs CDN URL on
v3.2.0.
* Drop the week view and the weeks extension
We do not want the week view, week numbers, or collapse to a week, so
stop supporting them. The datepicker sets VCP's `type` itself again, and
`vcpOptions.type` no longer reaches VCP. Remove the `[data-vc-collapsing]`
styles, the `weeks` row in the extensions table, and the `weeks` usage in
the docs, unit tests, and type tests. The tests use `motion` and `time`
as the sample extensions instead.
* Support only the months extension and drop registerExtensions()
We do not style or test VCP's optional features, so stop offering them.
The datepicker always passes `extensions: [months]`, which
`displayMonthsCount` needs, and ignores `vcpOptions.extensions`. Remove
`Datepicker.registerExtensions()`, the animated transition styles for
the `motion` extension, and the extensions docs. The docs now say that
options from other extensions are not supported.
* Close the datepicker on outside presses and on a second trigger click
VCP hides the popup on an outside click itself, but it skips Bootstrap's
hide events. Close it on `pointerdown` outside the trigger and calendar
too, so presses on non-focusable elements fire `hide.bs.datepicker` and
`hidden.bs.datepicker`. The same handler already covers `focusin`.
VCP also schedules a show on every click of its trigger, after the data
API toggle runs. A second click on a button trigger closed the popup and
VCP opened it again. Cancel that reopen when the toggle closed it.
The two fixes add about 90 bytes, so raise the `bootstrap.min.js` budget
to 33.75 kB.
* Typo
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Julien Déramond <juderamond@gmail.com>
.form-select was consolidated into .form-control on <select> elements,
but these two selectors in the input group border-radius rules still
targeted the old class. They no longer matched anything.
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
React Bootstrap has no Bootstrap v6-compatible release yet, and its
components render their own DOM, so pairing it with v6's CSS breaks
styling entirely. The example was dropped from twbs/examples' v6-dev
branch for the same reason (twbs/examples#997); this removes its
listing from the docs examples page to match.
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
$root-tokens hardcoded --spacer: 1rem instead of interpolating
$spacer. Every --spacer-N token derives from $spacer through the
$spacers map, so overriding $spacer moved the scale but left the
base token stuck at 1rem. Other tokens in the same map already
interpolate their Sass variable (e.g. --border-width), so this
brings --spacer in line with that convention.
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
--nav-tabs-link-active-color and --nav-underline-link-active-color
referenced --fg-color, a token that does not exist. Use --fg-body,
the same token .nav-link-active-color already uses for this state.
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
--btn-font-weight referenced var(--btn-input-font-weight), but that
token was never declared alongside its --btn-input-* siblings. Add it
to scss/_root.scss so buttons resolve the intended font weight
instead of silently inheriting.
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
A fast double-click on a swap trigger opened both dialogs with a doubled
backdrop. The second click hit the just-opened dialog's own swap trigger
before its entry transition ended, so the outgoing dialog could not hide.
Ignore a swap trigger while the outgoing dialog still has .dialog-swap-in.
Reported at https://github.com/twbs/bootstrap/discussions/42444#discussioncomment-18384037
Co-authored-by: Claude <noreply@anthropic.com>
The alert tokens held the `--theme-*` lookups themselves, so anyone who
overrode `--alert-bg` or `--alert-color` also lost the theme fallback. Move
each lookup to the declaration that uses it. The tokens now hold plain base
values, and a `.theme-*` class still wins.
Compose the border in the declaration too, and drop the `--alert-border`
token that only wrapped the other three.
Round the corners with `--radius-7` to match the other surface components.
CSS Color 5 requires a <percentage> for the color-mix() mixing weight. A
bare number parses in a custom property declaration, but makes the value
invalid at computed-value time. Every .navbar-dark link color was dropped,
and the element inherited its color instead. No browser reports a warning.
The four values came from the v5 rgba($white, .55) form and kept the
decimal. The other 28 color-mix() calls in the stylesheet use percentages.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Document all spacing values through step 12 across margin, padding,
gap, space, gutters, and utility API examples. Correct the responsive
space syntax and custom negative-map example.
Expand border-radius examples through step 9 and show the correct Sass
map and generated root tokens.
Reduce the introductory text size on narrow screens, increase the
action gap, and use keyline menu dividers. Remove the redundant
masthead button shadow override.
Send the Examples navigation item to the dedicated v6 examples
repository. Store the URL in shared config and mark the link as
external in both navigation layouts.
Add quarter-step spacing values through 3rem and smooth the largest
radius steps. Update the migration guide and migration skill with the
new utility mappings.
Put the outer border on the card and use single dividers between its
content sections. Remove the temporary card-list helper and let flush
list groups inherit the card corners.
Update body alignment, grouped cards, examples, and migration guidance
to match the new structure.
The last two weeks added :host tokens, defaults() map
merges, accordion modifiers, hoverable tooltips, and a
standalone calendar. The migration guide omitted them,
and the agent skills still described the old APIs.
The calendar now has its own Sass partial and token map, so document it
apart from the datepicker. The page covers the inline calendar, the
`--calendar-*` tokens, and the color modes.
Point at the datepicker for options, methods, and events, because the
calendar has no JavaScript of its own.
VCP 3.2.0 wraps the months and years in row and cell elements to fix
their ARIA grid structure. That change moves the grid columns off the
container, so put the column grid on the new row elements. The month and
year views otherwise collapse to three rows.
Also split the calendar grid out of the datepicker into its own Sass
partial and token map. The datepicker now layers the popup surface onto a
bare calendar, instead of inline calendars undoing the popup styling. Use
the `--calendar-*` tokens to style a calendar and the `--datepicker-*`
tokens to style the popup.
Add unit tests that pin the month and year markup, because this
regression was invisible to the suite.
Closes#42836
Spacing accordion items apart used to need a custom margin on each item.
A margin joins the panel block-size transition, so adjacent items jumped
while a panel opened.
Add `.accordion-gap`, which lays the accordion out as a flex column and
puts the space in `gap`. A flex gap stays constant during the transition.
Each item clips its overflow and keeps a full border radius, so corners
do not retarget while the panel opens. Set the space with the new
`--accordion-gap` token.
Mix colors in oklch instead of lab, so a tint or a shade keeps a more
even lightness across the palette. Pull the 950 and 975 shades back to
70% and 76%, because the darkest steps had collapsed together.
Mix the dark mode `--border-subtle` from gray-800 and gray-900. Plain
gray-900 was too close to the dark body background to read as a border.
Let an active nav pill follow `--theme-bg` and `--theme-contrast`, so a
theme utility on a pill nav now takes effect.
Fix the swatch shortcode, which split `light-dark()` on the first comma.
A nested `color-mix()` broke that split and fell back to the raw string.
Match parens instead, and unwrap `var(--token)` for display.
Document the border tokens that already shipped: `bg`, `body`, `white`,
and `black`.
Open a dialog with `show()` and it sits off center. `show()` does not use
the top layer, so the dialog needs its own positioning. That positioning
centered the dialog with `translate(-50%, -50%)`, but the open state sets
`transform: none` to end the entry animation. The transform reset then
removed the centering.
Center with `inset: 0` and the `margin: auto` already on `.dialog`, and
add `height: fit-content` so the block axis also centers. Nothing here
depends on `transform` anymore.
A breadcrumb added a bottom margin of its own, so it fought the spacing
utility or the layout gap around it. Remove the
`--breadcrumb-margin-bottom` token and set `margin-bottom: 0` to clear
the browser default on the list. Spacing is now the page's job.
* Refresh the homepage masthead
Link the v6 announcement post, which is now live. Widen the headline
column to `lg:col-10` so the lead paragraph breaks over fewer lines.
Group the install command, the agents link, and the docs button on one
row from the `md` breakpoint, and wrap the docs button in an accent
shadow so it reads as the primary action.
Point the second footer link at the Bootstrap 5 docs. It used to repeat
the install page that the docs button already opens. Use the absolute
`getbootstrap.com` URL, as `Versions.astro` does, because the v5 docs are
not part of this build.
* Format the masthead with Prettier
`docs-prettier-check` runs as part of `npm run lint` and rejected the
new markup. Wrap the long anchors the way Prettier wants.
The fixed example theme picker leaves space for a chevron that its icon
set does not include. The menu also opens toward the viewport edge.
Use a square icon button in examples and open its menu above the button.
Keep the full theme picker in the documentation navigation.
* feat(css): add .theme-reset to drop inherited theme tokens
Put .theme-reset on a nested container inside a .theme-* subtree.
Theme-aware children then use their component fallbacks again.
.theme-* tokens inherit by design. There was no way to return to
unthemed defaults. This class sets each --theme-* custom property
to initial so var(--theme-*, fallback) uses the fallback.
* chore: bump bootstrap-utilities.css bundlewatch limit
.theme-reset ships with the theme helper classes. The utilities
CSS is 19.28 kB gzip, which is over the 19.25 kB cap.
Let users move the pointer onto the tip without it hiding, so they can
reach interactive content inside it (WCAG 1.4.13). Track the original
trigger for delegated tooltips and attach matching leave listeners on
the tip element. Add an "Interactive tooltips" docs example and note the
behavior in the accessibility section.
Closes#28411
Supersedes #35151
Co-authored-by: Ryan Berliner <ryan.berliner@gmail.com>
* Use `:host` in root selectors so Web Components can access CSS vars
Reproduce twbs/bootstrap#37162 on v6-dev. Adds `:host` beside every
`:root` selector that emits CSS custom properties, so components styled
in a shadow root see the tokens.
* Point the CSS variables snippet at `:root, :host`
Netlify compiles CSS before the docs site. The old `:root {`
regex no longer matches after we add `:host`.
* docs: wrap TOC titles and fade the scroll edges
Long heading names were clipping in the sidebar. Wrap them and
fade the list when it overflows so the current section stays
readable.
* Remove comments on fade effect for scrolling
Removed comments about fading edges for scrolling.
* Fix Sass theme map configuration and merge overrides via defaults()
bootstrap.scss never forwarded the theme module, so configuring
`$theme-colors` through the entrypoint with `@use ... with (...)` failed
with a "not declared with !default" error. Forward the theme module to
expose the theme maps for configuration.
Also convert the theme maps to the defaults() pattern so overrides merge
on top of the built-ins instead of replacing the whole map, and let a
`null` value remove a key. The default build output is unchanged.
Add a regression test and update the Sass and Theme docs.
Fixes#42847
* Use var(--black) in theme config test to satisfy color-named lint
The stylelint color-named rule rejects named colors like `black` in
declaration values. Reference the token instead, which also matches how
real theme maps set values.
* fix(datepicker): close the popup when focus leaves
Vanilla Calendar Pro ignores focus, so keyboard users could
tab out and leave the calendar open. Dismiss it on document
focusin outside the trigger and popup.
* chore: drop generated dist from the datepicker focus fix
Keep the source, tests, and docs. Rebuild dist on merge.
* refactor(datepicker): cut the focus-dismiss comments
Keep one note on why the listener is on document. Drop the rest.
* docs(homepage): add a For Agents menu
Give agents a homepage path to our skills and llms.txt.
The menu copies the install command and opens ChatGPT or Claude.
* style(docs): format the For Agents menu with Prettier
Convert the remaining plain !default map literals to the defaults()
two-step pattern, so `@use ... with (...)` merges overrides on top of
the built-ins and a null value removes a key. This matches every other
token, size, and variant map in the codebase.
Covers $spacers, $negative-spacers, $sizes, $radii, $border-widths,
$container-max-widths, $position-values, $aspect-ratios, $font-weights,
$color-tints, $color-shades, and $badge-variants. The default build
output is byte-identical.
Add a regression test that merges config maps through the entrypoint.
* Add `:focus-within` styles to `.form-control`.
Let wrapper controls (for example `.form-adorn`) show the focus ring when a child input is focused. Fixes#40827.
* Remove unused focus-ring import from form-adorn.
Dropping the local :focus-within rule left @use focus-ring unused and failed css-lint-imports.
* perf(docs): prerender pages with Speculation Rules
Docs navigations wait on a full page load even when the next
page is already clear from hover or intent.
Add Chromium Speculation Rules with moderate eagerness, and
defer Fathom until prerender activation so unused prerenders
do not inflate pageviews.
Closes#41907
* fix(docs): format Analytics.astro for Prettier
The Speculation Rules analytics script failed docs-prettier-check
because the inline script attributes were on one line.
CSS docs call out width longhands versus the border
shorthand. Add the plural form so the spell check passes.
COMMIT && git status --short && git log -1 --oneline
People often need every accordion section open at once
for find-in-page, printing, or less clicking. Exclusive
`name` groups block that unless you clear them first.
Add a docs recipe with one toggle button that opens all
items (after removing `name`) and restores exclusive
grouping on collapse.
References #40725
COMMIT && git status --short && git log -1 --oneline
The /node_modules/ gitignore rule only matched directories, so a symlink
slipped into v6-dev. Drop it from the index and ignore any node_modules
path so npm install cannot stage it again.
* Document the v6 transition model
Bootstrap now animates components in CSS and lets JavaScript toggle one
state class, but that rule only lived in the migration guide. Add a
Customize page that names the state classes, the token trio, and the four
ways to remove the motion, so component migrations have one contract to
follow.
* Give dialog, drawer, menu, and toast a transition-property token
These four components exposed a duration and an easing token but hard-coded
the property list, so a slide meant rewriting the whole declaration. Each one
now reads --{name}-transition-property, which also let the dialog and the
drawer drop their duplicate open-state transition: one list covers both
directions because visibility interpolates as a step that stays visible while
either end is.
The accordion panel gets the same trio, in place of a hard-coded .2s that
ignored the component tokens.
* Move alert, tab, tooltip, and popover off the shared .fade class
These four components animated through a generic .fade class that authors had
to remember, and they sequenced the animation from JavaScript. Each one now
declares its own transition and its own token trio in CSS, as the toast
already did, and animates by default:
- An alert fades out from a .hiding class, because an alert is visible in the
markup with or without .show, so the absence of .show cannot mark the exit.
- A tab pane fades in from @starting-style. The plugin adds .active and .show
in the same frame instead of waiting a transition between them. The outgoing
pane still leaves at once, since two in-flow panes cannot cross-fade without
one stacking under the other.
- A tooltip or popover fades in from @starting-style. `animation: false` now
adds .tooltip-instant or .popover-instant, the same class an author can add.
The JavaScript reads the computed transition duration instead of looking for a
class, so .transition-none, an -instant class, reduced motion, and
$enable-transitions all resolve the promise at once.
.fade stays for author markup, and it is harmless where it remains, but no
component depends on it.
* Animate collapse with interpolate-size instead of JavaScript
The plugin measured the content and wrote inline sizes to fake a height
animation. CSS can do it: `interpolate-size` interpolates `0` to the `auto`
of the open state, so the plugin only toggles `.show`. This drops the
`.collapsing` class and the size math, and matches the accordion.
Also raise the CSS bundlewatch ceilings for this transition series.
* Drop the stale .hide callout from the toast docs
v6 removed the deprecated class, so the note about keeping it for
backwards compatibility no longer applies.
* Stop the horizontal collapse demo from shifting the page
The wrapper reserved 120px, but the open card measures 138px in the docs,
so the content below it jumped on open.
* Reserve the same height in the collapse visual fixture
* Make nav overflow a wrapper around the nav
The component measured and observed the same .nav that it collapsed, so each
pass changed the width that produced it. Where the nav width tracked its
content, the two states straddled the collapseBelow threshold and the
ResizeObserver ran hundreds of times a second. That read as items that never
collapse, plus flicker on load.
The nav now lives inside a .nav-overflow wrapper that carries the data
attribute. The component measures and observes the wrapper, which its own output
cannot change. Inline-size containment on the wrapper closes the last path back
in: the min-content width of the items otherwise leaks through a flex ancestor
and widens the wrapper whenever the items are visible.
Items no longer shrink, so the measured widths are the widths the nav really
needs, and the nav gap is counted instead of a 10px fudge.
Fixes#42639
* Let moreText be false for an icon-only overflow toggle
An empty string already hid the label, but it left an empty element behind and
took the accessible name of the button with it. false says the intent, writes no
text element, and falls back to aria-label="More" so the button keeps a name.
An empty string now behaves the same way.
Closes#42639
* Use an English label in the custom toggle example
* Fix sanitizer specs for the wrapper API and bump JS budgets
The #42805 XSS specs still put data-bs-toggle on the nav itself. Point
them at the wrapper markup. Raise the minified JS caps by a quarter
kilobyte for the wrapper path growth.
* Document the nav overflow wrapper in the migration guide
* Sanitize HTML icon options in Chips and NavOverflow
dismissIcon, moreIcon, and [data-bs-overflow-icon] markup were inserted
via innerHTML without going through the sanitizer. moreText and
menuPlacement were also interpolated into HTML string templates.
Route icon HTML through a dedicated DefaultIconAllowlist, insert
moreText with textContent, and build the NavOverflow toggle with DOM
APIs so those values cannot break out of their slots.
* Raise the minified JS budgets by a quarter kilobyte
The icon allowlist and sanitizer calls in Chips and NavOverflow push the
gzipped min builds a few dozen bytes over the previous caps.
* Update sanitizer section for clarity on HTML rendering
Clarified the explanation of components that can render or accept HTML, emphasizing the use of the built-in content sanitizer to prevent XSS attacks.
* Add viewbox to the cspell dictionary
The icon allowlist uses the lowercased SVG attribute name that the
sanitizer matches on, so cspell flagged it as unknown.
* Tighten DefaultIconAllowlist after review feedback
Document that viewbox is lowercased on purpose for attribute matching,
and drop <use> so icon HTML cannot load external SVG fragments via href.
---------
Co-authored-by: Mark Otto <markdotto@gmail.com>
* Fix Menu keyboard navigation inside nested submenus
Arrow keys collected only the direct `.menu-item` children of `.menu`, so
they skipped every submenu trigger, which sits at `.menu > .submenu >
.menu-item`. A menu built entirely from submenus had no reachable items.
Keys pressed inside an open submenu panel did nothing at all. The keydown
handler is delegated on both the toggle and `.menu`, and delegation stops
at the innermost match, so the handler ran on the nested `.menu`. From
there the toggle is not a sibling, and the last-resort lookup only
searched the `.submenu` wrapper. The handler bailed out before any branch,
which killed the arrows, Home, End and Escape. Escape left the user unable
to dismiss the menu by keyboard. The same lookup also picked the first
toggle in the document when a menu used `container`, so an arrow key could
open an unrelated menu.
Resolve the owning menu from the open instances first, and treat submenu
triggers as items of their parent level. Moving focus along a level now
closes the submenus focus left behind, which matches hover and click.
Two specs claimed to cover the submenu ArrowLeft and Escape paths but
called the methods directly instead of dispatching keys, and a third
asserted nothing. That is why the regression stayed hidden. All three now
dispatch real events, and new specs cover the arrows, Home, End, ArrowLeft
and Escape inside open submenus, a third level, and the `container` case.
Co-authored-by: Aljo Joby <141745680+aljojoby9@users.noreply.github.com>
* Merge the duplicate submenu open branches in Menu
Enter, Space and the RTL-aware enter arrow each opened a submenu through
their own copy of the same sixteen lines. Only the key test differed, so
one guard covers all three.
* Mark Menu submenu triggers as popups on init
A submenu trigger only got `aria-haspopup` when its submenu first opened,
and it never got a starting `aria-expanded`. Assistive technology
therefore gave no hint that a submenu existed until the user had already
opened it.
Set both attributes on every `.submenu > .menu-item` that wraps a nested
`.menu`, at any depth, when the instance is created. A closed menu is
`display: none`, so the triggers enter the accessibility tree only after
the toggle builds the instance, which keeps the lazy data API correct. An
author supplied `aria-expanded` is left alone, for a submenu that must
start open.
* Raise the minified JS budgets by a quarter kilobyte
The keyboard and aria work adds about 190 bytes to each minified bundle,
which left both budgets with roughly a hundred bytes of room. The next
small addition to any component would have failed CI for no reason of its
own. Raise both by one step so the ceiling moves on purpose rather than
during an unrelated review.
---------
Co-authored-by: Aljo Joby <141745680+aljojoby9@users.noreply.github.com>
Adds .color-scheme-light, .color-scheme-dark, and .color-scheme-auto so a light-only embed can opt out of dark mode, plus a Color scheme utilities page. Regenerates the utilities metadata, which also restores the dynamic-viewport entries missed by #42800.
Closes#38750
Toast still used the v4-era show dance: JS toggled `.fade`, forced a
reflow, then juggled `.show`, `.showing`, and a deprecated `.hide` class
to fake an exit animation. Menu, Dialog, and Drawer already express this
in CSS, so Toast was the last component carrying the old pattern.
The fade now lives on `.toast` itself, using `@starting-style` for the
entry state and a discrete `display` transition so the toast stays laid
out while it fades out. JS only toggles `.show`.
Replace the `animation` option with a `.toast-instant` class, matching
`.dialog-instant` and `.drawer-instant`. Alpha is the right time to drop
the `.showing` and `.hide` compatibility classes rather than ship them.
* Emit transition longhands so every listed property animates
The composed `--*-transition` tokens put a property list and one duration
into the `transition` shorthand. In that shorthand the duration binds to
the last property only. A button therefore animated `box-shadow` but left
`color`, `background-color`, and `border-color` at `0s`.
Each component now declares `-property`, `-duration`, and `-timing` tokens.
A new `transition-longhand()` mixin emits the `transition-*` longhands.
Those longhands repeat one duration and easing across the full property
list, and each token stays independently overridable.
This affects buttons, nav links, accordions, form controls, range thumbs,
and floating labels.
* Gate transitions behind prefers-reduced-motion: no-preference
The transition mixins emitted a transition, then switched it off again in a
`prefers-reduced-motion: reduce` query. Each animated rule therefore paid for
an override block. The mixins now emit the transition inside a
`no-preference` query instead, which drops those blocks and shrinks the CSS.
Rules that force `transition: none` stay outside the query. Those rules
disable motion on purpose, so they must reach reduced-motion readers too.
The old guard tested `!= none`, which missed `none !important` because Sass
passes it as a two-item list. `list.index()` catches both spellings.
A browser without support for the media feature now gets no transition. The
migration guide records that trade-off.
Also rename `transition-longhand()` to `transition-props()`.
* Coordinate menu shown/hidden events with the CSS transition
Fire shown.bs.menu and hidden.bs.menu after the enter/exit transition
completes, and keep the menu positioned in place through its close so it
no longer snaps away mid-animation, matching Dialog and Drawer behavior.
* Standardize component transition tokens into duration/timing pairs
Split the fade and collapse tokens into granular -duration/-timing
custom properties and add a shared --transition-timing-overlay easing so
dialog, drawer, menu, carousel, accordion, and the navbar toggler share
consistent, overridable motion.
* Animate checkbox, radio, and switch marks
The check tick, radio dot, and switch thumb now ease in with a shared
overshoot defined by new --control-transition-* tokens, giving the
controls a subtle pop on toggle. Motion is suppressed under
prefers-reduced-motion via the transition mixin.
* Add motion utilities for controlling animation
Introduce .transition-none, .animation-none, .animation-shake, and
.animation-pop, documented on a new Motion utilities page. The
decorative shake and pop keyframes are disabled under
prefers-reduced-motion.
* Add hover-lift helper
.hover-lift raises an element with a transform and shadow on hover and
focus-visible, tuned through --hover-lift-* tokens and suppressed under
prefers-reduced-motion. Documented with a new helper page.
* Add a toolbar actions slot to Example for replaying animations
Example and Code now expose an actions slot rendered in the code
toolbar, and a data-bd-replay handler restarts one-shot animation demos
by re-applying the animation class. Adds an arrow-counterclockwise icon
for the replay control.
* Document motion changes in the migration guide
Note the new motion utilities, animated checkbox/radio/switch marks, the
split fade/collapse transition tokens, the .hover-lift helper, and the
deferred menu shown/hidden events.
* Make the toggler a no-op when no value is provided
Guard against a missing data-bs-value so calling toggle() without a
value returns early instead of throwing, and allow null in the value
type. Adds a regression test.
* Add per-size gap tokens for buttons
Wire .btn-#{size} to a --btn-input-#{size}-gap custom property and define
that token for every size, so button sizes control their own content gap.
Also add a base --btn-input-gap token and read it through --btn-gap, which
replaces the hardcoded fallback in the gap declaration.
* Simplify the CSS layer label in page meta
* Group the radio example under a shared name
Show two radios sharing a name attribute so the form-field example
demonstrates real single-select behavior.
* Remove the Collapse toggle option
The `toggle` option made the constructor change the state that the markup
declares. That surprised people, so almost every caller passed
`toggle: false`. Remove the option and always keep the declared state.
Call `show()`, `hide()`, or `toggle()` to change it.
* Return a promise from the JavaScript lifecycle methods
`show()`, `hide()`, `toggle()`, and `close()` returned before the
transition ended, so a caller had to listen for a `shown.bs.*` or
`hidden.bs.*` event to continue. `_queueCallback` now returns a promise
and each component awaits it, so a caller can `await` the method instead.
The promise always settles, so a no-op call cannot strand the caller.
* Forward config from bootstrap.scss so $utilities is configurable
`$utilities` lives in `_config.scss`, which `bootstrap.scss` never
forwarded. Every Sass example on the utilities API page therefore failed
with "This variable was not declared with !default in the @used module".
Forward config, then rewrite the examples around the two working patterns.
* Use the `as *` convention in the utilities API snippets
The `as bs` namespace appears nowhere else in the repo. The docs load
Bootstrap modules with `as *`, so these snippets now do the same. Sass
writes an assignment to an `as *` member back to the source module, so
the two-file pattern still reaches `bootstrap/scss/config`.
* Add a free key to the width example in the utilities API docs
The example said it adds a value, but key `10` already exists at
`10rem`, so the merge replaced it. Key `20` is free, and `20%` matches
the other width percentages. The example now adds `.w-20` and keeps
`.w-10`.
`aria-pressed` has no default value. Assistive technology reads a toggle
button without it as a plain button and never announces the pressed state.
Add the missing attribute on `DOMContentLoaded`, and read the `.active`
class to pick the value.
The `toggle` option made the constructor change the state that the markup
declares. That surprised people, so almost every caller passed
`toggle: false`. Remove the option and always keep the declared state.
Call `show()`, `hide()`, or `toggle()` to change it.
* Add dynamic viewport height and width utilities
A mobile browser changes the viewport when it shows or hides its URL bar,
so a `100vh` section overflows. The `dvh` and `dvw` units follow that
change. Add `.dvh-100`, `.min-dvh-100`, `.dvw-100`, and `.min-dvw-100`.
* Raise the bootstrap-utilities.css bundlewatch limit to 19.0 kB
The new dynamic viewport utilities add 21 bytes gzipped. The old 18.75 kB
limit kept only 13 bytes of space, so the check failed.
* Give the navbar a min-height instead of computed heights
v5 derived the brand height from the nav link font size, line height, and
padding. That math no longer matches the v6 navbar, which centers its
children with flexbox. Remove the chain and the stale TODO. Add a
`--navbar-min-height` token, so a default navbar keeps a 3.5rem floor.
* Clean up comments in _navbar.scss
Removed comments for navbar styles to improve clarity.
A horizontal scrollbar in a `<pre>` block covers the last line of code.
`scrollbar-gutter: stable` keeps the space free, so the scrollbar cannot
hide content.
A responsive drawer replaces the `.drawer` base class with a
breakpoint-prefixed class, such as `.lg:drawer`. The `closest()` lookup
matched only the base class, so a close button had to carry an explicit
`data-bs-target`. Match the prefixed class too.
The wrapper looks like an input, so people click the icon, the text, or the
padding and expect the field to take focus. A `<label>` wrapper gives that
behavior natively, so no JavaScript is necessary. Mark the adornments with
`aria-hidden="true"`, so their text stays out of the accessible name.
`children()` and `focusableChildren()` have no callers in the source or in
the tests. Remove them to keep the module small. `prev()` stays, because
Menu and ScrollSpy still use it.
system-ui resolves to the user interface font of the locale, not to a
neutral font. On Japanese Windows it becomes Yu Gothic UI, which draws
bold Greek and Simplified Chinese glyphs incorrectly, and which is too
condensed for long text. The keyword is made for application UI, not for
articles.
--body-font-family now uses the full v5 native font stack without
system-ui. Tailwind, Starlight, and VitePress made the same change.
Also point the datepicker and the CSS variables example at
--body-font-family. Both referenced --font-sans-serif, which no v6 file
defines. Remove the semicolon inside the --font-mono string, which made
the build print a duplicate semicolon.
Fixes#42703
`EventHandler` emulates `mouseenter` and `mouseleave` with `mouseover` and `mouseout`
listeners. The guard that kept the emulation honest read `originalTypeEvent in
customEvents`, which only matches the bare strings. Every component namespaces its
events, so no component ever got the containment check. The guard also wrapped the
caller's callback and stored the wrapper, so removal by reference, deduplication and
one-off bookkeeping all compared against a function the caller never held.
Store the semantic event type on the handler instead, and apply the containment check
inside the handler. This keeps the caller's function identity intact and fixes Carousel
resuming autoplay between slides, Tooltip hiding between children of its trigger, and
Menu leaking a submenu listener on each close.
Co-authored-by: ShiroKSH <kushidashiro@gmail.com>
* Add llms.txt and llms-full.txt for AI tools
Generate /llms.txt (a curated, llmstxt.org-style index of the docs) and
/llms-full.txt (the full docs text concatenated for ingestion) from the
sidebar and docs content, and link both from the install page.
* Add LLMs docs page and agent skills for install and bundler setups
Pull in the getting-started/llms page, the bundler/install agent skills
(bootstrap-v6-install, -npm, -webpack, -parcel, -vite), guide callouts
linking each skill, and the eslint allowance for skill code blocks.
* Refine AI docs page and agent skills
Rename the getting-started page to /getting-started/ai (ai.mdx) and its
sidebar entry to AI. Generate the skills table from each SKILL.md
frontmatter via a new skills lib and SkillsTable shortcode, adding a
guide key to every skill so the table never drifts from the files.
Standardize skill customization on CSS-token overrides ($root-tokens and
$*-tokens), matching the Customize › Sass docs, and note that token names
are authored unprefixed (PostCSS adds the --bs- prefix). Rename workflow
'Phase' to 'Step' throughout, add SRI integrity placeholders to the CDN
snippet, and fix the Vite file-tree box drawing.
* Expand agent skills beyond setup and migration
Agents had guidance for installing Bootstrap and moving off v5, but
nothing for everyday work, so add skills for authoring a component and
its JavaScript, customizing the color system, and generating utilities.
A v4-to-v6 skill covers projects skipping v5 entirely, and the v5-to-v6
skill now points there and fixes its layer list and `$radius` example.
* fix spellcheck
* Update the component JS skill for the TypeScript sources
The skill still described the pre-rebase toolchain: JS sources in js/src, a
js/index.js barrel, Karma, and Jasmine specs. Rewrite it against what is on
v6-dev now — TypeScript sources with the config/field/override conventions the
compiler options force, the js/src/index.ts barrel, the type tests that guard
the shipped declarations, and Vitest browser mode with its Jasmine shim.
TypeScript code blocks in markdown need a parser, so point ESLint at the
TypeScript one for them; the blocks are checked for syntax only.
* Add "llms" to the cspell dictionary
The llms.txt work fails the spellcheck on a word that is now part of the
project vocabulary.
Unblocks #42728
* Raise browser coverage and derive the build targets from browserslist
The `.browserslistrc` comment claimed about 90.8% coverage, but
`npx browserslist --coverage` measured 77.53%. Two things caused the gap.
The `>=` lines are joined with OR, so they never acted as floors, and
caniuse gives the newest Safari a null release date, which hides roughly
8.2 points of real usage from every range query.
Adding `unreleased versions` recovers that Safari share at zero output
cost, because it is newer than every floor. Lowering the floors to the
true native `light-dark()` boundary reaches about 88% for 1.68 kB of CSS,
all of it `-webkit-backdrop-filter`. We stop there on purpose: the next
rung up drops below native `light-dark()`, where Lightning CSS falls back
to the custom-property polyfill that broke `data-bs-theme`.
Dropping and_uc, and_qq and kaios costs 0.718% and removes the only
reason Autoprefixer emitted `-webkit-mask-*` and `-moz-column-gap`, so
`removeRedundantPrefixes` now only trims the prefixed `transition`
declarations that come from the prefixed thumb selectors.
With the list reduced to an explainable set, `build/browser-targets.mjs`
can resolve it at build time instead of restating the floors by hand.
* Remove the dead BrowserStack integration
The workflow has been `disabled_manually` with zero runs since about
October 2024, so this has not tested anything for well over a year. The
browser matrix pinned Chrome 60, Firefox 60, iOS 12 and Android 8, all
far below the v6 floors, so re-enabling it would only fail on modern
syntax.
Dropping the launcher also removes 34 packages from the lockfile,
including the legacy tunnel wrapper and its unzip stack. The README
credit goes too, since we no longer use the service.
`ip` and `karma-jasmine-html-reporter` stay: `npm run js-debug` still
needs both.
* Port the integration test bundles to Rolldown
Both configs bundle the already-built dist, so no TypeScript is involved
and the switch is mechanical. `@rollup/plugin-replace` becomes
`transform.define`, and node resolution is built in, so the plugin stack
disappears. They now share `build/browser-targets.mjs` with the dist
build instead of carrying their own Babel targets.
Also drops the `js/tests/integration/rollup*.js` glob from the ESLint
config. It never matched anything, because the files are `.mjs`.
* Replace Karma with Vitest browser mode
Vitest 4 ships browser mode as stable, so the specs now run in a real
Chromium through Playwright. The suite drops from about 25 seconds to
under 6, and the runner needs no Rollup or Babel stack of its own.
The specs are written against Jasmine, so `js/tests/vitest-setup.js` maps
that API onto Vitest rather than rewriting roughly 22,000 lines. The one
behaviour that cannot be codemodded is `spyOn`: Jasmine stubs the method,
Vitest calls through, and 92 call sites here rely on the stub. A blind
conversion would leave tests that pass while asserting nothing, so the
shim stubs by default and restores the real method only for
`.and.callThrough()`. hammer-simulator assigns to `event.target`, which
throws in the strict mode a module gets, so it runs through a Function
constructor to keep the sloppy-mode behaviour Karma gave it.
Coverage now instruments all of `js/src` instead of only the files a spec
imports. That is a larger and more honest denominator, and it immediately
showed `combobox.ts` at 0%, so this adds the missing spec. The branch
threshold moves from 89 to 88 to match the new denominator; statements,
functions and lines all still clear 90.
Vitest 4 also removed the `done` callback, so the four remaining
callback-style specs now return a promise.
* Remove Rollup and Babel
Karma was the last thing using them. With the specs on Vitest and the
dist builds and integration bundles on Rolldown, nothing reads
`.babelrc.mjs` or the Rollup TypeScript resolver any more, so both files
and all nine packages go.
Rollup and Babel still appear in the lockfile as transitive dependencies,
because Vite bundles Rollup and the Istanbul coverage provider
instruments through Babel. Neither is ours to configure now.
Also records the deliberate `rolldown` pin. It is exact-pinned while
still release-candidate software, so Dependabot should not move it
without review.
* Replace the aria and datepicker type casts with real types
Nine `as unknown as` casts and seven `as any` casts hid two different
problems behind the same syntax.
Seven of the `as unknown as` casts passed a boolean to `setAttribute`,
which takes a string. A `setAriaAttribute` helper does that conversion in
one place, so callers no longer reach for a cast. The two that remain are
unrelated and stay: one writes to `element.style`, the other is a
not-set config sentinel.
The datepicker casts were bridging Bootstrap's wide `string` and `number`
config types to the narrow literal unions Vanilla Calendar Pro actually
accepts. Narrowing `DatepickerConfig` to those unions removes all seven
and turns an out-of-range value into a compile error instead of a silent
no-op inside the calendar. One assertion survives, where `getMonth()`
returns a number TypeScript cannot prove is 0-11, but it now names the
type it narrows to.
Also deletes the stale `selector-engine.ts` TODO. It claims `next()` is
unused, but `prev()` and `next()` have three call sites each across
`menu.ts`, `scrollspy.ts` and `combobox.ts`, and both are tested.
* Make Tab throw when its element has no tab-panel ancestor
The constructor carried a TODO saying it should throw in v6, and this is
v6. Until now it returned early and handed back an instance that looked
fine but did nothing, so a markup mistake produced tabs that silently
refused to switch.
This is a breaking change for anyone constructing a Tab outside a
`.list-group`, `.nav` or `[role="tablist"]` container. The old test
asserted the silent return by name, so it now asserts the throw instead.
* Cover the remaining plugins in the type-level API tests
`api.ts` and `consumer.ts` only exercised 11 of the 20 plugins, so the
public surface of the other nine was never asserted. Both files now cover
all of them.
The datepicker assertions are the point of this. Four negative cases
check that the narrowed Vanilla Calendar Pro unions reject out-of-range
values such as `firstWeekday: 7` or `displayMonthsCount: 13`. Extending
`consumer.ts` matters more than `api.ts` here, because it reads the
emitted declarations and so proves the unions survive the `.d.ts` emit
rather than widening on the way out.
Also adds a Dialog case for a prevented `show` event, which was an
uncovered branch.
* Document the Vitest and Rolldown switch
`js/tests/README.md` still described Karma and Jasmine, and its paths said
`tests/unit/` where the real path is `js/tests/unit/`. It now covers
Vitest browser mode and calls out the two things that will catch a
contributor out: `spyOn` stubs by default unlike `vi.spyOn`, and Vitest 4
dropped the `done` callback. The coverage section explains why the branch
floor sits at 88 and why an untested plugin now reports 0% instead of
vanishing from the report.
`contribute.mdx` listed Sass, PostCSS and terser but named no JavaScript
bundler at all, so it gains a section on Rolldown and on how
`build/browser-targets.mjs` keeps both pipelines on one browser list.
`migration.mdx` gets the same switch from the consumer's angle, since it
only matters to people who build from source.
`AGENTS.md` is updated to match.
* rebuild
* Exclude the type-assertion tests from CodeQL
`js/tests/types/` holds compile-time assertions. `tsc` checks them and
nothing ever runs or bundles them, so the quality suite's unused-variable
query fires on essentially every line: the typed declaration is the
assertion, and using the variable afterwards would add nothing.
The files were already full of these before this branch. They only became
visible because CodeQL annotates changed lines on a pull request, so
extending the coverage to all 20 plugins lit up 40 notices for a pattern
that was already there.
* Update the browser support docs for the new floors
This branch lowered the browserslist floors, but the browsers and devices
page still reproduced the old ones. It listed Chrome and Edge 130, Firefox
132, and Safari 18, where the real minimums are now Chrome and Edge 123,
Firefox 120, and Safari 17.5.
The rationale was stale in two more ways. It claimed the floors covered
roughly 90% of users, a figure that came from browserslist.dev and its
pinned caniuse data; `npx browserslist --coverage` reports 87%. It also
said we could not lower the floors, which this branch did. Each floor now
sits on the first version of that engine with native `light-dark()`, so
the real constraint is the polyfill that breaks `data-bs-theme`.
Also note that browserslist ORs its lines, because the page implied `last
2 major versions` was the whole policy, and record that we now exclude UC
Browser, QQ Browser, and KaiOS.
* Raise the browser floors to Chrome 130, Firefox 132, and Safari 18
A floor applies to a whole major line. We cannot raise it in a minor
release, so whatever 6.0 ships caps what every later 6.x feature may use.
Earlier in this branch I set the floors on the first versions with native
`light-dark()`, which bought 2.18 points of coverage but left v6.x with
the oldest baseline we could tolerate rather than the one we want.
The low Firefox floor was also wrong on its own terms. `:has()` needs
Firefox 121, so Firefox 120 sat inside our support window and could not
render our forms, which use `:has()` 28 times in validation alone. The new
floors sit on the newest feature v6 already depends on: `:has()` at Firefox
121, `content-visibility` at Firefox 125 and Safari 18, `<details name>` at
Firefox 130, `text-wrap: balance` at Chrome 130, and unprefixed
`backdrop-filter` at Safari 18. `light-dark()` stays the hard lower bound.
Coverage drops from 87.19% to 85.01%. The JavaScript is byte-identical,
because every version in both sets handles the syntax we emit. The CSS
loses the `-webkit-backdrop-filter` copies on the Dialog and Drawer
backdrops, so it fits under the old bundlewatch limit again and this branch
no longer needs to raise it.
* Record what the browser floors buy us
The file already explained which features set each floor. It did not say
what the floors give us in return, so the cost was documented and the
benefit was not. Anyone reading it could see why we cannot go lower without
learning what they may safely use.
Add two lists. The first names the features that need no fallback, prefix,
or polyfill in any 6.x release. The second names the ones we still cannot
use, with the version that blocks each. Firefox is the blocker in almost
every case. Relative color syntax is the closest at Firefox 133, and anchor
positioning is the one worth waiting for, because it would let Menu,
Tooltip, Popover, and Combobox drop Floating UI.
Every version here comes from the caniuse-lite copy in this repo, checked
against the current floors. Comments only, so the resolved target list and
the build output do not change.
* Document the raised browser floors for upgraders
The migration guide never mentioned browser support. That was the largest
gap in it, because v5 supported Chrome and Firefox 60 and Safari 12, while
v6 now needs Chrome and Edge 130, Firefox 132, and Safari 18. A reader with
an older audience cannot adopt v6 at all, and nothing in the guide said so.
Add a warning callout to the upgrade steps rather than a changelog bullet,
because this is a prerequisite to check before starting, not a change to
apply while working. It links to the browsers and devices page for the
reason behind each version.
The approach page embeds `.browserslistrc` in full, so the rationale
comments added in the last commit now render there ahead of the queries.
Point that page at the summary table, so a reader who only wants the
versions does not have to scroll the comments.
* Move the browserslist commentary into the docs
The rationale had grown to roughly 50 comment lines, and the approach page
embeds this file in full, so all of it rendered there ahead of the queries
it was meant to explain. Prose belongs on a page that can format it.
Move the parts the docs did not already cover onto the browsers and devices
page: why `last 2 major versions` carries our mobile coverage, why
`unreleased versions` is worth eight points, how to measure coverage and why
not to trust browserslist.dev, which features the floors do and do not give
us, and which prefixes the excluded engines would add. Leave behind a
pointer to that page and the two rules a person editing the file must not
get wrong.
Both pages now read the query lines out of the file through `fileMatch`
instead of hand-copying them. That is what drifted in the first place: the
page still claimed Chrome 130 and Safari 18 after the floors briefly moved
to 123 and 17.5. The regex is anchored on the first and last query, so a
restructure fails the docs build rather than shipping stale versions.
The resolved target list, the derived oxc targets, and the build output are
all unchanged.
Add a Container queries page under Utilities > Layout documenting the
.contains-inline and .contains-size utilities (container-type), wire it
into the sidebar, and add scss-docs markers so its Sass API renders.
Rolldown is Rollup's native-speed successor and already sits in our lockfile
through Vite and Astro, so the docs build uses it today. Moving our dist
builds to it makes bundling about 35x faster and deletes tooling: the
built-in `resolve.extensionAlias` replaces our custom ts-resolve plugin in
this path, and the built-in transforms replace Babel, which applies zero
transforms at our browser floors. Browser targets live in
`build/browser-targets.mjs`; keep them in sync with `.browserslistrc`.
Karma and the integration configs stay on Rollup and Babel until
karma-rolldown-preprocessor ships a fix, so those dependencies remain.
Output stays equivalent: identical exports, verbatim relative specifiers in
js/dist, `process.env.NODE_ENV` replaced in the bundle, banner preserved
through terser, and minified sizes within a fraction of a percent (slightly
smaller). The unminified files change formatting wholesale in the rebuild
commit; their bundlewatch budgets now carry slack that can ratchet down.
Derive each docs "Dependencies" table from the component's real import
graph (site/src/libs/js-dependencies.ts) via a new <JsDependencies>
shortcode, so the tables stay in sync with the source automatically
instead of being hand-maintained. Add the table to every JavaScript-
backed component page and migrate the existing tooltip, popover, and
menu tables onto the shortcode.
The migration exposed every component internal as public. Consumers could
reach `_config`, `_element`, and helper methods, which would make them
breaking changes once shipped. Restrict the surface and stop a few types from
lying about nullability.
- Mark every `_`-prefixed instance field and method `protected` across all
components (409 members). `protected`, not `private`, so subclasses keep
access. Public API methods and statics stay public. Two carousel data-api
hooks stay public because the module-level handlers call them.
- Retype `getOrCreateInstance`'s config to `NonNullable<ConstructorParameters<T>[1]>`
so it still enforces each component's config now that `_config` is protected
(indexing a protected member on a type parameter is illegal).
- Fix three assert-then-test contradictions found by the review: the `menu`
submenu-keydown guard, and the `chips`/`otp-input` constructors that asserted
`findOne(...)!` then tested the result for null. Each now handles the null in
a local, so the guard is honest and no `!` remains.
The type tests (`api.ts`, `consumer.ts`) now assert consumers cannot reach the
protected internals.
An adversarial review found the migration's types assert away things the
runtime rejects. Fix the type layer without changing behavior.
- Delete the dead `jQueryInterface` from combobox. v6 removed jQuery, so
`this.each` does not exist and the method throws; it was unreferenced and
laundered three `any`s through the compiler.
- Narrow config types to match their runtime validators: tooltip `container`
drops `null`, datepicker `dateMin`/`dateMax` drop `Date`, and toggler
`value` drops `null`. Each value passed the type but threw in
`_typeCheckConfig`.
- Type the static path. `getOrCreateInstance` now types its config per
component via `Partial<InstanceType<T>['_config']>`, so it enforces the same
keys as the constructor. This is the path the docs recommend.
- Force Babel to use define semantics for class fields, so it agrees with
tsconfig `useDefineForClassFields` and Rolldown. No field is emitted today
(all instance fields use `declare`), so dist is unchanged.
The type tests (`api.ts`, `consumer.ts`) now assert the static config path.
`js/tests/types/consumer.ts` imports through the package name and the deep
subpaths, so Node resolves it through the `exports` map to the emitted
`js/dist/*.d.ts`. This proves downstream projects get working types with no
`@types/bootstrap`, and it fails when a shipped declaration is malformed.
`npm test` runs it as `js-typecheck-dist` after the build.
Fixes issues a code review found on the migration branch, plus cleanups.
Correctness:
- Menu offset callbacks now work. A callback that returns a `[skidding,
distance]` array is converted to Floating UI's `{ mainAxis, crossAxis }`
shape through a shared `toFloatingOffset()` helper. Tooltip and Menu both
use it, so all three offset forms share one mapping. Menu previously
ignored an array-returning callback.
- `dispose()` on dialog-base and nav-overflow now removes only the instance's
own listener. Calling `EventHandler.off()` with no handler removed other
instances' and consumers' listeners too. Each instance now stores its
handler and passes it to `off()`.
- chips `remove()` rebuilds the value array from the remaining chips. Values
now stay in the rendered order when a duplicate is removed.
Packaging:
- The `bootstrap/js/src/*.js` export now maps to the compiled `js/dist` build,
not the raw `.ts` source, so non-TypeScript consumers can load deep imports.
The migration guide documents the change.
- The package entry moved to `js/src/index.ts`, so tsc emits its declarations.
This removes the string-replace hack in `build-plugins.mjs`.
Tooling:
- `js` emits declarations in parallel with the compile and minify chain, so
minification no longer waits for tsc and the watch loop skips it.
- `moduleResolution: nodenext` makes tsc enforce the `.js` import extensions.
- A `declare ['constructor']` field on Config, BaseComponent, and Tooltip
replaces about 29 `(this.constructor as typeof X)` casts.
- The offset and floatingConfig option types are shared from util/floating-ui.
- tooltip: compare Floating UI arrow coords against undefined (not null),
the value the arrow middleware actually reports, so an absent cross-axis
coordinate no longer writes "undefinedpx"; adapt array results from an
offset callback to Floating UI's { mainAxis, crossAxis } shape
- dialog: remove the unnamespaced native cancel listener on dispose so it
no longer leaks past teardown
- nav-overflow: namespace the fallback window resize listener and remove it
on dispose; drop the write-only _isInitialized flag
- chips: remove only a single value entry so duplicate chips stay in sync
with the DOM under allowDuplicates
- strength: drop the unused score argument passed to _updateUI
- toggler: document that value is required (the null default is a
must-override placeholder)
Adds unit coverage for each fix, including a new chips spec.
Sources in js/src plus the package entry are now strict TypeScript.
Babel strips the types so the Rollup pipeline and browser targets stay
unchanged, while tsc only type-checks and emits declaration files next
to the compiled plugins in js/dist. The npm package entry moves to the
compiled js/dist/index.js with bundled types, so consumers get built-in
type declarations without @types/bootstrap.
* Let WebKit date inputs scale with control sizing
Drop the fixed 1.5rem heights on the -webkit-datetime-edit and
-webkit-datetime-edit-fields-wrapper pseudo-elements so date inputs
inherit the control's font-size, line-height, and padding and scale
with the size modifiers. Also remove a stale commented-out variables
block from the form-control docs.
Refs #34433
* Clean up _form-control.scss by removing comments
Removed commented-out styles for date and time inputs.
* Redesign docs callout accent band
Replace the inline-start border with an inset rounded accent band via a
::before pseudo-element, add explicit callout text color, and mix the
band color from each variant's border and emphasis colors.
* Docs: tighten npm starter callout copy
The hardcoded .grid-fill class and commented-out grid-cols/g-col-auto scaffolding in _grid.scss are gone now that grid-template-columns utilities (including grid-cols-subgrid) cover this. Drops the now-broken .g-col-auto example from the docs and calls out grid-cols-subgrid in the migration guide.
Moves the hand-written subgrid class into the grid-column-counts
utility alongside the other .grid-cols-* classes, so it is produced
the same way as the rest of our utilities, and documents it with a
live example.
Fixes#42649
The token was only referenced by a handful of components as an
indirect fallback and had no corresponding entry in _root.scss,
making it effectively dead and impossible to override. Point those
fallbacks at --body-font-size instead and document the removal in
the migration guide.
Fixes#42624
* Refactor how we do zindex
- Move to a combined Sass map
- Generate tokens on the root for all values
- Update components to use CSS variables instead
* generate utils info
* fix
Colors links, hover, focus, and the active page item via .theme-{color}
classes, matching the pattern already used by alerts and accordions.
Adds a docs example and updates the migration guide.
* Consolidate font-weight variables into a $font-weights Sass map
Individual $font-weight-lighter/light/normal/medium/semibold/bold/bolder
variables made it easy to forget one when adding a new weight and kept
the values duplicated across _config.scss, _root.scss, and the
utilities API. Move them into a single $font-weights map so --font-weight-*
tokens and the fw-* utilities are generated from one source, matching
the pattern already used for $font-sizes.
* Replace line-height Sass variables with CSS custom properties
$line-height-base/sm/lg duplicated values already exposed as
--line-height-* tokens (generated from $font-sizes). Point the
line-height utilities and --body-line-height at the CSS variables
instead of the Sass variables so there's one source of truth and
runtime overrides of --line-height-* also affect the utility classes.
* Remove $headings-color Sass variable
It was the last Sass variable left in the heading/type system after
the rest moved to CSS custom properties, and it only ever had one
value (inherit). Hardcode --heading-color: inherit directly in
$root-tokens instead so headings customization is fully CSS-variable
driven, matching paragraphs, lists, and legend.
* Remove $link-decoration and $link-underline-offset Sass variables
Both had a single fixed value and existed only to be interpolated into
--link-decoration and --link-underline-offset once, in $root-tokens.
Hardcode the values there directly instead, simplify the list-group
item's text-decoration to plain `none` (it no longer needs to branch
on $link-decoration), and drop the stray commented-out
$enable-negative-margins default and leftover dead comments in Reboot.
* Config: remove orphaned Typography comment header, fix spacing
* Move transition variables into component tokens
$transition-fade and $transition-collapse/$transition-collapse-width
lived in _config.scss like other component tokens used to before the
tokens migration, but .fade and .collapsing never picked up the
--fade-*/--collapse-* token treatment. Give them their own
$fade-tokens and $collapse-tokens (via defaults()) in _transitions.scss
so --transition-fade, --transition-collapse, and
--transition-collapse-width are runtime-customizable CSS variables
like the rest of the component tokens. $transition-base moves into
mixins/_transition.scss, next to the mixin that uses it as a fallback.
* Convert icon-link and stretched-link variables to Sass token maps
Move the icon-link and stretched-link Sass variables out of _config.scss
and into component-scoped token maps, generating scoped CSS custom
properties instead. Updates each helper docs page to document the new
CSS variables.
* Fix icon-link underline color referencing a nonexistent v5 variable
.icon-link relied on the removed --link-color-rgb and --link-opacity
variables, so its underline never picked up custom link colors. Use
color-mix() against --link-color instead.
underline-opacity hardcoded --link-color, so pairing it with a themed
underline-color utility (or hovering) reset the underline back to the
link color instead of fading the intended theme color. Route
underline-color through a shared --underline-color custom property,
same pattern as our bg/fg/border opacity utilities, and have
underline-opacity read from it with currentcolor as a fallback.
* Add keyline (.5px) border width
* Add layered shadow system with color, opacity, and strength tokens
* Docs: document shadow color, opacity, and the new .shadow-xl size
* Docs: add keyline example to border width utilities
* Docs: use keyline borders on header menus and search input
* Add --box-shadow-xs token and .shadow-xs utility
Introduce a smaller box shadow between the existing default and sm sizes,
and expose it through the shadow utilities.
* cspell
* Scope shadow color and opacity to non-inheriting local vars
Shadow color and opacity utilities now compose through local --sc/--so
variables (like --bc for border-color) instead of setting --shadow-color
and --shadow-opacity directly, so .shadow-{color} and .shadow-opacity-*
no longer leak into nested .shadow-* descendants. The $shadows map
(scss/_config.scss) reads var(--sc, var(--shadow-color)) and
var(--so, 1), keeping --shadow-color/--shadow-strength as the
cascading global defaults. Removes the now-unused at-property utility
key since no utility needs the cascading opt-out anymore.
Updates the shadows docs with a nested-elements example and callout,
and adds a migration guide entry.
* format
* fix
* Port typography Sass variables to CSS custom properties
Move heading, paragraph, description list, and legend styling from
build-time Sass variables to a runtime `$type-tokens` map alongside
their consumer in `_reboot.scss`, and tokenize related hardcoded
margin/padding values against the `--spacer-*` scale. Also split
`_type.scss` into `_lists.scss` and `_blockquote.scss`, and relocate
`.initialism` next to `abbr` in Reboot, so each partial only defines
and consumes its own tokens.
* bump bw
Uncomment and repoint the ScssDocs references that predate the v6
color/theme refactor (they pointed at markers removed from
scss/_config.scss). Cross-link to the Color and Theme customize docs
instead of duplicating the $colors/$theme-colors Sass maps that are
already documented there in full.
- css-variables: drop the redundant dark mode root-variables section, note
light-dark() resolution, add a component-token override example, remove the
stale v5.2.0 reference
- javascript: remove the duplicate React example callout
- migration: mention the v5-to-v6 migration skill for AI coding agents
- color-modes: document the actual v6 mechanism (light-dark() + color-scheme):
system preference by default with data-bs-theme override, and correct the
$color-mode-type default (media-query)
- components: write the Theme variants section (--bs-theme-* tokens, .theme-*
classes, usage examples)
- rtl: highlight the changed line in Required HTML; restore the border around
the live demo by wrapping it in bd-code-snippet
- optimize: add a lean-Sass commented-import example, clarify the lean-JS
side-effect import, and replace the Unused CSS stub with a working PurgeCSS
setup for static HTML
Fixes#42616
Input and button datepickers are only created on focus/click, so
data-bs-selected-dates never showed up until you interacted with the
field. Only inline datepickers were auto-initialized on load.
Extend the DOMContentLoaded auto-init to also cover any datepicker with
preselected dates so the value renders immediately.
Reset the native <dialog> UA `overflow: auto` (which made the dialog
itself a scroll container) and add `min-height: 0` to `.drawer-body`
so only the body scrolls. Previously the dialog and body each showed
a scrollbar when drawer content overflowed (e.g. the docs mobile nav).
* OtpInput: fix click-to-focus and overwrite-on-retype
The single-input rewrite left two interaction gaps: clicking a slot
didn't position the caret there (slots had pointer-events: none and
focus always jumped to the end), and retyping inserted instead of
overwriting, so preceding digits shifted along.
Keep the single accessible input but make its interaction faithful to
the input-otp model:
- Represent the active slot as a selection range so the next keystroke
overwrites a filled slot or appends to an empty one
- Intercept single-char typing and backspace via beforeinput for
overwrite semantics; paste/autofill/IME still flow through input
- Make slots clickable (pointerdown) to position the caret, clamped to
the first empty slot
- Land focus on the first empty slot instead of the end; track the caret
with a document selectionchange listener
* bump bundlewatch
* OTP: focus the input natively on tap to fix iPadOS keyboard dismiss
The slots overlaid the input with pointer-events: none and the JS called
input.focus() programmatically after preventDefault()-ing the tap. On
iPadOS that raises the on-screen keyboard then dismisses it instantly,
because the keyboard must be raised by a genuine, un-prevented gesture on
the input itself.
Let the input receive taps (pointer-events: auto) so focus — and the
keyboard — come from the native gesture. Map the tap's x-coordinate to a
slot and set the caret in the focus handler once focus settles; when
already focused, reposition immediately (preventDefault is safe then).
Reported on iPadOS 26/27 by @coliff.
* Bump bundlewatch
* OtpInput: cover tap-to-focus, beforeinput, and caret behavior
Adds unit tests for the native tap-to-focus (iPadOS keyboard) fix,
beforeinput overwrite/backspace/append semantics, tap clamping, paste
caret placement, selectionchange sync, the public focus() method, and
beforeinput listener cleanup on dispose. Brings branch coverage back
above the 89% threshold.
* v6: Preserve component radii after bumping $radius to 1rem
Changing the default $radius from .5rem to 1rem doubled every step in the
$radii scale. Remap component and root radius token references down the
scale so their absolute radii stay the same (--radius-5 -> --radius-3,
--radius-7 -> --radius-4, --radius-9 -> --radius-7), and align the
border-radius mixin defaults. The $radii map and .rounded-* utilities are
intentionally left on the new base so opt-in utilities become rounder.
* Revert "v6: Preserve component radii after bumping $radius to 1rem"
This reverts commit 2408a015a3.
* Add --box-shadow-xs token and .shadow-xs utility
Introduce a smaller box shadow between the existing default and sm sizes,
and expose it through the shadow utilities.
* Docs: collapse page meta dependencies into a count with tooltip
Replace the inline list of dependency links with a single count that
reveals the full list on hover, and drop the now-unused .bd-page-meta
styles.
* Docs: shrink the table of contents as the footer scrolls into view
Add a small docs helper that tracks how far the footer overlaps the
viewport and exposes it as --bd-toc-footer-overlap, so the sticky TOC
height shrinks instead of sliding under the footer.
* Docs: refine example snippet and ad styling
Tokenize the example radius via --bd-example-radius, give resizable
examples an inset preview with a shadow-xs container, and simplify the
Carbon ad wrapper.
* Rebuild dist
Regenerate compiled CSS and JS to pick up the new --box-shadow-xs token
and resync the distributed bundles with source.
* Revert "Rebuild dist"
This reverts commit ecc1f7f847.
* ScrollSpy: deterministic active-section detection
Replace the scroll-direction + sequential-offsetTop heuristic (which
depended on IntersectionObserver entry order and mis-highlighted when
several sections shared the viewport) with a deterministic geometric
model: the active section is the deepest one whose top has scrolled to
or above an activation line near the top of the scroll root, read fresh
from getBoundingClientRect on each (rAF-throttled) scroll. At the bottom
the last section wins; above the first nothing is active.
Also: settle on scrollend (with a scroll-idle fallback) to restore the
URL hash via replaceState and move focus to the target after a
smooth-scroll navigation; escape section ids via parseSelector so dotted
/special-character ids no longer throw; add a topMargin option for the
activation line.
Supersedes #41016. Fixes#37858, #39198, #39248, #36387, #40526.
* docs wip
* rewrite more, add debugger to docs to illustrate
* missing test file
* ScrollSpy: fix CI — cspell, bundlewatch, branch coverage
- Add 'Fpath' to the cspell dictionary (from the #%2Fpath encoded-id example)
- Bump the four JS bundlewatch thresholds for the rewritten ScrollSpy
- Add option-derived activation-line tests (topMargin %/px, derived rootMargin
with/without a scroll root, non-numeric topMargin, explicit rootMargin,
overflow state, observer rebuild no-op, resize listener add/remove) to lift
branch coverage from 88.63% back over the 89% threshold (now 89.21%)
* Skill: add ScrollSpy migration section to match the guide
Mirror the migration.mdx ScrollSpy changelog in the migration skill:
IntersectionObserver rewrite / activation line, removed offset+method
options, new topMargin, rootMargin default null, threshold default [0],
smoothScroll hash+focus restore, and getElementById id resolution.
Keeps the skill and guide consistent as this PR lands ScrollSpy.
* Add a claude file
* Docs: route CLAUDE.md to a tool-agnostic AGENTS.md
Rename the agent guide to AGENTS.md (the emerging cross-tool convention
used by Copilot, Cursor, Codex, etc.) and leave CLAUDE.md as a one-line
`@AGENTS.md` pointer so Claude Code keeps working without duplicating
content. Heading made tool-agnostic.
* wip
* Skill: correct v5→v6 migration guide and add new-component coverage
- Close button: keep the empty .btn-close (CSS-mask icon over currentcolor);
drop the wrong 'add a child SVG' instruction that double-rendered the icon,
and note .btn-close-white is gone (set text color instead)
- Border radius: remove the fabricated $border-radius-2xl rename; document the
real $radius base + $radii map (0-9) + --radius-* tokens
- Font sizes: note lg+ are fluid clamp() values (not exact rems) and list the
full xs-6xl scale
- Add a 'Rebuilt behavior & new components' section: carousel→scroll-snap with
opt-in autoplay, scrollspy→IntersectionObserver, the new components
(combobox, chips, datepicker, range, strength, otp-input, nav-overflow,
toggler), util/backdrop.js removal, CSS @layer, and --bs-*-rgb removal
- Extend the Phase 6 grep checklist for all of the above
* Skill: align migration guide with migration.mdx changelog
- Remove the 'ScrollSpy → IntersectionObserver' note: v5 (5.2+) already used
IntersectionObserver, so it's not a v5→v6 change (the docs changelog omits it)
- Expand carousel coverage to match the changelog: ride→autoplay, wrap→ends,
removed control/caption/dark/stacked classes, .carousel-overlay requirement,
control-icon renames
- Add the remaining new components (submenu, stepper, avatar, form-adorn, prose)
- Note the .rounded-* remap + --radius-pill, and link-*→underline-* utilities
- Extend the Phase 6 grep list accordingly
* Docs: fix self-contradictory border-radius migration note
The Sass deprecation list said to use `$border-radius-2xl`, but the
Utilities section (and the source) removed the whole `$border-radius-*`
family in favor of the `$radii` map / `--radius-*` tokens. Point the
note there instead.
* Docs: note removal of focustrap and scrollbar utilities
#42595 removed util/focustrap.js and util/scrollbar.js (dead code after
the native <dialog> Dialog/Drawer rewrite). Record them alongside the
existing util/backdrop removal in both the migration skill and the
migration guide changelog.
* Fix CI on migration docs: lint, spelling
- Split the v5/v6 namespace-vs-import example into two code fences so the
duplicate `const tooltip` no longer trips eslint's no-redeclare, and add
the blank line after the import
- Add currentcolor, Datepicker, focustrap, oklab, oklch to the cspell
dictionary; reword 'inerting' and 'Unlayered' to avoid coined words
* Remove .DS_Store from dist building
* fix
* Build: exclude .DS_Store via zip -x instead of deleting files
Use zip's own `-x "*.DS_Store"` exclude in both the examples zip and the
release-zip script, rather than finding and removing files first. Cleaner
(doesn't mutate dist), and fixes the eslint error from filtering inside a
for…of loop header.
Both became dead code with the Modal->Dialog / Offcanvas->Drawer rewrite:
the native <dialog> element provides the focus trap and top-layer
inerting, and the scroll lock is now :root.dialog-open in CSS. Nothing in
js/src imports either utility and neither is part of the public bundle
export — only their own unit specs referenced them.
Removes the source modules, their committed dist builds, and their specs.
* Sanitizer: block data:/vbscript: URLs in allowed attributes
The sanitizer's SAFE_URL_PATTERN only rejected javascript:, so a
data:text/html (or vbscript:) URL in an href/src passed the allowList —
an XSS vector via data-bs-title/data-bs-content. Reject data: and
vbscript: in SAFE_URL_PATTERN and re-allow only safe base64 image/video/
audio data URLs via a restored DATA_URL_PATTERN. Fixes#42443.
* Bump bundlewatch size thresholds
* Sanitizer: drop redundant 0-9 from base64 data-URI char class
\d already matches 0-9, so the explicit 0-9 in the same class was dead
weight. Functionally identical; clears the CodeQL overly-permissive-range
alert on the overlap.
* Build: bump bundle.js bundlewatch threshold for sanitizer additions
* Popover/Tooltip: allow showing content set only via setContent()
show() gated on _isWithContent(), which read config title/content and
ignored content supplied through setContent(). A popover whose content
was set only via setContent() could therefore never be shown. Count
setContent() content in the gate via a shared _hasNewContent() helper.
Fixes#40525.
* Menu: keep open when clicking inside a form within the menu
clearMenus only skipped auto-close for input/select/option/textarea/form
tag names, so clicking a form's label/button/etc. inside a menu closed it
— breaking the documented forms-in-menu example. Skip auto-close for any
click inside a form contained in the menu. Fixes#41803.
* Bump bundlewatch size thresholds
* Tests: assert dialog-open on documentElement in dispose-while-open specs
The dispose-while-open specs added in #42544 asserted the scroll-lock
class on document.body, but #42545 moved the lock to the root element
(documentElement). The two changes were each green in isolation but
broke once both landed on v6-dev. Align these specs with the rest of
the suite, which already asserts on documentElement.
* Build: bump bundlewatch thresholds for cumulative JS growth on v6-dev
bootstrap.bundle.js (83.15KB) and bootstrap.js (54.39KB) now exceed the
prior thresholds after the dialog/drawer/tooltip/popover/menu fixes
landed; each PR bumped only relative to its own base.
* Docs: use <button> for navbar menu toggles instead of <a href="#">
A menu toggle is a button, not a link. Replace the navbar dropdown
toggles' `<a href="#" role="button">` with semantic `<button>`
(.nav-link already resets button styling). Fixes#40995.
* Docs: show how to open/close/toggle a menu via the JS API
The Via JavaScript section only showed instantiation. Add an example
using getOrCreateInstance().show()/hide()/toggle(). Fixes#37042.
* Docs: document delegated tooltips via the selector option
Add an example initializing one Tooltip on a parent with the selector
option to cover many (and dynamically-added) triggers. Fixes#41020.
* Tooltip/Popover: reset hover state when show is prevented
A prevented (or not-in-DOM) show() returned early without clearing
_isHovered, leaving it stuck true. For click-triggered tips that made
every later click hit the _enter() early-return, so the tip never
reopened after one preventDefault(). Reset _isHovered on the early
return. Fixes#39861.
* Tooltip/Popover: coerce boolean title/content to strings
data-bs-title="true" / data-bs-content="false" are auto-converted to
booleans by the data-API, which failed the (null|string|element|function)
type check and threw. Extend the existing number-to-string coercion in
_configAfterMerge to booleans. Fixes#41925.
* Bump bundlewatch size thresholds
* Tab: don't hijack modifier+arrow keyboard shortcuts
_keydown preventDefault'd arrow keys regardless of modifiers, so
Alt+Left/Right (browser history nav) and similar shortcuts were
swallowed inside a tablist. Ignore the event when alt/ctrl/meta is
held. Fixes#38565.
* Docs: clarify Escape behavior in menu auto-close section
Esc closes the menu while focus is within it (regardless of autoClose)
and returns focus to the toggle. Fixes#38035.
* Bump bundlewatch size thresholds
* Menu: don't hijack arrow keys inside contenteditable elements
The keydown handler only exempted <input>/<textarea>, so arrow keys were
captured (and preventDefault'd) inside contenteditable hosts like rich-text
editors. Treat contenteditable targets like inputs. Fixes#41021.
* Popover: match bottom arrow fill to header background
A bottom-placed popover with a header had its arrow filled with
--popover-bg, so it didn't match the header it points into. Use
--popover-header-bg for the arrow when a header follows. Fixes#40993.
* Docs: clarify tooltip/popover title/content function arguments
The function receives the attached element as its first argument (and as
its this reference), not just this. Fixes#40571.
* Bump bundlewatch size thresholds
* Dialog/Drawer: lock scroll on the root element to prevent layout shift
Apply the dialog-open scroll-lock (overflow: hidden) to the root <html>
element instead of <body>, so it sits on the same element as
scrollbar-gutter: stable. Co-locating them keeps the gutter reserved
while the scrollbar is hidden, so the page no longer shifts (and the
::backdrop covers the gutter instead of leaving a white strip) when a
dialog or drawer opens. Fixes#39221, #39972, #40908, #40659.
* Bump bundlewatch size thresholds
* Dialog/Drawer: don't scroll the page when restoring focus on close
Pass { preventScroll: true } when returning focus to the trigger after
close, so the page no longer jumps to the trigger (or to the top when
scroll-padding-top is set). Fixes#38070, #41615, #35391.
* Dialog/Drawer: restore body scroll when disposed while open
dispose() now closes the native <dialog> and removes the dialog-open
body class if the instance is torn down while still open (e.g. an SPA
route change), instead of leaving overflow: hidden stuck on the body.
Fixes#35934, #39910.
* Bump bundlewatch size thresholds
Update multiple example pages to new utility naming and tokens for consistency. Replaced legacy text-*/display-*/bg-* classes with fg-*/fs-* and bg-subtle-* variants, adjusted spacing and radii (p-5 → p-9, rounded-3 → rounded-5), removed redundant text-small classes, and applied small/fg-white tweaks where appropriate. Files changed: checkout, headers, jumbotron, pricing, product, and sidebars examples to align markup with the updated design system.
---------
Co-authored-by: Julien Déramond <juderamond@gmail.com>
Floating labels required the control to precede the `<label>` in the DOM
so the floating animation could use a sibling (`~`) selector. That order
made screen readers (e.g. NVDA) announce the label after the field's
value instead of before it.
Switch the SCSS to look forward with `:has()` so the `<label>` can come
first in the DOM while the CSS still reacts to the control's state
(focus, value, disabled, autofill). Reorder all examples, docs, and the
visual test to label-first markup to match.
Also give `.form-control-plaintext` its own copy of the control tokens so
its `var(--control-*)` references resolve, fixing phantom borders and
label misalignment.
Fixes#41362
* Add Range plugin for track fill, value bubble, and tick marks
Adds an opt-in JavaScript plugin (`data-bs-range`) that enhances
`<input type="range">`. A consistent cross-browser fill can't be done
with pseudo-elements alone (only Firefox has `::-moz-range-progress`),
so the plugin publishes the current value as a `--bs-range-value`
custom property that the track gradient consumes.
- Fill: colored track up to the thumb, themeable via `--range-fill-bg`
- Value bubble (`data-bs-bubble`): floating value that tracks the thumb
- Tick marks (`data-bs-ticks`): generated from a linked `<datalist>`
The bubble and ticks are siblings of the input, so they don't inherit
the input's `--range-fill-bg`; the plugin copies the resolved value onto
them and the CSS falls back to `--primary-base` so they're never blank.
Plain `.form-range` inputs are untouched. Includes unit tests and docs.
* Range: anchor positioning on .form-range and rename track fill token
- Make `.form-range` the positioning context (`position: relative`) and
drop the JS-added `.range-anchored` class; the bubble and ticks are
siblings of the input, so they already share its offset parent.
- Rename `--range-fill-bg` to `--range-track-fill-bg` for accuracy.
- Keep SCSS custom properties unprefixed (the build adds `--bs-`) and
have the plugin read/write the prefixed names, matching the codebase.
- Trim obvious comments.
* Bump bundlewatch JS size limits for the Range plugin
* Range: make it a JS component with a wrapper, consolidate the CSS
Restructure range as an always-JS component so the fill, value bubble,
and tick marks are driven by a single `--bs-range-fill` ratio in CSS.
- `.form-range` is now a wrapper that owns the tokens; the input takes
`.form-range-input`. Children inherit the tokens, so the old JS color
copying and px positioning are gone.
- The plugin only sets `--bs-range-fill` (0–1) and the bubble text; the
track gradient, bubble position, and tick positions are pure CSS calc.
Drops `_thumbWidth`, `_inheritFillColor`, the resize listener, and the
`.range-anchored` class.
- Value bubble reuses the tooltip markup/styles instead of duplicating a
pill and arrow. Tick marks are generated from the linked `<datalist>`
and positioned per-value (handles uneven values); tick coloring dropped.
- Auto-inits every `.form-range`; rename fill token to
`--range-track-fill-bg`.
- Validation moves to `.form-range-input` with a `:has()` feedback toggle.
- Add the "New" badge to the Range sidebar item and document the breaking
changes in the migration guide.
* Range: lay out tick marks with CSS grid instead of absolute positioning
Build `grid-template-columns` from the gaps between the datalist values
so each tick lands on a grid line — this handles unevenly-spaced values
just like the old per-tick calc did, but keeps the ticks and their labels
in normal flow (the container sizes to fit the labels instead of them
overflowing an absolutely-positioned box). Inset by half the thumb so the
end ticks align with the thumb travel.
Also wraps the token map in the `custom-property-no-missing-var-function`
stylelint disable (matching _strength.scss). Includes the disabled-track
fill styling.
* Nudge bundlewatch JS limits after rebasing onto v6-dev
* fix bubble, grid, ticks, and more
* comment
In Safari, "list-style: none" removes the list semantic role, so lists are
no longer announced by screen readers. Using "list-style-type: \"\"" keeps the
same visual result while preserving the list role.
Ports twbs/bootstrap#41778 to v6, plus the new v6 list containers (stepper,
menu, docs search results). Summary marker removals (accordion header,
details summary) are intentionally left as "list-style: none".
* Convert list group and card group to container queries
Replace viewport media queries with container queries for the responsive
.*:list-group-horizontal variants and the .card-group row layout, using the
existing container-breakpoint-up mixins. Both now respond to the width of a
parent query container (e.g., .contains-inline) rather than the viewport.
Update the docs to reflect the new behavior, flip css_media to container, and
list both components under the container queries guide.
* Document container query migration for card group and list group
* Fix doubled card-group borders by overlapping adjacent cards
The v6 border model moved borders off the outer .card onto the inner
segments (.card-header, .card-body, .card-list, .card-footer) and the card
images use outlines. The card-group seam code still removed border-inline-start
from .card, which no longer has a border, so adjacent cards rendered doubled
borders at every seam (body, header, and footer).
Pull each subsequent card back by one border width with a negative inline
margin so its leading edges overlap the previous card's trailing edge,
collapsing every seam into a single line.
* Fix doubled border between card body and footer
A middle .card-body/.card-list draws a bottom border to divide itself from the
next segment, but .card-footer draws a full border including its top edge, so
the shared seam rendered as a doubled border whenever a footer followed a body
that wasn't the first child (e.g. image + body + footer, or header + body +
footer). Drop the body/list bottom border when a footer immediately follows so
the footer owns that divider.
* Add icon, fix some copy
* fix
Re-creating a component on an element that already has one (e.g. `new
Toast(el)` twice) silently overwrote the instances registry, orphaning the
previous instance with its event listeners and timers still attached. Dispose
the existing instance before registering the new one so it is cleaned up
instead of leaking, while keeping `getInstance()` returning the latest instance.
Also guard `_queueCallback` so a transition completion callback is skipped once
the instance has been disposed, preventing the `this._element is null` error
when `dispose()` is called mid-transition.
Closes#37245Closes#41473
Under Safari page zoom, programmatic smooth scrolls (scrollBy/scrollTo with
behavior smooth) mis-scale and overshoot the target: a one-slide jump sails
well past it and the restored scroll-snap visibly yanks the slide back. This
happens whether or not snapping is suspended during the scroll, so no
snap-configuration tweak avoids it - native smooth scrolling driven by user
gestures is fine, but any programmatic smooth scroll is affected.
Replace the native smooth scroll + settle-watcher with a JS-driven rAF
animation (_animateScroll): step scrollLeft to the target over SCROLL_DURATION
(300ms) with an ease-in-out cubic, using instant scrolls per frame. This
sidesteps Safari's bug entirely and gives every programmatic jump (prev/next,
indicators, wrap, and the seamless loop) a consistent duration. Reduced motion
and the no-requestAnimationFrame path jump straight to target.
Removes the now-unneeded _restoreSnapWhenSettled/_afterScrollSettles
overshoot-detection machinery. Reworks the unit tests to the new seam and adds
coverage for the animator: eased stepping, frame cancellation, reduced motion,
and the no-rAF fallback.
* Rework OTP input as a single accessible input with rendered slots
Rebuild the OTP component around one real <input> rendered as separate
digit slots (the input-otp/shadcn model) so assistive tech, password
managers, and SMS autofill treat it as a single field — addressing the
accessibility feedback in twbs/discussions#42486.
- Replace the six-input markup and per-digit aria-labels with one labelled input
- Add a type option (numeric/alphanumeric/alpha) and glyph-based masking
- Make length a real option (falls back to maxlength); add groups/separator
- Standardize naming on bs.otpInput; events complete.bs.otpInput /
input.bs.otpInput now expose event.value
- Move validation styling onto the rendered .otp-slot elements
- Rewrite docs and unit tests for the single-input model
* Fix bundlewatch sizes and cspell dictionary for OTP input
- Bump bundlewatch maxSize thresholds to account for the OTP component
- Add "autofilled" to the cspell dictionary used in the OTP docs
* bump bundle
* Fix dark mode on built site by avoiding Lightning CSS light-dark() polyfill
Lightning CSS was lowering native light-dark() to a --lightningcss-light/dark
custom-property toggle because our browserslist floors predated native support.
That polyfill breaks data-bs-theme dark mode on the minified (production) CSS,
so dark examples rendered light on Netlify while working in dev.
- Bump browserslist floors to the first versions with native light-dark()
(Chrome/Edge 123, Safari/iOS 17.5; Firefox 121 already covered)
- Exclude Features.LightDark in css-minify as a guard against regressions
* Update .browserslistrc for browser support and comments
Removed comment about CSS light-dark polyfill and updated browser support.
* Bump browserslist floors to Chrome/Edge 130, Firefox 132, Safari/iOS 18
Raises support floors as far as possible while keeping ~90.8% global
coverage, staying on versions with native light-dark() so Lightning CSS
does no polyfilling.
* Make carousel autoplay opt-in via boolean `autoplay` option
Replace the `ride` option with a boolean `autoplay` option (default
`false`), so carousels are static by default and only autoplay when
explicitly opted in with `data-bs-autoplay="true"`.
This removes the confusing `ride="true"` behavior that started
autoplaying only after the first user interaction, and the cryptic
`ride="carousel"` string value. Addresses the first two points of #32649.
* Stop carousel autoplay on interaction and add play/pause control
Address the WCAG 2.2.2 (Pause, Stop, Hide) concern in #32649.
Behavior: once a user takes control of an autoplaying carousel — clicking
a control or indicator, using the keyboard, or swiping — autoplay stops
for good instead of resuming, respecting their intent. A new runtime
`_playing` flag tracks autoplay intent and gates `_maybeEnableCycle()`.
Control: add a `.carousel-control-play-pause` button as the discoverable
pause/stop mechanism WCAG actually requires (a hover-only pause does not
qualify). It toggles autoplay, reflects state by swapping its icon (via
pause-fill/play-fill CSS mask icons) and `aria-label`, and can also start
autoplay on an otherwise static carousel.
Includes unit tests, SCSS tokens/styles with dark-mode support, docs, and
a migration note.
* Rebuild carousel on CSS scroll snap
Replace the float/translateX engine and custom swipe handler with a native
horizontal scroll-snap container. Sliding, touch dragging, momentum, and
keyboard scrolling now come from the browser; JavaScript only layers on
autoplay, the prev/next/indicator controls, and active-slide syncing via an
IntersectionObserver.
This unlocks features the old engine couldn't do, all via CSS custom
properties on `.carousel`:
- Multiple slides per view (`--carousel-items`) with responsive
`.carousel-items-*` utilities
- Peek of adjacent slides (`--carousel-peek`) and gaps (`--carousel-gap`)
- Variable-width slides (`.carousel-auto`) and center mode (`.carousel-center`)
`.carousel-fade` becomes a stacked-opacity mode that upgrades to a View
Transition where supported. `touch: false` now applies `touch-action: pan-y`.
The markup, public JS API, and slide/slid events are preserved; the
transitional `.carousel-item-{start,end,next,prev}` classes and the
`.carousel.pointer-event` helper are removed.
Includes a full unit-test rewrite, SCSS engine, docs with multi-item/peek/
variable-width examples, and a migration entry.
* Add carousel stacked layout and dot indicator variants
Rename the per-slide layout tokens for clarity and add new layout options:
- `--carousel-peek` -> `--carousel-items-peek`, `--carousel-gap` ->
`--carousel-items-gap` (both now carry a length unit so they're safe inside
the flex-basis `calc()`)
- New `--carousel-gap` for spacing the stacked layout's rows
- New `.carousel-stacked` layout (controls outside the inner viewport, above or
below) and `.carousel-indicators-dots` round indicator style
- Fix the `.carousel-item` flex-basis so the peek isn't subtracted twice (the
`padding-inline` already insets the content box)
* Add carousel `ends` option (stop/wrap/loop) and robust scroll navigation
Replace the `wrap` boolean with an `ends` option taking `stop`, `wrap`
(default), or `loop`:
- `stop` disables the prev/next controls at each end (moving focus to the
opposite control first, so focus is never lost)
- `wrap` jumps from the last slide back to the first (and vice versa)
- `loop` continues seamlessly into a transient clone of the destination slide,
then teleports to the real one with no visible backward jump (single-slide
scroll layouts only; otherwise falls back to `wrap`)
Rework programmatic navigation to scroll the viewport directly with `scrollBy`
instead of `scrollIntoView`, suspending scroll-snap for the duration and
restoring it once the scroll settles. This fixes multi-slide jumps (indicator
clicks, reaching the last slide) that `scroll-snap-stop: always` previously
clamped to one slide, avoids yanking the page to an off-screen carousel, and
works in RTL. Navigation steps are now measured from the live scroll position
so a stale active index can't make a control silently no-op.
Includes unit tests covering the ends modes, the loop transition, end-control
disabling, and the scroll-settle behavior.
* Document carousel end behavior, stacked layout, and indicator variants
Add docs and examples for the new stacked carousels (top, bottom, and with
dot indicators), the `ends` option (wrap/stop/loop) under a new "End behavior"
section, and refresh the options table and intro for the scroll-snap model.
* Redesign carousel controls, indicators, and layout
- `.carousel` is now a flex column by default (controls/indicators sit in the
flow above or below the slides); overlaying them on top of the slides moves
to a new `.carousel-overlay` modifier.
- Rename the control-icon classes to `.carousel-icon-{prev,next,pause,play}`,
painted with `currentcolor` so they inherit the surrounding text/button color
and work inside `.btn-*`. `.carousel-control-play-pause` is now just a
behavior hook that shows the matching glyph via `.paused`.
- Redesign indicators as pills: the active one widens, and while autoplaying it
fills like a progress bar over the slide's interval
(`carousel-indicator-progress` keyframes driven by `--carousel-interval`).
- Remove `.carousel-caption` and its `--carousel-caption-*` tokens.
* Add carousel autoplay progress, drop `touch` option and View Transitions
- While cycling, toggle a `.carousel-playing` class and expose the wait as
`--carousel-interval` so CSS can animate the active indicator's progress
fill. Schedule each tick from the slide being navigated *to*, so per-item
`data-bs-interval`s don't lag a slide behind.
- Remove the `touch` option: horizontal dragging is part of the native
scroll-snap container, so there's nothing left for JavaScript to toggle.
- Fade is now a plain CSS opacity crossfade; drop the View Transition path,
which double-animated against the CSS transition and visibly stuttered.
* Update carousel docs, examples, and fixtures for the redesign
Switch the docs examples, homepage/cheatsheet examples, and test fixtures to
`.carousel-overlay` + `.carousel-icon-*` and drop `.carousel-caption`. Document
the stacked-by-default layout, the `.carousel-overlay` modifier, the renamed
control-icon classes, the autoplay progress indicator, and the removed `touch`
option and captions in the migration guide.
* fix bundlewatch
* Fix MDX emphasis-style lint error in migration guide
* Default carousel `ends` to `loop`
Change the default end behavior from `wrap` to `loop`, so carousels scroll
seamlessly past the ends by default (falling back to `wrap` where seamless
looping doesn't apply). Tests that exercise the wrap jump now request it
explicitly.
* Clean up carousel styles and refresh docs
- Remove the legacy `--carousel-control-*` tokens and the entire
`carousel-dark-*` token map / `.carousel-dark` block and dark color-mode
rule; dark styling now rides on `light-dark()` in `.carousel-overlay`.
- Flip RTL prev/next icons with `transform: scaleX(-1)` instead of swapping
mask images, and drop the dead commented-out overlay rules.
- Drop the now-unused `colors` and `color-mode` Sass imports.
- Docs: lead the end-behavior section with `loop` (the new default), rework
the dark example onto `.carousel-overlay-controls` + `.btn-*` controls, and
round the slide corners.
* Remove unused `$enable-dark-mode` Sass flag
Its last consumer was the carousel's dark color-mode block, now removed in
favor of `light-dark()`, so the flag is no longer referenced anywhere.
* Clean up carousel autoplay timer and listeners on dispose
Clear the pending autoplay timer in `dispose()` so a queued tick can't fire
after teardown and throw on the now-null `_element`, and remove the
`pointerdown` listener bound to the viewport (`.carousel-inner`)—which
`super.dispose()` doesn't cover, since it only drops listeners on `_element`.
Adds tests for both.
* Simplify carousel active indicator tokens
Drop the `--carousel-indicator-active-width` and `--carousel-indicator-active-bg`
tokens, which only carried `null` fallbacks, and inline their values directly on
the active indicator.
* Use button controls in carousel examples, fixtures, and docs
Replace the removed `.carousel-control-prev`/`.carousel-control-next` classes
with `.btn-icon btn-sm` buttons across the docs examples, homepage and cheatsheet
examples, and JS test fixtures. Also drop the leftover `.carousel-indicators-dots`
class and the obsolete "Custom transition" docs section, and correct the
peek/gap token names (`--carousel-items-peek`/`-gap`) in the migration guide.
* Remove `$enable-dark-mode` from the customization docs
Follow-up to removing the now-unused flag: drop its row from the global options
table and the sentence about disabling dark mode via Sass.
* Bump JS bundlewatch size limits for the carousel rewrite
* Harden carousel navigation, looping, and autoplay edge cases
Audit fixes:
- Measure the "current" slide in `to()` from the live scroll position
(`_navIndex()`) rather than the async `_activeIndex`, so an indicator/control
used mid-scroll compares against where the viewport actually rests.
- Validate the `ends` option in `_configAfterMerge`, falling back to the
default (`loop`) for unknown values so navigation and end-control logic agree.
- Strip ids from the entire cloned subtree during a loop transition, not just
the clone root, to avoid duplicate ids while the clone is on screen.
- Sync the active slide and fire `slid` after a programmatic scroll settles
when no IntersectionObserver is available.
- Stop autoplay at the last slide under `ends: 'stop'` instead of re-arming a
timer that can never advance.
Adds tests for each, plus hover-pause and dispose-mid-loop coverage.
* Remove unused `--carousel-indicator-opacity` token
The redesigned pill indicators no longer fade via opacity, so the token has no
remaining consumers.
* Expand carousel docs, examples, and migration notes
- Document the `ends` option, the removed `.carousel-control-*` / `.carousel-dark`
classes and v5 tokens, and the removed `$enable-dark-mode` flag in the
migration guide.
- Clarify the `.active` starting-slide and indicator notes, theme the overlay
example controls (`.btn-subtle .theme-secondary`), rework the per-item
interval example with a play/pause control, and sharpen the `slid` event
description.
- Add a play/pause control to the integration fixture, and fix a corrupted
custom-property reference in the homepage carousel example CSS.
* Bump JS bundlewatch limits for carousel audit fixes
* Move SVGs to CSS masks
* update migration, remove unused, fix a couple things
* Format
* Bump bundlewatch
* Properly size btn-close with mask
* Apply .check class directly to checkbox input, drop wrapper
The .check wrapper existed only to host the checkmark pseudo-element.
Since appearance: none controls render pseudo-elements (as .radio already
relies on), move .check onto the <input> itself and draw the checked/
indeterminate mark via a masked ::before. Removes the grid/:has machinery
and makes checkbox and radio markup symmetric.
* Use .form-field for list group radio example, matching checkboxes
* docs: prevent menus from being clipped in resizable examples
The resizable container needs overflow: hidden for the CSS resize handle to
work, which clips menus/dropdowns when they open. Render them with a fixed
positioning strategy in the live preview only so they can spill outside the
container, leaving the displayed markup untouched.
* docs: make the Astro dev server port configurable via PORT
Default to 9001 but allow PORT to override the dev/preview server port so
multiple worktrees can run side by side without colliding.
Copy edits across several docs pages: clarify .btn usage and theme classes (button.mdx); correct repeated/awkward 'drawer' phrasing and update responsive breakpoint syntax to the colon form (drawer.mdx); remove duplicated 'drawer' wording and clean navbar responsive copy (navbar.mdx); update Sass guidance from @import to @use/@forward terminology (customize/optimize.mdx); clarify 'modal' → 'modal dialog' and update form validation guidance to use data-bs-validate and :user-invalid (getting-started/approach.mdx); and revise display utility docs to show the new .{breakpoint}:d-{value} syntax with example adjustments (utilities/display.mdx).
* Update ampm-field to meridiem-field
The wrong specifier was used so the actual fix was no applied.
::-webkit-datetime-edit-ampm-field -> ::-webkit-datetime-edit-meridiem-field
* Enhance datetime fields for WebKit and Chromium
Added support for am/pm field in WebKit datetime edit.
* Add "new" badge to Stepper
It's new.
* Remove commented out
* Rearrange docs sidebar again to remove components groups, tweak a few things
* New default components page
* Fix swatch, update some content
* Revamp how we're doing themes in docs to be more instant
---------
Co-authored-by: nextgenthemes <nextgenthemes@users.noreply.github.com>
Minor documentation fixes across multiple site files:
- examples/sign-in: add meaningful alt text for the logo image for accessibility.
- components/dialog: add missing space in example button markup.
- components/navbar: update navbar example to use new prefix-style responsive class (`.{breakpoint}:navbar-expand`).
- forms/layout: update horizontal form docs to recommend `.{breakpoint}:col-*` usage.
- getting-started/approach: fix grammar/typos, correct docsref path, and clarify component modifier/variant naming (mention `.btn-solid` and `.theme-primary`).
- getting-started/javascript: adjust JS-required components list (add Dialog, remove Accordions/Modals lines).
- guides/migration: fix possessive "its" typos in breakpoint/container notes.
- helpers/stretched-link: correct placeholder title text.
- utilities/background: update example to use `fg-contrast-{name}` / `fg-{name}` classes instead of previous `color-*` naming.
These changes improve clarity, accessibility, and align docs with updated class naming conventions.
v6: docs: fix typos, examples, and utility class docs
text would always be white on black background
Update example code for background gradient usage
Update margin utilities docs for v6 spacers
Docs updated to reflect the v6 spacing scale: sizes now range from 0 through 9 (`.m-0`–`.m-9`) and the multiplier values for sizes 3–9 were adjusted.
Negative margin docs were changed to note that v6 only supports negative inline margins (`.ms--1`, `.me--2`) using `-1` and `-2` spacers and that the v5-style full negative utilities (e.g. `.mt-n1`) were removed.
The responsive examples were updated to list `.{breakpoint}m-0` through `.{breakpoint}m-9` and `.{breakpoint}m-auto`.
Replace legacy theme classes across examples with new utility classes and theme attributes. Changes include swapping .bg-dark/.navbar-dark/.text-bg-dark/.link-body-emphasis for bg-black, bg-90, fg-white, fg-body, adding data-bs-theme="dark" where appropriate, removing nav-pills, adjusting icon nav links to use flex-column and removing svg mb-1 spacing, and simplifying sidebar nav classes. Updated example files: album, cheatsheet, headers, navbar-static, navbars, and sidebars.
Reduce heading sizes and remove emphasis in feature examples. Unify
dark-theme styling, improve accessibility and layout, update Chart.js,
and replace text-white/text-secondary with fg-* utilities across
example pages.
Co-authored-by: Cursor <cursoragent@cursor.com>
Use interpolate-size and ::details-content transitions so accordions
open and close smoothly when motion is not reduced.
Co-authored-by: Cursor <cursoragent@cursor.com>
Replace deprecated utility classes with the updated names across site docs and examples. Changes include switching text-* classes to fg-*, text-bg-* badge classes to theme-*, and replacing clearfix with d-flow-root. Affected files: cover and drawer-navbar examples, spinner example, reboot, accessibility, columns docs, and versions page to keep examples consistent with the new utility naming.
Add btn-icon class to navbar toggler
Add the btn-icon utility class to the navbar toggler button in the navbar-fixed example to apply icon button styling. This change updates site/src/assets/examples/navbar-fixed/index.astro and keeps the existing SVG toggler markup and collapse behavior unchanged.
* Albums Example layout fixes
- navbar hamburger button - add btn-icon class
- align content at bottom of cards
- use a valid background color for albums (main content)
* Change link text color from text-white to fg-white
Suppress the native disclosure marker in WebKit by adding &::-webkit-details-marker { display: none; } to the accordion button styles. This prevents the browser's default triangle from overlapping the custom .accordion-icon and ensures consistent appearance across browsers
Issue discovered using Browserstack.
See comment: https://github.com/orgs/twbs/discussions/42398#discussion-10018925
* Utilities API and class improvements
* Expand utility API test coverage
* Update utilities API and border-radius docs
* Fix bundlewatch
* Introduce `@mixin generate-utilities-loop()`
* Add text wrapping utilities in Sass utilities API in the docs
* Copy updates, links, callout for postcss prefix, fix a border-radius
* inline warning
* error over warn
* Fix bundlewatch
* more copy edits
* fix layout and headings
* lint
---------
Co-authored-by: Julien Déramond <juderamond@gmail.com>
Replace generic "Flex item"/"Grid item" placeholders with descriptive words (e.g. "Align", "Items", "Start/End/Center/Stretch") across align-items, justify-items, and place-items docs. Add w-5 utility to flex examples to give consistent item widths so alignment demos render more clearly. Files updated: site/src/content/docs/utilities/align-items.mdx, justify-items.mdx, place-items.mdx.
* Adjust toast copy, placeholder, and font var
Update docs and styles: change toast example text to use "accent" wording, mark the default toast placement option as disabled to prevent it being selected as a valid value, and switch the table font variable from --bs-font-monospace to the standardized --bs-font-mono in _content.scss.
* fix typo
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* New border-radius tokens, --radius-*; update nav-overflow to work in more situations; fix disabled chip inputs; fix sizing of OTP and chip by removing it lol; fix vertical pills with new radius tokens
* Finish off improving radius scale
* fixes after rebase
* format
* Integrate new Pagefind custom components
Co-Authored-By: Julien Déramond <17381666+julien-deramond@users.noreply.github.com>
* fix some mobile styles, for fun, and fix color mode
* linter
---------
Co-authored-by: Julien Déramond <17381666+julien-deramond@users.noreply.github.com>
* Dont auto open toast in overlays dialog example
* switch slide up and down
* dialog animation improvements
* Reflect changes in dialog on Drawer
* Don't let dialogs run into viewport edge on mobile
* Improve dialog swapping
* Fix while in here
* remove .dialog-overflow hackery
* fix bundlewatch
* simplify eslint configs, modernize eslint config for docs js
* Simplify variants to 2 col
* More card layout improvement
* Improve card docs more
* text-body-secondary is now fg-2
* Update card styles a bit, fix some layout issues on card group
* Replace more instances of -* with --spacer-*
* Fix lint
* Docs: fix Bootstrap bundle loading consistency between dev and static builds
* Finish the fix for loading single copy of Bootstrap JS
---------
Co-authored-by: Mark Otto <markdotto@gmail.com>
* Use custom check/radio markup across docs
Replace Bootstrap .form-check markup with a unified form-field/.check pattern and inline SVG indicators. Radios now use a .radio class; checkboxes are wrapped in .check with SVG paths for checked/indeterminate states. Update examples (cheatsheet, checkout, heroes, list-groups, sign-in), list-groups CSS selectors (.check:has(input:checked), .check-input-placeholder, .radio rules), and documentation pages (list-group.mdx, forms layout/overview) to match the new structure.
* Fix for list groups example
With this refactor, our .fg-* and .bg-* and .border-* utilities can be modified by custom CSS, like in our blue theme example.
This also standardizes some nomenclature by using fg instead of text in the token names for theme values, better matching bg. Classes already use this, as do root fg tokens, so this is just a consistency update.
* Update utility API for children selectors
- Add new support for custom children selectors
- Add divide and space utilities
* Update bundlewatch
* metadata
* Start docs redesign, new page metadata fields
* wip
* more
* Update offcanvas references to drawer after rebase
Carry over frontmatter additions to drawer.mdx,
fix DocsLayout ToC to use drawer classes and dialog element,
update navbar.mdx dep title, and fix _toc.scss class name.
Made-with: Cursor
* woooooo
* fixes
* update metadata and more
* more improvements
* Some component updates, docs updates
* update
* add a bundlewatch script, fix bundlewatch
* bump
* fix
* dist
* Remove gradients for now
* Update format
* more wip
* Update Offcanvas docs, update transition
* make it all work
* Massive update to rebuild offcanvas as Drawer and share its code with Dialog
* Fix bundle
* fix some issues
* Update tests
* another
* fix
* dupe
* Migrate from infix to prefix
- Replace the breakpoint infix pattern (e.g., `.d-md-none`, `.col-lg-6`) with a prefix pattern using an escaped colon (e.g., `.md\:d-none`, `.lg\:col-6`),
- Rename `breakpoint-infix()` to `breakpoint-prefix()` and add
`css-escape-ident()` for leading-digit breakpoints like `2xl`
- Update `generate-utility()`, grid, and all component/helper loops
- Update containers, navbar, offcanvas, tables, list-group, stepper,
dialog, sticky, and stacks responsive classes
- Update SCSS and JS tests
- Update all docs
Made-with: Cursor
* fix for prefix
* fix that
* fix
* Update Sass and Theme docs to document mixins and functions better
Also remove some unused functions while we're here.
* document it instead
* Fix cspell, add local cspell so i can test in dev
* Rename Dropdown component to Menu
Replace the Dropdown component with Menu across the entire codebase.
All .dropdown-* classes are now .menu-* classes, data-bs-toggle="dropdown"
is now data-bs-toggle="menu", and the JS export is renamed from Dropdown
to Menu. Includes updated tests, docs, examples, site UI, and config.
* Add new Combobox component
Introduce a searchable select component built on top of Menu, with
single and multi-select support. Includes JS source, SCSS styles,
documentation, and migration notes.
* Add translucent variations for navbar, card, toast, and menu
New .navbar-translucent, .card-translucent, and .toast-translucent
styles with backdrop blur and saturation filters, plus corresponding
documentation sections.
* Update docs site nav, layout, icons, and misc fixes
Clean up docs site navbar SCSS (sticky shadow, remove commented code),
fix empty line rendering in code snippets, add font-size class to
masthead, and add #stack icon symbol.
* Rebuild dist files
* Added Complex section
I've added a new section called **Complex** to the **Stepper** component to demonstrate how this component can be used in different scenarios.
This is possible as part of: https://github.com/twbs/bootstrap/pull/42165
* Slight rephrase to match the rest of the docs
Slight rephrase to match the rest of the docs
* Updated the badge stepper
Updated the badge stepper to better illustrate how a "Complete" progress would work with multi-step "Complete" / "In-progress" / "Pending" statuses.
* Added vertical complex stepper example
Added vertical complex stepper example
* w-100 is not needed for vertical stepper
w-100 is not needed for vertical stepper
* Revamp
---------
Co-authored-by: Mark Otto <markdotto@gmail.com>
* Add stepper font size variable to tokens map
Since the `--stepper-size` container is customizable, it makes sense for the `font-size` to be as well, when using larger sizes, larger font size may also be required.
This also changes the default `font-size` to `-sm` size for the counter inside the bubble.
This is the perfect example where if we use the `-sm` variant, it makes the text feel more relaxed inside the bubble.
* Reduce stepper track size from 0.25rem to 0.125rem
This further relaxes the component by taking away the attention from the track itself, allowing bubbles and text to be more easily readable at a glance without feeling overcrowded.
The industry standard is 1px or 2px at max.
As a result, the stepper tracker has been reduced to down to `2px` from `4px`
For reference:
- Tailwind UI practices `2px` width: https://tailwindcss.com/plus/ui-blocks/application-ui/navigation/progress-bars#component-4b1efed043d1ab5688c705f2e27524f3
- Material UI practices `1px` width: https://material.angular.dev/components/stepper/overview
- Preline UI practices `1px` width: https://preline.co/docs/stepper.html
- Flowbite UI practices `1px` width: https://flowbite.com/docs/components/stepper/
- ReUI practices `1px` width: https://reui.io/patterns/stepper
* Add align-items start to horizontal stepper
This will make the text to always start at the top, regardless of whether other bubbles have a multi-line text or not.
* Fixed horizontal stepper text gap & text overflow
Fixes the horizontal bottom row being fixed in height, causing the spacing between the count bubble and the text not be the same as intended (as the gap dictates), nor as its vertical stepper counterpart.
This also fixes the text overflowing outside fixed boundaries, causing it to move in places it shouldn't be.
* Refactor to use logical properties
Fixed RTL mode by making use of logical properties instead of physical ones.
* Colored the right side stepper line
Colored the right side stepper line instead of the left side for active elements.
This is the natural way, if I reached the next step, then the edge leading to it should be colored in the color of the completed step.
* Fixed stepper width not account for stepper's gap
Fixed stepper width not account for stepper's gap
* Added complex stepper support for vertical steppers
- Added complex stepper support for vertical steppers.
- Added --stepper-text-gap CSS var (customizable spacing between text & bubble)
- Fixed text overflow for vertical steppers when the text is too long
* Restored 1fr for the rows template
Restored 1fr for the rows template. While I believed it looked better before, I'd rather keep the row size across all steps.
* tweaks
* make container query instead, add new utility to make container queries easier
* Remove stepper playground
---------
Co-authored-by: Mark Otto <markdotto@gmail.com>
* Adjust vertical padding and border width for nav links
Adjust vertical padding and border width for nav links
* Update scss/_navbar.scss
Co-authored-by: Mark Otto <markdotto@gmail.com>
* Comment out nav-link-border-color variable
Added support for an optional border-color
* Typo
Used , instead of ;
* Linter
* Reorder for consistency of states
---------
Co-authored-by: Mark Otto <markdotto@gmail.com>
* Update nav link & pill items height
Currently, `link` and `nav-pills` items height sit at `36px` (because they don't have any borders), while `tab`, and `underline` sit at `38px`, which perfectly matches the height of `input` and `button` components.
This PR adds an invisible border for the `link` and `nav-pills` items, so that all 4 `nav` variants share the exact same height, regardless of which is used, which makes it suitable to be used with other components, such as `input` or `buttons` for example, as described in this discussion: https://github.com/orgs/twbs/discussions/42145 without having discrepancy when it comes to elements height.
* Update scss/_nav.scss
Co-authored-by: Mark Otto <markdotto@gmail.com>
* Shortened the code for borders & pill active states
Shortened the code for borders by using `border` attribute.
Also applied the correct background for pill shaped items.
* Removed border from nav links in DocsSidebar
Removed the invisible border so that the sidebar remains as condensed as it was before.
---------
Co-authored-by: Mark Otto <markdotto@gmail.com>
* Migrate JS to ESM only
* fixes
* rerun dist
* fixes
* Address review feedback, restore babelrc, update script tags
* Make it shake(able)
* fixes for docs after going ESM
* update migration
* bundlewatch
* bump bundlewatch again
* Fix up docs and examples
* fix
* Review and update again with latest rebased changes
* more better, update spacing in prose
* Fixed the `pagination` component not matching the `input` / `button` components min-height
Fixed the `pagination` component not matching the `input` / `button` components min-height.
See discussion: https://github.com/orgs/twbs/discussions/42136
Feel free to reject if this component isn't supposed to be used like in my examples.
* Reordered the flex / min-height attribute order
Moved min-height attribute after the flex related attributes (to match the order from other components). It's a trivial change.
* New root defaults for inputs and buttons
Both the buttons and the inputs are too large for what they're designed for.
This PR normalizes the difference between variants by making them more uniform.
It also makes it match more closely to BS4, BS5, Tailwind, Catalyst, etc.
I don't want to repeat everything that I've wrote in the v6 feedback, so kindly please have a read at: https://github.com/orgs/twbs/discussions/42138
Feel free to decline this PR if you believe the current defaults are fine.
* Adjust button input vertical padding
Since line-height is `1.5`, the `-y` padding should have stayed the same at `.375rem` (that totals to `2.25rem` (`36px`) plus the borders, it's `2.375rem` (`38px)).
* Add some CSS vars to nav component, use nav in sidebar more, update toc and ads
* Massive update
* fix cspell
* More improvements
* update icons
* more updates
* revamp offcanvas
* Fix up few things
* order
* bump bundle
* unsure why this doesn't match locally
* Nav, stacks, and more improved
* color mode fixes
* sooooo much better
* cleanup, prevent lightningcss color-mix() to lab() conversion, remove more
* bump
* fixes
* more improvements
* more
* Restore 16px base font-size
* More
* Update docs CSS to account for font-size change
* Redo several components and tokens for font-size change
- Checks, radios, switches get new sizing to better match 16px base font-size. These are now way more consistent with one another.
- Updates other components to use new sizing as appropriate.
- Pagination now sized to match inputs/buttons.
- Clean up some other font tokens
* Fix
* fix code example
* Test out using a Sass map for component tokens
* improvements, show how root would work
* WIP updating components to use new map
* more
* fix unused vars, fix test
* Start form vars
* Improve some code work
* Amazing form-range update
- New CSS vars and tokens
- New mixins
* More CSS vars tokens
* OTP tokens
* Tons of tokens updates, also some validation improvements
* fix bundlewatch
* mdx lint
* more bundlewatch
* fixes
* fix dupe id
* Remove button-variables.scss, update buttons to use token maps
* more
* more
* improve tests
* more improvements, lots of docs updates
* bump bundle
* revamp so we can customize, update docs
* fix
* simpler
* fixes
* use mixin instead, check for null values
* better customizing maps
* improvements
* update docs, update bundle
`role="switch"` is automatically added to checkboxes with the switch attribute in Safari, but we still need to add `role="switch"` for Chromium and Firefox etc,
* First pass at datepicker via Vanilla Calendar Pro
* fixes
* optimize
* Docs updates, add advanced config
* rename attr
* edits
* Update datepicker docs, improve color modes, add tests
* New .form-adorn component for overlaying icons and text with inputs
* temp
* bump limits
* cleanup and simpler selectors
* few more tweaks
* Remove comment
* Fix multi-month, reorg some docs content, fix selections
* feat: add password strength component
- Add Strength JavaScript component with customizable scoring
- Add SCSS styles for strength meter and bar variants
- Add documentation page for password strength
- Add unit tests for strength component
* Bundle bump
* More bundle
* First pass at submenu support
* Remove unused constants
* Fix up linter errors
* Logical properties for placement
* Better docs playground for dropdowns
* refactor and update bundles
* more tests, fix broken tests
* more tests
* more
* more
* New .theme-* utilities for consuming the existing .theme styles, replace color-background helpers
* Update blue to be less indigo
* Rebuild metadata
* mdx lint
* Fix docs link while here
* Fix up some docs work while here
* links
* Clean up button vars, docs, fix up .btn-link
* more buttons docs cleanup
* Remove colored links for theme utilities
* Fix scssdocs
* Fix broken link
* Fix another link
* Migrate to Floating UI for tooltips, popovers, dropdowns
* Bump bundlewatch
* Dropdown tests
* add floating ui tests from claude
* more
* build sri
* more tests while here
* Add Dialog component using native HTML dialog element
New component that leverages the native HTML <dialog> element for modals
and non-modal dialogs with built-in backdrop and accessibility support.
Features:
- Modal dialogs using showModal() with automatic backdrop
- Non-modal dialogs using show() for persistent UI elements
- Static backdrop option (prevents close on outside click)
- Keyboard support (Escape to close, focus trapping for modals)
- Smooth open/close animations via CSS
- Events: show, shown, hide, hidden, hidePrevented
- Data API for toggling with data-bs-toggle="dialog"
JavaScript:
- js/src/dialog.js - Main component class
- js/tests/unit/dialog.spec.js - Unit tests
- js/tests/visual/dialog.html - Visual test page
SCSS:
- scss/_dialog.scss - Component styles
Docs:
- Add dialog component documentation
- Update modal docs with dialog references
* Modal examples now Dialog examples, needs improvement
* Remove all of Modal
* real words
* Fix layout while I'm here
* Lint Markdown
* New dialog size options
Move --bs-theme-* variable usage from CSS variable definitions to property
declarations. This ensures the fallback works correctly:
- color: var(--bs-theme-contrast, var(--bs-badge-color))
- background-color: var(--bs-theme-bg, var(--bs-badge-bg))
Also fixes .badge-subtle variant to use same pattern.
- Add $nav-gap and $nav-link-gap variables for flexbox gap layout
- Rename nav link color variables to use --bs-fg-* tokens
- Add active state variables ($nav-link-active-color, $nav-link-active-bg)
- Add hover background variable ($nav-link-hover-bg)
- Update .nav and .nav-link to use flexbox with gap
- Update related documentation
* Split font utilities, update API to do more pseudo classes, drop display type classes
* Improve display docs, remove print display utils
* Document gap and grid utils, rename a couple classes
* better url
* Fix color-mix
* Undo utilities API change for now
* fix api changes
* Bundlewatch
* Linter cleanup
* Massive utilities update
- Split several utilities across smaller pages
- New underline thickness utility
- Updated text-wrap utility to use `text-wrap` property, removes white-space utils
- Adds a dozen new width utilities for now—TBD if we keep this, they're not documented yet
- Redoes the color utilities—color, background color, border color, link color—to use color-mix without attribute selectors. Faster, simpler, better support for overriding other components.
- Redesigns margin, padding, gap utils pages—shoutout Tailwind for having a better visualization here. Cribbed their approach to emphasize spacing utilities.
- Fixed up a lot of usages of color utilities, likely more to do
- Fixed up a lot of broken links, probably also more to do
* New details component, simpler a11y color contrast warning, updated docs bottom nav, updated ref tables
* Avoid name collision, update to demo thickness hover
* Rename $new-font-sizes to $font-sizes
* Update width and height docs
* Few cleanup tweaks
* Remove unused attribute selector for borders
* Fixes
* more bundle
* fixes
* spelling
* add json
* new colors
* WIP: Redo some theming
* Fix sass warnings on unquoted map keys
* Revamp colors, update docs, couple new utils
* Remove key attributes
* Bump bundlewatch
* Bundlewatch
* Fix some things up
* Clean up tables, more color changes
* Fix more table color generation, simplify markup with new Table component prop
* More docs improvements, including utilities API, and checkbox and radio theme variants
* New form controls
* Split Sass, update docs
* More migration docs
* basic migration, update changelog
* Bring back btn-check for now, but move to button stylesheet
* note
* Fix link
* lint
* Co-locate Sass variables in most files
* another
* fix
* Don't bring tables into reboot, temp remove some sass vars so we don't need the co-dependency
* Move vars
* bundlewatch
* scssdocs
* Fix scssdocs