You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR adds a temporary vibe coded script to detect usages of Bootstrap v5 classes that no longer exist in v6 across our codebase, in a similar spirit to the approach used by the Bootstrap Deprecated Classes extension: https://github.com/julien-deramond/bootstrap-deprecated-classes-extension.
It's only been lightly tested so far (and only on my macOS environment), but the results I've spot-checked all appear to be legitimate v5 classes that should no longer be used in v6.
I'm not sure whether it makes sense to merge this, since its purpose is mainly to help with the migration work on this branch. If not, @mdo and/or @coliff may still find it useful.
Example output from a run today:
▶ Extracting v6 classes from dist/css/bootstrap.css…
→ 1140 unique classes
▶ Fetching v5 CSS from https://raw.githubusercontent.com/twbs/bootstrap/refs/heads/main/dist/css/bootstrap.css…
→ 2027 unique classes
▶ Classes only in v5 (deprecated in v6): 1428
▶ Scanning codebase for deprecated classes…
→ Scanned 435 files
→ 55 deprecated class(es) found in codebase
✖ Found 55 deprecated v5 class(es) with 526 occurrence(s) in the codebase.
Report written to: deprecated-classes-2026-06-08T17-50-24.log
Some classes are considered found in v6 codebase because of their simple names. For now, I've kept them in the results. I'm not sure it's easy to better spot what's a class or not in the docs.
Non-exhaustive list:
.clearfix is found 3 times, but only in the docs text content, not used or mentioned as a class/utility, but in URLs or as a single English word
Some remaining .link-underline* classes are still found, but because they are used in the docs as utilities API examples, or in Sass test files
.btn-primary (1 occurrence)
───────────────────────────────
site/src/content/docs/customize/components.mdx:9
Bootstrap’s components are largely built with a base-modifier nomenclature. We group as many shared properties as possible into a base class, like .btn, and t
.btn-success (1 occurrence)
───────────────────────────────
site/src/content/docs/customize/components.mdx:9
Bootstrap’s components are largely built with a base-modifier nomenclature. We group as many shared properties as possible into a base class, like .btn, and t
.card-link (4 occurrences)
─────────────────────────────
site/src/assets/examples/cheatsheet/index.astro:818 Card link
site/src/assets/examples/cheatsheet/index.astro:819 Another link
site/src/content/docs/components/card.mdx:144 Card link
site/src/content/docs/components/card.mdx:145 Another link
.clearfix (3 occurrences)
────────────────────────────
site/src/content/docs/layout/columns.mdx:308
The classes can be used together with utilities to create responsive floated images. Make sure to wrap the content in a [.d-flow-root]([[docsref:/utilities/di
site/src/content/docs/utilities/display.mdx:42
There’s no more clearfix helper in Bootstrap 6 as it’s an outdated technique. Instead, use the display: flow-root utility, .d-flow-root. This forces a conta
site/src/content/docs/utilities/float.mdx:19
Use the .d-flow-root utility on a parent element to clear floats.
At the smallest breakpoint, the collapse plugin is used to hide the links and show a menu button to toggle the collapsed content.
site/src/assets/examples/sidebars/index.astro:201
<button class="btn btn-toggle d-inline-flex align-items-center rounded border-0 collapsed" data-bs-toggle="collapse" data-bs-target="#home-collapse" aria-expand
site/src/assets/examples/sidebars/index.astro:213
<button class="btn btn-toggle d-inline-flex align-items-center rounded border-0 collapsed" data-bs-toggle="collapse" data-bs-target="#dashboard-collapse" aria-e
site/src/assets/examples/sidebars/index.astro:226
<button class="btn btn-toggle d-inline-flex align-items-center rounded border-0 collapsed" data-bs-toggle="collapse" data-bs-target="#orders-collapse" aria-expa
site/src/assets/examples/sidebars/index.astro:240
<button class="btn btn-toggle d-inline-flex align-items-center rounded border-0 collapsed" data-bs-toggle="collapse" data-bs-target="#account-collapse" aria-exp
site/src/content/docs/components/accordion.mdx:215
- Screen readers announce the expanded/collapsed state automatically
site/src/content/docs/components/nav-overflow.mdx:266
Above the threshold, normal progressive collapse resumes. Items with .nav-overflow-keep are never collapsed.
site/src/content/docs/components/navbar.mdx:621
These examples omit the .lg:navbar-expand class to always show the collapsed state with the toggler visible. Click the toggler to open the drawer.
.dropdown (8 occurrences)
────────────────────────────
js/src/tooltip.js:626
// matching the behavior of the dropdown menu.
site/src/components/header/Navigation.astro:37
{/* Mobile breadcrumb dropdown - visible below lg /}
site/src/components/shortcodes/ResizableExample.astro:55
/data-bs-toggle="(menu|dropdown)"(?![^>]\bdata-bs-strategy=)/g,
site/src/content/docs/components/nav-overflow.mdx:247
Use the collapseBelow option to force all items into the overflow dropdown when the nav element’s width is below a threshold. Pass a breakpoint name to resolv
site/src/content/docs/components/nav-overflow.mdx:308
| collapseBelow | number|string | 0 | Width threshold below which all items collapse into the overflow dropdown. Pass a breakpoint name (e.g., 'md') to r
site/src/content/docs/components/nav-overflow.mdx:310
| menuPlacement | string | 'bottom-end' | Placement of the overflow dropdown menu, passed as data-bs-placement to the menu toggle. |
site/src/content/docs/components/popover.mdx:169
A shown popover can also be dismissed by pressing the Escape key. As with dropdown menus, a popover shown inside a dialog is dismissed on its own: th
site/src/content/docs/components/tooltip.mdx:194
A shown tooltip can be dismissed by pressing the Escape key, helping satisfy the [WCAG 1.4.13 “Content on Hover or Focus”](https://www.w3.org/WAI/WCA
.lead (53 occurrences)
────────────────────────
CODE_OF_CONDUCT.md:92
like social media. Violating these terms may lead to a temporary or permanent
CODE_OF_CONDUCT.md:104
Violating these terms may lead to a permanent ban.
site/src/assets/examples/album/index.astro:46
Something short and leading about the collection below—its contents, the creator, etc. Make it short and sweet, but not too short so folks
site/src/assets/examples/blog/index.astro:60
Multiple lines of text that form the lede, informing new readers quickly and efficiently about what’s most interesting in this post’s conte
site/src/assets/examples/blog/index.astro:61
Some great placeholder content for the first featurette here. Imagine some exciting prose here.
site/src/assets/examples/carousel/index.astro:136
Another featurette? Of course. More placeholder content here to give you an idea of how this layout would work with some actual real-world conte
site/src/assets/examples/carousel/index.astro:148
And yes, this is the last block of representative placeholder content. Again, not really intended to be actually read, simply here to give you a
site/src/assets/examples/cheatsheet/index.astro:101
site/src/assets/examples/cheatsheet/index.astro:102
This is a lead paragraph. It stands out from regular paragraphs.
site/src/assets/examples/checkout/index.astro:15
Below is an example form built entirely with Bootstrap’s form controls. Each required form group has a validation state that can be triggered by
site/src/assets/examples/cover/index.astro:22
Cover is a one-page template for building simple and beautiful home pages. Download, edit the text, and add your own fullscreen background photo
site/src/assets/examples/cover/index.astro:23
site/src/assets/examples/grid/index.astro:11
Basic grid layouts to get you familiar with building within the Bootstrap grid system.
site/src/assets/examples/heroes/index.astro:15
Quickly design and customize responsive mobile-first sites with Bootstrap, the world’s most popular front-end open source toolkit, featurin
site/src/assets/examples/heroes/index.astro:28
Quickly design and customize responsive mobile-first sites with Bootstrap, the world’s most popular front-end open source toolkit, featurin
site/src/assets/examples/heroes/index.astro:50
Quickly design and customize responsive mobile-first sites with Bootstrap, the world’s most popular front-end open source toolkit, featuring Sas
site/src/assets/examples/heroes/index.astro:95
Quickly design and customize responsive mobile-first sites with Bootstrap, the world’s most popular front-end open source toolkit, featuring Sas
site/src/assets/examples/jumbotrons/index.astro:61
This example is a quick exercise to illustrate how fixed to top navbar works. As you scroll, it will remain fixed to the top of your browser’s v
site/src/assets/examples/navbar-static/index.astro:37
This example is a quick exercise to illustrate how the top-aligned navbar works. As you scroll, this navbar remains in its original position and
site/src/assets/examples/product/index.astro:58
Pin a footer to the bottom of the viewport in desktop browsers with this custom HTML and CSS. A fixed navbar has been added with <code class="sm
site/src/components/home/CSSVariables.astro:12
site/src/content/docs/components/popover.mdx:206
Popovers do not manage keyboard focus order, and their placement can be random in the DOM, so be careful when adding interactive elements (like forms or links),
site/src/content/docs/components/toasts.mdx:323
Toasts are intended to be small interruptions to your visitors or users, so to help those with screen readers and similar assistive technologies, you should wra
site/src/content/docs/customize/optimize.mdx:87
Sites served over HTTPS should also access all stylesheets, scripts, and other assets over HTTPS connections. Otherwise, you’ll be sending users [mixed active c
site/src/content/docs/getting-started/accessibility.mdx:25
Some combinations of colors that currently make up Bootstrap’s default palette—used throughout the framework for things such as button variations, alert variati
site/src/content/docs/getting-started/javascript.mdx:207
While it may seem correct to use the dispose method immediately after hide(), it will lead to incorrect results. Here’s an example of the problem use:
site/src/content/docs/utilities/link.mdx:13
Change the alpha opacity of the link rgba() color value with utilities. Please be aware that changes to a color’s opacity can lead to links with [*insufficien
.link-body-emphasis (74 occurrences)
──────────────────────────────────────
site/src/assets/examples/blog/index.astro:40 World
site/src/assets/examples/blog/index.astro:41 U.S.
site/src/assets/examples/blog/index.astro:42 Technology
site/src/assets/examples/blog/index.astro:43 Design
site/src/assets/examples/blog/index.astro:44 Culture
site/src/assets/examples/blog/index.astro:45 Business
site/src/assets/examples/blog/index.astro:46 Politics
site/src/assets/examples/blog/index.astro:47 Opinion
site/src/assets/examples/blog/index.astro:48 Science
site/src/assets/examples/blog/index.astro:49 Health
site/src/assets/examples/blog/index.astro:50 Style
site/src/assets/examples/blog/index.astro:51 Travel
site/src/assets/examples/blog/index.astro:109
.modal (56 occurrences)
─────────────────────────
js/src/dialog-base.js:26
* - Escape key handling (modal and non-modal)
js/src/dialog-base.js:72
const { modal, preventBodyScroll } = this._getShowOptions()
js/src/dialog-base.js:73
this._showElement({ modal, preventBodyScroll })
js/src/dialog-base.js:123
return { modal: true, preventBodyScroll: true }
js/src/dialog-base.js:152
_showElement({ modal = true, preventBodyScroll = true } = {}) {
js/src/dialog-base.js:153
this._openedAsModal = modal
js/src/dialog-base.js:155
if (modal) {
js/src/dialog-base.js:176
// native modal centered case: close() removes the dialog
js/src/dialog-base.js:190
// Only restore body scroll if no other modal dialogs are open
js/src/dialog-base.js:191
if (!document.querySelector('dialog[open]:modal')) {
js/src/dialog-base.js:198
// closes synchronously; Dialog overrides this for animated modal cases.
js/src/dialog-base.js:247
// Handle native cancel event (Escape key) — only fires for modal dialogs
js/src/dialog-base.js:276
// Handle backdrop clicks — only applies to modal dialogs
js/src/dialog.js:38
modal: true
js/src/dialog.js:44
modal: 'boolean'
js/src/dialog.js:74
modal: this._config.modal,
js/src/dialog.js:75
preventBodyScroll: this._config.modal
js/src/dialog.js:80
if (!this._config.modal) {
js/src/dialog.js:90
// preserves the browser's modal centering and the native ::backdrop, both
js/src/drawer.js:84
modal: useModal,
js/src/tooltip.js:41
const CLASS_NAME_MODAL = 'modal'
js/src/tooltip.js:48
const EVENT_MODAL_HIDE = 'hide.bs.modal'
js/tests/unit/dialog.spec.js:451
it('should open a non-modal dialog with show() when modal = false', () => {
js/tests/unit/dialog.spec.js:457
modal: false
js/tests/unit/dialog.spec.js:478
modal: false
js/tests/unit/dialog.spec.js:501
modal: false
js/tests/unit/dialog.spec.js:527
modal: false,
js/tests/unit/dialog.spec.js:551
modal: false,
js/tests/unit/dialog.spec.js:584
expect(dialog._config.modal).toBeFalse()
js/tests/unit/dialog.spec.js:1039
it('should keep dialog-open on body when closing one of two open modal dialogs', () => {
js/tests/unit/dialog.spec.js:1174
modal: false,
js/tests/unit/dialog.spec.js:1198
modal: false,
js/tests/unit/drawer.spec.js:93
it('should hide if cancel event fires (modal mode)', () => {
site/public/pagefind/pagefind-component-ui.js:39
,Ca=R(ba),ya=R(Ta),rs=(n,s)=>{for(let e of n)if(e instanceof Element){e.setAttribute("data-pf-result-index",String(s));break}},zt=n=>{if(!(n instanceof HT site/src/assets/examples/dialogs/index.astro:36 <p>This is a modal sheet, a variation of the modal that docs itself to the bottom of the viewport like the newer share sheets in iOS.</p> site/src/assets/search.js:529 // destination page with the modal already gone) and have the visit recorded site/src/content/docs/components/dialog.mdx:9 # - "/docs/[[config:docs_version]]/components/modal/" site/src/content/docs/components/dialog.mdx:18 - **Modal or inline** via showModal()/show()—modal: true(default) promotes the dialog to the browser’s top layer with a backdrop and focus trapping; site/src/content/docs/components/dialog.mdx:19 - **Built-in backdrop** using the::backdroppseudo-element (modal only); setbackdrop: "static"to lock clicks outside, orbackdrop: falseto hide it. site/src/content/docs/components/dialog.mdx:21 - **Accessibility** — focus is trapped inside modal dialogs and returned to the trigger on close, with nativeARIA semantics. site/src/content/docs/components/dialog.mdx:28 Toggle a dialog by clicking the button below. The dialog uses the nativeshowModal()API for true modal behavior. site/src/content/docs/components/dialog.mdx:40 <p>This is a native dialog element. It uses the browser’s built-in modal behavior for accessibility and focus management.</p> site/src/content/docs/components/dialog.mdx:62 <p>This is a native dialog element, only it’s set to dark mode. It uses the browser’s built-in modal behavior for accessibility and focus management.</p> site/src/content/docs/components/dialog.mdx:95 Tooltips, popovers, toasts, and menus all work inside modal dialogs. Modal dialogs useshowModal(), which promotes the dialog to the browser’s top layer -- a site/src/content/docs/components/dialog.mdx:107 <p>These components work inside modal dialogs.</p> site/src/content/docs/components/dialog.mdx:284 By default, dialogs open as modals using the browser-native showModal()method. You can also open dialogs as non-modal usingshow()by settingmodaltof
site/src/content/docs/components/dialog.mdx:309
Use the modal option to create a non-modal dialog if building with JavaScript:
site/src/content/docs/components/dialog.mdx:312
const dialog = new bootstrap.Dialog('#myDialog', { modal: false })
site/src/content/docs/components/dialog.mdx:495
| backdrop | boolean or 'static' | true | For modal dialogs, clicking the backdrop dismisses the dialog. Specify static for a backdrop which doesn’t clo
site/src/content/docs/components/dialog.mdx:497
| modal | boolean | true | When true, opens the dialog as a modal using showModal() with backdrop, focus trapping, and top layer rendering. When false
site/src/content/docs/components/drawer.mdx:17
- Built-in backdrop via ::backdrop (modal only) closes the drawer on click; set backdrop: "static" to lock clicks outside, or backdrop: false to hide
site/src/content/docs/components/drawer.mdx:284
Since the drawer panel is built on the native <dialog> element, it inherently has the correct dialog role and modal semantics. Be sure to add aria-labelled site/src/content/docs/components/drawer.mdx:329 While both ways to dismiss a drawer are supported, keep in mind that dismissing from outside a drawer does not match the [ARIA Authoring Practices Guide dialog site/src/content/docs/getting-started/accessibility.mdx:19 Bootstrap’s interactive components—such as modal dialogs, menus, and custom tooltips—are designed to work for touch, mouse, and keyboard users. Through the use site/src/content/docs/getting-started/accessibility.mdx:46 Bootstrap includes support for the [prefers-reduced-motionmedia feature](https://www.w3.org/TR/mediaqueries-5/#prefers-reduced-motion). In browsers/environme site/src/content/docs/getting-started/approach.mdx:221 Each overlay component increases itsz-index` value slightly in such a way that common UI principles allow user focused or hovered elements to remain in view a
`,Ca=R(ba),ya=R(Ta),rs=(n,s)=>{for(let e of n)if(e instanceof Element){e.setAttribute("data-pf-result-index",String(s));break}},zt=n=>{if(!(n instanceof HT
.ratio (15 occurrences)
─────────────────────────
js/src/carousel.js:367
// the target snap offset, so the intended left-most slide reports a ratio a
js/src/carousel.js:375
bestIndex = ratios.findIndex(ratio => ratio >= maxRatio - ACTIVE_RATIO_TOLERANCE)
site/src/content/docs/components/progress.mdx:74
Labels longer than the progress bar within may not be fully accessible using this method because it relies on the text color having the correct contrast ratio w
site/src/content/docs/customize/sass.mdx:377
To help with this, we included the color-contrast function in Bootstrap. It uses the [WCAG contrast ratio algorithm](https://www.w3.org/TR/WCAG/#dfn-contrast-
site/src/content/docs/getting-started/accessibility.mdx:25
Some combinations of colors that currently make up Bootstrap’s default palette—used throughout the framework for things such as button variations, alert variati
site/src/content/docs/utilities/api.mdx:203
class: ratio,
site/src/content/docs/utilities/aspect-ratio.mdx:2
title: Aspect ratio
site/src/content/docs/utilities/aspect-ratio.mdx:10
Use the ratio utility to manage the aspect ratios of content like <iframe>s, <embed>s, <video>s, and <object>s. These helpers also can be used on any st
site/src/content/docs/utilities/aspect-ratio.mdx:18
Add your ratio utility to the element you want to modify, like an <iframe>, <video>, or less semantic elements like <div>. Ratio utilities also pair well
site/src/content/docs/utilities/aspect-ratio.mdx:24
Swap the .ratio-* class for a different aspect ratio.
site/src/content/docs/utilities/aspect-ratio.mdx:50
For example, to create a 2x1 aspect ratio, set --bs-aspect-ratio: 50% on the .ratio.
site/src/content/docs/utilities/aspect-ratio.mdx:52
<Example class="bd-example-ratios" code={<div class="ratio" style="--bs-aspect-ratio: 50%;"> site/src/content/docs/utilities/aspect-ratio.mdx:56 This CSS variable makes it easy to modify the aspect ratio across breakpoints. The following is 4x3 to start, but changes to a custom 2x1 at the medium breakpoi site/src/content/docs/utilities/aspect-ratio.mdx:66 <Example class="bd-example-ratios bd-example-ratios-breakpoint" code={
site/src/content/docs/utilities/object-fit.mdx:11
Change the value of the object-fit property with our responsive object-fit utility classes. T
site/src/content/docs/content/tables.mdx:218
- For each table variant, we generate a --bs-table-accent-bg color with the highest contrast depending on that color. For example, the accent color for `.tabl
site/src/content/docs/content/tables.mdx:244
site/src/content/docs/content/tables.mdx:252
.table-primary (1 occurrence)
─────────────────────────────────
site/src/content/docs/content/tables.mdx:218
- For each table variant, we generate a --bs-table-accent-bg color with the highest contrast depending on that color. For example, the accent color for `.tabl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a temporary vibe coded script to detect usages of Bootstrap v5 classes that no longer exist in v6 across our codebase, in a similar spirit to the approach used by the Bootstrap Deprecated Classes extension: https://github.com/julien-deramond/bootstrap-deprecated-classes-extension.
It's only been lightly tested so far (and only on my macOS environment), but the results I've spot-checked all appear to be legitimate v5 classes that should no longer be used in v6.
I'm not sure whether it makes sense to merge this, since its purpose is mainly to help with the migration work on this branch. If not, @mdo and/or @coliff may still find it useful.
Example output from a run today:
The corresponding report is generated at the repository root:
deprecated-classes-2026-06-08T17-50-24.log
Warning
Some classes are considered found in v6 codebase because of their simple names. For now, I've kept them in the results. I'm not sure it's easy to better spot what's a class or not in the docs.
Non-exhaustive list:
.clearfixis found 3 times, but only in the docs text content, not used or mentioned as a class/utility, but in URLs or as a single English word.link-underline*classes are still found, but because they are used in the docs as utilities API examples, or in Sass test files