Skip to content

Commit 85054e1

Browse files
committed
v6: docs: fix typos, examples, and utility class docs
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`.
1 parent dd5d0d7 commit 85054e1

12 files changed

Lines changed: 63 additions & 53 deletions

File tree

site/src/assets/examples/sign-in/index.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const body_class = 'd-flex align-items-center py-4 bg-body-tertiary'
88

99
<main class="form-signin w-100 m-auto">
1010
<form>
11-
<img class="mb-4" src={getVersionedDocsPath('/assets/brand/bootstrap-logo.svg')} alt="" width="72" height="57">
11+
<img class="mb-4" src={getVersionedDocsPath('/assets/brand/bootstrap-logo.svg')} alt="Bootstrap" width="72" height="57">
1212
<h1 class="h3 mb-3 fw-normal">Please sign in</h1>
1313

1414
<div class="form-floating">

site/src/content/docs/components/dialog.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ To make a dialog dark, add `data-bs-theme="dark"` to the `<dialog>` element.
7171

7272
When `backdrop` is set to `static`, the dialog will not close when clicking outside of it. Click the button below to try it.
7373

74-
<Example code={`<button type="button" class="btn-solid theme-primary"data-bs-toggle="dialog" data-bs-target="#staticBackdropDialog" data-bs-backdrop="static"><!-- [!code highlight] -->
74+
<Example code={`<button type="button" class="btn-solid theme-primary" data-bs-toggle="dialog" data-bs-target="#staticBackdropDialog" data-bs-backdrop="static"><!-- [!code highlight] -->
7575
Open static backdrop dialog
7676
</button>
7777

site/src/content/docs/components/navbar.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Here’s a navbar that includes most supported sub-components and a responsive r
6868

6969
Here’s what you need to know before getting started with the navbar:
7070

71-
- Navbars require a wrapping `.navbar` with `.navbar-expand-{breakpoint}` for responsive collapsing and [color scheme](#color-schemes) classes.
71+
- Navbars require a wrapping `.navbar` with `.{breakpoint}:navbar-expand` (e.g. `.md:navbar-expand`) for responsive collapsing and [color scheme](#color-schemes) classes.
7272
- Navbars and their contents are fluid by default. Change the [container](#containers) to limit their horizontal width in different ways.
7373
- Use our [margin]([[docsref:/utilities/margin]]), [padding]([[docsref:/utilities/padding]]), and [flex]([[docsref:/utilities/flex]]) utility classes for controlling spacing and alignment within navbars.
7474
- Navbars are responsive by default using our **drawer component**. On mobile, navigation links slide in from the side as a drawer.

site/src/content/docs/forms/layout.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ More complex layouts can also be created with the grid system.
109109

110110
## Horizontal form
111111

112-
Create horizontal forms with the grid by adding the `.row` class to form groups and using the `.col-*-*` classes to specify the width of your labels and controls. Be sure to add `.col-form-label` to your `<label>`s as well so they’re vertically centered with their associated form controls.
112+
Create horizontal forms with the grid by adding the `.row` class to form groups and using `.{breakpoint}:col-*` classes (e.g. `.sm:col-2`) to specify the width of your labels and controls. Be sure to add `.col-form-label` to your `<label>`s as well so they’re vertically centered with their associated form controls.
113113

114114
At times, you maybe need to use margin or padding utilities to create that perfect alignment you need. For example, we’ve removed the `padding-top` on our stacked radio inputs label to better align the text baseline.
115115

site/src/content/docs/getting-started/approach.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Sass is used for the following:
2323
- Manage repetitive snippets of code with mixins and functions.
2424
- Toggle global options like `$enable-smooth-scroll`, `$enable-reduced-motion`, etc.
2525
- Configure and generate component variants (theme colors, sizes, etc) through Sass maps, loops, and more.
26-
- Bulk-generate CSS variables for all every tint and shade of our colors.
26+
- Bulk-generate CSS variables for every tint and shade of our colors.
2727
- Manage component token lists (e.g., `$alert-tokens`) and apply them to specific classes.
2828
- Power the utilities API to customize and generate utility classes.
2929

@@ -197,9 +197,9 @@ We use range media queries (`width >= 768px`, for example) to apply styles at a
197197

198198
### Classes
199199

200-
Aside from [Reboot]([[docsref:content/reboot]]), we strive to use only classes as selectors. Where we can, we avoid type selectors and extraneous parent selectors for greater flexibility.
200+
Aside from [Reboot]([[docsref:/content/reboot]]), we strive to use only classes as selectors. Where we can, we avoid type selectors and extraneous parent selectors for greater flexibility.
201201

202-
Components are typically built with a base class for shared property-value pairs. For example, `.btn` and `.btn-primary`. We use `.btn` for all the common styles like `display`, `padding`, and `border-width`. We then use modifiers like `.btn-solid` to add more styles.
202+
Components are typically built with a base class for shared property-value pairs. For example, `.btn`, `.btn-solid`, and `.theme-primary`. We use `.btn` for all the common styles like `display`, `padding`, and `border-width`. We then use variant and theme modifiers like `.btn-solid.theme-primary` to add more styles.
203203

204204
This reduces complexity, streamlines code, and makes for more scalable systems.
205205

site/src/content/docs/getting-started/javascript.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,13 @@ toc: true
88

99
Curious which components explicitly require our JavaScript and Floating UI or Vanilla Calendar Pro?
1010

11-
- Accordions for extending our Collapse plugin
1211
- Alerts for dismissing
1312
- Buttons for toggling states and checkbox/radio functionality
1413
- Carousel for all slide behaviors, controls, and indicators
1514
- Collapse for toggling visibility of content
1615
- Datepicker for date selection (also requires [Vanilla Calendar Pro](https://vanilla-calendar.pro/))
16+
- [Dialog]([[docsref:/components/dialog]]) for displaying, positioning, and scroll behavior
1717
- Menus for displaying and positioning (also requires [Floating UI](https://floating-ui.com/))
18-
- Modals for displaying, positioning, and scroll behavior
1918
- Navbar for extending our Collapse and Drawer plugins to implement responsive behaviors
2019
- [Nav]([[docsref:/components/nav]]) for navigation markup and styles; [Tab]([[docsref:/components/tab]]) plugin for toggling tab panes
2120
- Drawers for displaying, positioning, and scroll behavior

site/src/content/docs/guides/migration.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ Bootstrap 6 is a major release with many breaking changes to modernize our codeb
6161
- Removed `_variables.scss`, consolidating all variables into `_config.scss`
6262
- Added `_theme.scss` where we setup all our global theming for how colors are applied
6363
- **Updated lg, xl, and 2xl breakpoints and containers.**
64-
- Increased the `lg` breakpoint from 992px to 1024px; it’s container remains the same at 960px.
65-
- Increased the `xl` breakpoint from 1200px to 1280px, and it’s container from 1140px to 1200px.
64+
- Increased the `lg` breakpoint from 992px to 1024px; its container remains the same at 960px.
65+
- Increased the `xl` breakpoint from 1200px to 1280px, and its container from 1140px to 1200px.
6666
- Renamed `xxl` to `2xl` for better scaling with additional custom breakpoints
67-
- Increased the `2xl` breakpoint from 1400px to 1536px, and it’s container from 1320px to 1440px.
67+
- Increased the `2xl` breakpoint from 1400px to 1536px, and its container from 1320px to 1440px.
6868
- **Adopted modern CSS color functions.** All Sass color variables now use `oklch()` notation (e.g., `$blue: oklch(60% 0.24 240)`) and tint/shade scales are generated with `color-mix(in lab, ...)` in the compiled CSS. The v5 `$*-rgb` CSS custom properties and `rgba()` patterns have been removed. This requires browser support for `color-mix()` and `oklch()`.
6969
- **New theme token system with `.theme-*` classes.** Per-component color variant classes (like `.alert-primary`, `.badge.bg-primary`, `.btn-primary`) are replaced by a composable `.theme-{name}` pattern. Adding `.theme-primary` to a component sets `--theme-bg`, `--theme-fg`, `--theme-border`, `--theme-contrast`, and other semantic CSS custom properties that the component reads. This applies across buttons, badges, alerts, cards, accordions, and more.
7070
- **Responsive and state classes now use a prefix instead of an infix or suffix.** Class names follow the Tailwind-style `prefix:class` pattern (e.g., `md:d-none` instead of `d-md-none`, `hover:opacity-50` instead of `opacity-50-hover`). In HTML, use the unescaped colon: `class="md:d-none"`. This applies to utilities, grid, pseudo-state variants, and all responsive components.

site/src/content/docs/helpers/stretched-link.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Multiple links and tap targets are not recommended with stretched links. However
2121
Most custom components do not have `position: relative` by default, so we need to add the `.position-relative` here to prevent the link from stretching outside the parent element.
2222

2323
<Example code={`<div class="d-flex position-relative">
24-
<Placeholder width="144" height="144" class="flex-shrink-0 me-3" text={false} title="Generic placeholder image22222" />
24+
<Placeholder width="144" height="144" class="flex-shrink-0 me-3" text={false} title="Generic placeholder image" />
2525
<div>
2626
<h5 class="mt-0">Custom component with stretched link</h5>
2727
<p>This is some placeholder content for the custom component. It is intended to mimic what some real-world content would look like, and we’re using it here to give the component a bit of body and size.</p>

site/src/content/docs/utilities/background.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ For example, `.bg-primary` sets the `--bs-bg` variable to `var(--bs-primary-bg)`
3131
This approach allows us to also easily support translucency with our `.bg-{opacity}` utilities as we can use `color-mix()` with the CSS variable to generate the appropriate color. See the [opacity section](#opacity) for more details.
3232

3333
<Example code={[
34-
...getData('theme-colors').map((themeColor) => `<div class="p-3 mb-2 bg-${themeColor.name} color-on-${themeColor.name}">.bg-${themeColor.name}</div>
35-
<div class="p-3 mb-2 bg-muted-${themeColor.name} color-${themeColor.name}">.bg-muted-${themeColor.name}</div>
36-
<div class="p-3 mb-2 bg-subtle-${themeColor.name} color-${themeColor.name}">.bg-subtle-${themeColor.name}</div>`),
34+
...getData('theme-colors').map((themeColor) => `<div class="p-3 mb-2 bg-${themeColor.name} fg-contrast-${themeColor.name}">.bg-${themeColor.name}</div>
35+
<div class="p-3 mb-2 bg-muted-${themeColor.name} fg-${themeColor.name}">.bg-muted-${themeColor.name}</div>
36+
<div class="p-3 mb-2 bg-subtle-${themeColor.name} fg-${themeColor.name}">.bg-subtle-${themeColor.name}</div>`),
3737
`<div class="p-3 mb-2 bg-body fg-body">.bg-body</div>
3838
<div class="p-3 mb-2 bg-1">.bg-1</div>
3939
<div class="p-3 mb-2 bg-2">.bg-2</div>
@@ -52,7 +52,7 @@ Do you need a gradient in your custom CSS? Just add `background-image: var(--bs-
5252

5353
<Example class="d-flex flex-column gap-2" code={[
5454
...getData('theme-colors').map((themeColor) => `<div class="p-3 bg-${themeColor.name} bg-gradient fg-contrast-${themeColor.name}">.bg-${themeColor.name}.bg-gradient</div>`),
55-
`<div class="p-3 bg-black bg-gradient fg-contrast">.bg-black.bg-gradient</div>`
55+
`<div class="p-3 bg-black bg-gradient fg-white">.bg-black.bg-gradient</div>`
5656
]} />
5757

5858
## Opacity

site/src/content/docs/utilities/gap.mdx

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { getData } from '@libs/data'
1313

1414
## Overview
1515

16-
Use gap utilities to control the space between children in flexbox and grid layouts. Gap utilities are built from a default Sass map ranging from `.25rem` to `3rem`. Use utilities like `.gap-3` and `.gap-5` to control the gap between all children:
16+
Use gap utilities to control the space between children in flexbox and grid layouts. Gap utilities are built from a default Sass map ranging from `0` to `3rem` (`.gap-0` through `.gap-9`). Use utilities like `.gap-3` and `.gap-5` to control the gap between all children:
1717

1818
<Example class="d-flex align-items-center justify-content-center gap-4 text-center" showMarkup={false} code={`
1919
<div class="d-flex gap-3 p-3 bd-pattern-diagonal rounded-3">
@@ -51,9 +51,13 @@ Where *size* is one of:
5151
- `0` - for classes that eliminate the `gap` by setting it to `0`
5252
- `1` - (by default) for classes that set the `gap` to `$spacer * .25`
5353
- `2` - (by default) for classes that set the `gap` to `$spacer * .5`
54-
- `3` - (by default) for classes that set the `gap` to `$spacer`
55-
- `4` - (by default) for classes that set the `gap` to `$spacer * 1.5`
56-
- `5` - (by default) for classes that set the `gap` to `$spacer * 3`
54+
- `3` - (by default) for classes that set the `gap` to `$spacer * .75`
55+
- `4` - (by default) for classes that set the `gap` to `$spacer`
56+
- `5` - (by default) for classes that set the `gap` to `$spacer * 1.25`
57+
- `6` - (by default) for classes that set the `gap` to `$spacer * 1.5`
58+
- `7` - (by default) for classes that set the `gap` to `$spacer * 2`
59+
- `8` - (by default) for classes that set the `gap` to `$spacer * 2.5`
60+
- `9` - (by default) for classes that set the `gap` to `$spacer * 3`
5761

5862
(You can add more sizes by adding entries to the `$spacers` Sass map variable.)
5963

@@ -154,23 +158,23 @@ All gap utilities are responsive and include all breakpoints.
154158
<ul>
155159
{getData('breakpoints').map((breakpoint) => {
156160
return (
157-
<li><code>.{breakpoint.abbr}gap-0</code> through <code>.{breakpoint.abbr}gap-5</code></li>
161+
<li><code>.{breakpoint.abbr}gap-0</code> through <code>.{breakpoint.abbr}gap-9</code></li>
158162
)
159163
})}
160164
</ul>
161165

162166
<ul>
163167
{getData('breakpoints').map((breakpoint) => {
164168
return (
165-
<li><code>.{breakpoint.abbr}row-gap-0</code> through <code>.{breakpoint.abbr}row-gap-5</code></li>
169+
<li><code>.{breakpoint.abbr}row-gap-0</code> through <code>.{breakpoint.abbr}row-gap-9</code></li>
166170
)
167171
})}
168172
</ul>
169173

170174
<ul>
171175
{getData('breakpoints').map((breakpoint) => {
172176
return (
173-
<li><code>.{breakpoint.abbr}column-gap-0</code> through <code>.{breakpoint.abbr}column-gap-5</code></li>
177+
<li><code>.{breakpoint.abbr}column-gap-0</code> through <code>.{breakpoint.abbr}column-gap-9</code></li>
174178
)
175179
})}
176180
</ul>

0 commit comments

Comments
 (0)