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
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).
The `.btn` class is intended to be a starting point for your own custom button styles, while our provided button variants used in conjunction with our button variants, or to serve as a basis for your own custom styles.
18
+
The `.btn` class is intended to be a starting point for your own custom button styles, while our provided button variants can be used alongside `.theme-*` classes or as a basis for your own custom styles.
Copy file name to clipboardExpand all lines: site/src/content/docs/components/drawer.mdx
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ Drawer builds on the native `<dialog>` element and our Dialog component to manag
17
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 it.
18
18
-**Escape key handling** closes the drawer by default; set `keyboard: false` to disable.
19
19
-**Swipe to dismiss** — drawer auto-wires a placement-aware swipe (swipe left to close `drawer-start` in LTR, swipe down to close `drawer-bottom`, etc.).
20
-
-**Responsive placement** — `.sm-drawer`, `.md-drawer`, and up stay drawer-like below their breakpoint and collapse inline above it, making drawers useful as responsive navbars.
20
+
-**Responsive placement** — `.sm:drawer`, `.md:drawer`, and up stay drawer-like below their breakpoint and collapse inline above it, making drawers useful as responsive navbars.
21
21
-**Only one drawer can be shown at a time** (enforced by the data API).
22
22
-**Animated open and close** — drawer slides back out to its placement-specific off-screen position on close, with the `::backdrop` fading alongside it when opened modally. When authoring custom CSS, qualify your `[open]` rules with `:not(.hiding)` so the exit transition can fall through to the base state; add `.drawer-instant` to skip animations.
23
23
@@ -27,7 +27,7 @@ Drawer builds on the native `<dialog>` element and our Dialog component to manag
27
27
28
28
### Drawer components
29
29
30
-
Below is an drawer example that is shown by default (via `open` and `.show` on the `<dialog>`). Drawer includes support for a header with a close button and an optional body class for some initial `padding`. We suggest that you include drawer headers with dismiss actions whenever possible, or provide an explicit dismiss action.
30
+
Below is a drawer example that is shown by default (via `open` and `.show` on the `<dialog>`). Drawer includes support for a header with a close button and an optional body class for some initial `padding`. We suggest that you include drawer headers with dismiss actions whenever possible, or provide an explicit dismiss action.
@@ -41,7 +41,7 @@ Below is an drawer example that is shown by default (via `open` and `.show` on t
41
41
42
42
### Live demo
43
43
44
-
Use the buttons below to show and hide an drawer element via JavaScript. You can use a link with the `href` attribute, or a button with the `data-bs-target` attribute. In both cases, the `data-bs-toggle="drawer"` is required.
44
+
Use the buttons below to show and hide a drawer element via JavaScript. You can use a link with the `href` attribute, or a button with the `data-bs-target` attribute. In both cases, the `data-bs-toggle="drawer"` is required.
@@ -74,7 +74,7 @@ Use the buttons below to show and hide an drawer element via JavaScript. You can
74
74
75
75
### Body scrolling
76
76
77
-
Scrolling the `<body>` element is disabled when an drawer and its backdrop are visible. Use the `data-bs-scroll` attribute to enable `<body>` scrolling.
77
+
Scrolling the `<body>` element is disabled when a drawer and its backdrop are visible. Use the `data-bs-scroll` attribute to enable `<body>` scrolling.
78
78
79
79
<Examplecode={`<button class="btn-solid theme-primary" type="button" data-bs-toggle="drawer" data-bs-target="#drawerScrolling" aria-controls="drawerScrolling">Enable body scrolling</button>
80
80
@@ -176,7 +176,7 @@ Add `.drawer-translucent` to the drawer panel to blur and saturate the backgroun
176
176
177
177
## Responsive
178
178
179
-
Responsive drawer classes hide content outside the viewport from a specified breakpoint and down. Above that breakpoint, the contents within will behave as usual. For example, `.lg:drawer` hides content in an drawer below the `lg` breakpoint, but shows the content above the `lg` breakpoint. Responsive drawer classes are available for each breakpoint.
179
+
Responsive drawer classes hide content outside the viewport from a specified breakpoint and down. Above that breakpoint, the contents within will behave as usual. For example, `.lg:drawer` hides content in a drawer below the `lg` breakpoint, but shows the content above the `lg` breakpoint. Responsive drawer classes are available for each breakpoint.
180
180
181
181
-`.drawer`
182
182
-`.sm:drawer`
@@ -326,7 +326,7 @@ Add `data-bs-toggle="drawer"` and a `data-bs-target` or `href` to the element to
326
326
<JsDismissname="drawer" />
327
327
328
328
<Callouttype="warning">
329
-
While both ways to dismiss an drawer are supported, keep in mind that dismissing from outside an drawer does not match the [ARIA Authoring Practices Guide dialog (modal) pattern](https://www.w3.org/WAI/ARIA/apg/patterns/dialogmodal/). Do this at your own risk.
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 (modal) pattern](https://www.w3.org/WAI/ARIA/apg/patterns/dialogmodal/). Do this at your own risk.
Activates your content as an drawer element. Accepts an optional options `object`.
357
+
Activates your content as a drawer element. Accepts an optional options `object`.
358
358
359
-
You can create an drawer instance with the constructor, for example:
359
+
You can create a drawer instance with the constructor, for example:
360
360
361
361
```js
362
362
constbsDrawer=newbootstrap.Drawer('#myDrawer')
@@ -368,9 +368,9 @@ const bsDrawer = new bootstrap.Drawer('#myDrawer')
368
368
|`dispose`| Destroys an element’s drawer. |
369
369
|`getInstance`|*Static* method which allows you to get the drawer instance associated with a DOM element. |
370
370
|`getOrCreateInstance`|*Static* method which allows you to get the drawer instance associated with a DOM element, or create a new one in case it wasn’t initialized. |
371
-
|`hide`| Hides an drawer element. **Returns to the caller before the drawer element has actually been hidden** (i.e. before the `hidden.bs.drawer` event occurs). |
372
-
|`show`| Shows an drawer element. **Returns to the caller before the drawer element has actually been shown** (i.e. before the `shown.bs.drawer` event occurs). |
373
-
|`toggle`| Toggles an drawer element to shown or hidden. **Returns to the caller before the drawer element has actually been shown or hidden** (i.e. before the `shown.bs.drawer` or `hidden.bs.drawer` event occurs). |
371
+
|`hide`| Hides a drawer element. **Returns to the caller before the drawer element has actually been hidden** (i.e. before the `hidden.bs.drawer` event occurs). |
372
+
|`show`| Shows a drawer element. **Returns to the caller before the drawer element has actually been shown** (i.e. before the `shown.bs.drawer` event occurs). |
373
+
|`toggle`| Toggles a drawer element to shown or hidden. **Returns to the caller before the drawer element has actually been shown or hidden** (i.e. before the `shown.bs.drawer` or `hidden.bs.drawer` event occurs). |
374
374
</BsTable>
375
375
376
376
### Events
@@ -381,10 +381,10 @@ Bootstrap’s drawer class exposes a few events for hooking into drawer function
381
381
| Event type | Description |
382
382
| --- | --- |
383
383
|`hide.bs.drawer`| This event is fired immediately when the `hide` method has been called. |
384
-
|`hidden.bs.drawer`| This event is fired when an drawer element has been hidden from the user (will wait for CSS transitions to complete). |
384
+
|`hidden.bs.drawer`| This event is fired when a drawer element has been hidden from the user (will wait for CSS transitions to complete). |
385
385
|`hidePrevented.bs.drawer`| This event is fired when the drawer is shown, its backdrop is `static` and a click outside of the drawer is performed. The event is also fired when the escape key is pressed and the `keyboard` option is set to `false`. |
386
386
|`show.bs.drawer`| This event fires immediately when the `show` instance method is called. |
387
-
|`shown.bs.drawer`| This event is fired when an drawer element has been made visible to the user (will wait for CSS transitions to complete). |
387
+
|`shown.bs.drawer`| This event is fired when a drawer element has been made visible to the user (will wait for CSS transitions to complete). |
Copy file name to clipboardExpand all lines: site/src/content/docs/components/navbar.mdx
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -555,11 +555,11 @@ Fixed navbars use `position: fixed`, meaning they’re pulled from the normal fl
555
555
556
556
## Responsive behaviors
557
557
558
-
Navbars can use `.navbar-toggler`, and `.lg:navbar-expand{-sm|-md|-lg|-xl|-2xl}` classes to determine when their content appears in an drawer drawer or inline. In combination with other utilities, you can easily choose when to show or hide particular elements.
558
+
Navbars can use `.navbar-toggler`, and `.lg:navbar-expand{-sm|-md|-lg|-xl|-2xl}` classes to determine when their content appears in a drawer or inline. In combination with other utilities, you can easily choose when to show or hide particular elements.
559
559
560
-
For navbars that never collapse, add the `.lg:navbar-expand` class on the navbar. For navbars that always show the drawer drawer, don’t add any `.lg:navbar-expand` class.
560
+
For navbars that never collapse, add the `.lg:navbar-expand` class on the navbar. For navbars that always show the drawer, don’t add any `.lg:navbar-expand` class.
561
561
562
-
### Drawer drawer
562
+
### Drawer
563
563
564
564
By default, navbars use the [drawer component]([[docsref:/components/drawer]]) for their responsive behavior. This provides a modern drawer-style menu that slides in from any side of the screen.
565
565
@@ -622,7 +622,7 @@ These examples omit the `.lg:navbar-expand` class to always show the drawer beha
622
622
623
623
Navbar togglers are left-aligned by default, but should they follow a sibling element like a `.navbar-brand`, they’ll automatically be aligned to the far right. Reversing your markup will reverse the placement of the toggler.
624
624
625
-
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 drawer.
625
+
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.
626
626
627
627
With no `.navbar-brand` shown (hidden inside the drawer):
Copy file name to clipboardExpand all lines: site/src/content/docs/customize/optimize.mdx
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,13 +4,13 @@ description: Keep your projects lean, responsive, and maintainable so you can de
4
4
toc: true
5
5
---
6
6
7
-
## Lean Sass imports
7
+
## Lean Sass setup
8
8
9
-
When using Sass in your asset pipeline, make sure you optimize Bootstrap by only `@import`ing the components you need. Your largest optimizations will likely come from the `Layout & Components` section of our `bootstrap.scss`.
9
+
When using Sass in your asset pipeline, make sure you optimize Bootstrap by only `@use`ing the partials you need. Your largest optimizations will likely come from the `Layout & Components` section of our `bootstrap.scss`.
If you’re not using a component, comment it out or delete it entirely. For example, if you’re not using the carousel, remove that import to save some file size in your compiled CSS. Keep in mind there are some dependencies across Sass imports that may make it more difficult to omit a file.
13
+
If you’re not using a component, comment it out or delete its `@forward` entry entirely. For example, if you’re not using the carousel, remove that line to save file size in your compiled CSS. Keep in mind there are some dependencies across Sass partials that may make it more difficult to omit a file.
Each overlay component increases its `z-index` value slightly in such a way that common UI principles allow user focused or hovered elements to remain in view at all times. For example, a modal is document blocking (e.g., you cannot take any other action save for the modal’s action), so we put that above our navbars.
221
+
Each overlay component increases its `z-index` value slightly in such a way that common UI principles allow user focused or hovered elements to remain in view at all times. For example, a modal dialog is document blocking (e.g., you cannot take any other action save for the dialog’s action), so we put that above our navbars.
222
222
223
223
Learn more about this in our [`z-index` layout page]([[docsref:/layout/z-index]]).
224
224
225
225
### HTML and CSS over JS
226
226
227
227
Whenever possible, we prefer HTML and CSS over JavaScript—they’re more accessible to people of all experience levels and faster in the browser. That’s why our first-class JavaScript API is `data` attributes—it lets you write more HTML instead of JavaScript. Read more in [our JavaScript overview]([[docsref:/getting-started/javascript#data-attributes]]).
228
228
229
-
Our styles build on fundamental browser behaviors. For example, while you can put `.btn` on nearly any element, we prefer `<button>`s and `<a>`s for their semantic value. Similarly, we use native `:valid`/`:invalid` pseudo-elements for form validation rather than custom plugins.
229
+
Our styles build on fundamental browser behaviors. For example, while you can put `.btn` on nearly any element, we prefer `<button>`s and `<a>`s for their semantic value. For form validation, we scope styles behind `data-bs-validate` and use the `:user-invalid` pseudo-class so feedback appears only after user interaction—not on initial page load.
Copy file name to clipboardExpand all lines: site/src/content/docs/utilities/display.mdx
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ Display utility classes that apply to all [breakpoints]([[docsref:/layout/breakp
17
17
As such, the classes are named using the format:
18
18
19
19
-`.d-{value}` for `xs`
20
-
-`.d-{breakpoint}-{value}` for `sm`, `md`, `lg`, `xl`, and `2xl`.
20
+
-`.{breakpoint}:d-{value}` for `sm`, `md`, `lg`, `xl`, and `2xl` (for example, `.md:d-none`).
21
21
22
22
Where *value* is one of:
23
23
@@ -57,9 +57,9 @@ There’s no more clearfix helper in Bootstrap 6 as it’s an outdated technique
57
57
58
58
For faster mobile-friendly development, use responsive display classes for showing and hiding elements by device. Avoid creating entirely different versions of the same site, instead hide elements responsively for each screen size.
59
59
60
-
To hide elements simply use the `.d-none` class or one of the `.d-{sm,md,lg,xl,2xl}-none` classes for any responsive screen variation.
60
+
To hide elements simply use the `.d-none` class or one of the `.{sm,md,lg,xl,2xl}:d-none` classes for any responsive screen variation.
61
61
62
-
To show an element only on a given interval of screen sizes you can combine one `.d-*-none` class with a `.d-*-*` class, for example `.d-none .md:d-block .xl:d-none` will hide the element for all screen sizes except on medium and large devices.
62
+
To show an element only on a given interval of screen sizes you can combine one `.{breakpoint}:d-none` class with a `.{breakpoint}:d-block` class, for example `.d-none .md:d-block .xl:d-none` will hide the element for all screen sizes except on medium and large devices.
0 commit comments