diff options
author | Louis-Maxime Piton <louismaxime.piton@orange.com> | 2022-05-20 20:21:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-20 20:21:48 +0300 |
commit | 8959bf3f0bbaca514967661a6b721a3f065f49a9 (patch) | |
tree | 414bfe693230df5b2004547ba59b921b72a403d4 /site | |
parent | 73e45ee36cf4fdb6014267ecc67ba53a8b25fdae (diff) |
Docs: quick fixes for HTML (#36395)
* Using the new helper in the doc
* Remove input from `Tab` access
* Change scrollspy code examples
* Reordering tables for JS
* Fix for parcel file
* Center align all the code example texts in layout
* Alphabetical reorder the helpers
Diffstat (limited to 'site')
35 files changed, 274 insertions, 260 deletions
diff --git a/site/content/docs/5.2/components/card.md b/site/content/docs/5.2/components/card.md index 9e395cd5ec..78c7cd3f32 100644 --- a/site/content/docs/5.2/components/card.md +++ b/site/content/docs/5.2/components/card.md @@ -376,7 +376,7 @@ Similar to headers and footers, cards can include top and bottom "image caps"— Turn an image into a card background and overlay your card's text. Depending on the image, you may or may not need additional styles or utilities. {{< example >}} -<div class="card bg-dark text-white"> +<div class="card text-bg-dark"> {{< placeholder width="100%" height="270" class="bd-placeholder-img-lg card-img" text="Card image" >}} <div class="card-img-overlay"> <h5 class="card-title">Card title</h5> diff --git a/site/content/docs/5.2/components/carousel.md b/site/content/docs/5.2/components/carousel.md index 2714a09dce..b2894ab129 100644 --- a/site/content/docs/5.2/components/carousel.md +++ b/site/content/docs/5.2/components/carousel.md @@ -342,14 +342,14 @@ const carousel = new bootstrap.Carousel(myCarouselElement, { | Method | Description | | --- | --- | | `cycle` | Cycles through the carousel items from left to right. | -| `pause` | Stops the carousel from cycling through items. | -| `prev` | Cycles to the previous item. **Returns to the caller before the previous item has been shown** (e.g., before the `slid.bs.carousel` event occurs). | -| `next` | Cycles to the next item. **Returns to the caller before the next item has been shown** (e.g., before the `slid.bs.carousel` event occurs). | -| `nextWhenVisible` | Don't cycle carousel to next when the page isn't visible or the carousel or its parent isn't visible. **Returns to the caller before the target item has been shown** | -| `to` | Cycles the carousel to a particular frame (0 based, similar to an array). **Returns to the caller before the target item has been shown** (e.g., before the `slid.bs.carousel` event occurs). | | `dispose` | Destroys an element's carousel. (Removes stored data on the DOM element) | | `getInstance` | Static method which allows you to get the carousel instance associated to a DOM element, you can use it like this: `bootstrap.Carousel.getInstance(element)` | | `getOrCreateInstance` | Static method which returns a carousel instance associated to a DOM element or create a new one in case it wasn't initialized. You can use it like this: `bootstrap.Carousel.getOrCreateInstance(element)` | +| `next` | Cycles to the next item. **Returns to the caller before the next item has been shown** (e.g., before the `slid.bs.carousel` event occurs). | +| `nextWhenVisible` | Don't cycle carousel to next when the page isn't visible or the carousel or its parent isn't visible. **Returns to the caller before the target item has been shown** | +| `pause` | Stops the carousel from cycling through items. | +| `prev` | Cycles to the previous item. **Returns to the caller before the previous item has been shown** (e.g., before the `slid.bs.carousel` event occurs). | +| `to` | Cycles the carousel to a particular frame (0 based, similar to an array). **Returns to the caller before the target item has been shown** (e.g., before the `slid.bs.carousel` event occurs). | {{< /bs-table >}} ### Events @@ -366,8 +366,8 @@ All carousel events are fired at the carousel itself (i.e. at the `<div class="c {{< bs-table >}} | Event type | Description | | --- | --- | -| `slide.bs.carousel` | Fires immediately when the `slide` instance method is invoked. | | `slid.bs.carousel` | Fired when the carousel has completed its slide transition. | +| `slide.bs.carousel` | Fires immediately when the `slide` instance method is invoked. | {{< /bs-table >}} ```js diff --git a/site/content/docs/5.2/components/collapse.md b/site/content/docs/5.2/components/collapse.md index 91dbef5456..a20a465c2c 100644 --- a/site/content/docs/5.2/components/collapse.md +++ b/site/content/docs/5.2/components/collapse.md @@ -169,12 +169,12 @@ const bsCollapse = new bootstrap.Collapse('#myCollapse', { {{< bs-table >}} | Method | Description | | --- | --- | -| `toggle` | Toggles a collapsible element to shown or hidden. **Returns to the caller before the collapsible element has actually been shown or hidden** (i.e. before the `shown.bs.collapse` or `hidden.bs.collapse` event occurs). | -| `show` | Shows a collapsible element. **Returns to the caller before the collapsible element has actually been shown** (e.g., before the `shown.bs.collapse` event occurs). | -| `hide` | Hides a collapsible element. **Returns to the caller before the collapsible element has actually been hidden** (e.g., before the `hidden.bs.collapse` event occurs). | | `dispose` | Destroys an element's collapse. (Removes stored data on the DOM element) | | `getInstance` | Static method which allows you to get the collapse instance associated to a DOM element, you can use it like this: `bootstrap.Collapse.getInstance(element)` | | `getOrCreateInstance` | Static method which returns a collapse instance associated to a DOM element or create a new one in case it wasn't initialized. You can use it like this: `bootstrap.Collapse.getOrCreateInstance(element)` | +| `hide` | Hides a collapsible element. **Returns to the caller before the collapsible element has actually been hidden** (e.g., before the `hidden.bs.collapse` event occurs). | +| `show` | Shows a collapsible element. **Returns to the caller before the collapsible element has actually been shown** (e.g., before the `shown.bs.collapse` event occurs). | +| `toggle` | Toggles a collapsible element to shown or hidden. **Returns to the caller before the collapsible element has actually been shown or hidden** (i.e. before the `shown.bs.collapse` or `hidden.bs.collapse` event occurs). | {{< /bs-table >}} ### Events @@ -184,10 +184,10 @@ Bootstrap's collapse class exposes a few events for hooking into collapse functi {{< bs-table >}} | Event type | Description | | --- | --- | -| `show.bs.collapse` | This event fires immediately when the `show` instance method is called. | -| `shown.bs.collapse` | This event is fired when a collapse element has been made visible to the user (will wait for CSS transitions to complete). | | `hide.bs.collapse` | This event is fired immediately when the `hide` method has been called. | | `hidden.bs.collapse` | This event is fired when a collapse element has been hidden from the user (will wait for CSS transitions to complete). | +| `show.bs.collapse` | This event fires immediately when the `show` instance method is called. | +| `shown.bs.collapse` | This event is fired when a collapse element has been made visible to the user (will wait for CSS transitions to complete). | {{< /bs-table >}} ```js diff --git a/site/content/docs/5.2/components/dropdowns.md b/site/content/docs/5.2/components/dropdowns.md index fdae7ae7fe..4565b5fdff 100644 --- a/site/content/docs/5.2/components/dropdowns.md +++ b/site/content/docs/5.2/components/dropdowns.md @@ -1069,12 +1069,12 @@ Regardless of whether you call your dropdown via JavaScript or instead use the d {{< bs-table "table" >}} | Name | Type | Default | Description | | --- | --- | --- | --- | +| `autoClose` | boolean, string | `true` | Configure the auto close behavior of the dropdown: <ul class="my-2"><li>`true` - the dropdown will be closed by clicking outside or inside the dropdown menu.</li><li>`false` - the dropdown will be closed by clicking the toggle button and manually calling `hide` or `toggle` method. (Also will not be closed by pressing <kbd>esc</kbd> key)</li><li>`'inside'` - the dropdown will be closed (only) by clicking inside the dropdown menu.</li> <li>`'outside'` - the dropdown will be closed (only) by clicking outside the dropdown menu.</li></ul> Note: the dropdown can always be closed with the <kbd>ESC</kbd> key | | `boundary` | string, element | `'scrollParent'` | Overflow constraint boundary of the dropdown menu (applies only to Popper's preventOverflow modifier). By default it's `clippingParents` and can accept an HTMLElement reference (via JavaScript only). For more information refer to Popper's [detectOverflow docs](https://popper.js.org/docs/v2/utils/detect-overflow/#boundary). | -| `reference` | string, element | `'toggle'` | Reference element of the dropdown menu. Accepts the values of `'toggle'`, `'parent'`, an HTMLElement reference or an object providing `getBoundingClientRect`. For more information refer to Popper's [constructor docs](https://popper.js.org/docs/v2/constructors/#createpopper) and [virtual element docs](https://popper.js.org/docs/v2/virtual-elements/). | | `display` | string | `'dynamic'` | By default, we use Popper for dynamic positioning. Disable this with `static`. | | `offset` | number, string, function | `[0, 2]` | Offset of the dropdown relative to its target. You can pass a string in data attributes with comma separated values like: `data-bs-offset="10,20"`. When a function is used to determine the offset, it is called with an object containing the popper placement, the reference, and popper rects as its first argument. The triggering element DOM node is passed as the second argument. The function must return an array with two numbers: [skidding](https://popper.js.org/docs/v2/modifiers/offset/#skidding-1), [distance](https://popper.js.org/docs/v2/modifiers/offset/#distance-1). For more information refer to Popper's [offset docs](https://popper.js.org/docs/v2/modifiers/offset/#options). | -| `autoClose` | boolean, string | `true` | Configure the auto close behavior of the dropdown: <ul class="my-2"><li>`true` - the dropdown will be closed by clicking outside or inside the dropdown menu.</li><li>`false` - the dropdown will be closed by clicking the toggle button and manually calling `hide` or `toggle` method. (Also will not be closed by pressing <kbd>esc</kbd> key)</li><li>`'inside'` - the dropdown will be closed (only) by clicking inside the dropdown menu.</li> <li>`'outside'` - the dropdown will be closed (only) by clicking outside the dropdown menu.</li></ul> Note: the dropdown can always be closed with the <kbd>ESC</kbd> key | | `popperConfig` | null, object, function | `null` | To change Bootstrap's default Popper config, see [Popper's configuration](https://popper.js.org/docs/v2/constructors/#options). When a function is used to create the Popper configuration, it's called with an object that contains the Bootstrap's default Popper configuration. It helps you use and merge the default with your own configuration. The function must return a configuration object for Popper. | +| `reference` | string, element | `'toggle'` | Reference element of the dropdown menu. Accepts the values of `'toggle'`, `'parent'`, an HTMLElement reference or an object providing `getBoundingClientRect`. For more information refer to Popper's [constructor docs](https://popper.js.org/docs/v2/constructors/#createpopper) and [virtual element docs](https://popper.js.org/docs/v2/virtual-elements/). | {{< /bs-table >}} #### Using function with `popperConfig` @@ -1094,13 +1094,13 @@ const dropdown = new bootstrap.Dropdown(element, { {{< bs-table >}} | Method | Description | | --- | --- | -| `toggle` | Toggles the dropdown menu of a given navbar or tabbed navigation. | -| `show` | Shows the dropdown menu of a given navbar or tabbed navigation. | -| `hide` | Hides the dropdown menu of a given navbar or tabbed navigation. | -| `update` | Updates the position of an element's dropdown. | | `dispose` | Destroys an element's dropdown. (Removes stored data on the DOM element) | | `getInstance` | Static method which allows you to get the dropdown instance associated to a DOM element, you can use it like this: `bootstrap.Dropdown.getInstance(element)` | | `getOrCreateInstance` | Static method which returns a dropdown instance associated to a DOM element or create a new one in case it wasn't initialized. You can use it like this: `bootstrap.Dropdown.getOrCreateInstance(element)`. | +| `hide` | Hides the dropdown menu of a given navbar or tabbed navigation. | +| `show` | Shows the dropdown menu of a given navbar or tabbed navigation. | +| `toggle` | Toggles the dropdown menu of a given navbar or tabbed navigation. | +| `update` | Updates the position of an element's dropdown. | {{< /bs-table >}} ### Events @@ -1110,10 +1110,10 @@ All dropdown events are fired at the toggling element and then bubbled up. So yo {{< bs-table >}} | Event type | Description | | --- | --- | -| `show.bs.dropdown` | Fires immediately when the `show` instance method is called. | -| `shown.bs.dropdown` | Fired when the dropdown has been made visible to the user and CSS transitions have completed. | | `hide.bs.dropdown` | Fires immediately when the `hide` instance method has been called. | | `hidden.bs.dropdown` | Fired when the dropdown has finished being hidden from the user and CSS transitions have completed. | +| `show.bs.dropdown` | Fires immediately when the `show` instance method is called. | +| `shown.bs.dropdown` | Fired when the dropdown has been made visible to the user and CSS transitions have completed. | {{< /bs-table >}} ```js diff --git a/site/content/docs/5.2/components/list-group.md b/site/content/docs/5.2/components/list-group.md index 45d65ddc01..5c78ddfe50 100644 --- a/site/content/docs/5.2/components/list-group.md +++ b/site/content/docs/5.2/components/list-group.md @@ -512,10 +512,10 @@ If no tab was already active, the `hide.bs.tab` and `hidden.bs.tab` events will {{< bs-table >}} | Event type | Description | | --- | --- | -| `show.bs.tab` | This event fires on tab show, but before the new tab has been shown. Use `event.target` and `event.relatedTarget` to target the active tab and the previous active tab (if available) respectively. | -| `shown.bs.tab` | This event fires on tab show after a tab has been shown. Use `event.target` and `event.relatedTarget` to target the active tab and the previous active tab (if available) respectively. | | `hide.bs.tab` | This event fires when a new tab is to be shown (and thus the previous active tab is to be hidden). Use `event.target` and `event.relatedTarget` to target the current active tab and the new soon-to-be-active tab, respectively. | | `hidden.bs.tab` | This event fires after a new tab is shown (and thus the previous active tab is hidden). Use `event.target` and `event.relatedTarget` to target the previous active tab and the new active tab, respectively. | +| `show.bs.tab` | This event fires on tab show, but before the new tab has been shown. Use `event.target` and `event.relatedTarget` to target the active tab and the previous active tab (if available) respectively. | +| `shown.bs.tab` | This event fires on tab show after a tab has been shown. Use `event.target` and `event.relatedTarget` to target the active tab and the previous active tab (if available) respectively. | {{< /bs-table >}} ```js diff --git a/site/content/docs/5.2/components/modal.md b/site/content/docs/5.2/components/modal.md index 762a569bff..a2354eb855 100644 --- a/site/content/docs/5.2/components/modal.md +++ b/site/content/docs/5.2/components/modal.md @@ -830,8 +830,8 @@ const myModalAlternative = new bootstrap.Modal('#myModal', options) | Name | Type | Default | Description | | --- | --- | --- | --- | | `backdrop` | boolean, `'static'` | `true` | Includes a modal-backdrop element. Alternatively, specify `static` for a backdrop which doesn't close the modal when clicked. | -| `keyboard` | boolean | `true` | Closes the modal when escape key is pressed. | | `focus` | boolean | `true` | Puts the focus on the modal when initialized. | +| `keyboard` | boolean | `true` | Closes the modal when escape key is pressed. | {{< /bs-table >}} ### Methods @@ -853,13 +853,13 @@ const myModal = new bootstrap.Modal('#myModal', { {{< bs-table "table" >}} | Method | Description | | --- | --- | -| `toggle` | Manually toggles a modal. **Returns to the caller before the modal has actually been shown or hidden** (i.e. before the `shown.bs.modal` or `hidden.bs.modal` event occurs). | -| `show` | Manually opens a modal. **Returns to the caller before the modal has actually been shown** (i.e. before the `shown.bs.modal` event occurs). Also, you can pass a DOM element as an argument that can be received in the modal events (as the `relatedTarget` property). (i.e. `const modalToggle = document.getElementById('toggleMyModal'); myModal.show(modalToggle)` | -| `hide` | Manually hides a modal. **Returns to the caller before the modal has actually been hidden** (i.e. before the `hidden.bs.modal` event occurs). | -| `handleUpdate` | Manually readjust the modal's position if the height of a modal changes while it is open (i.e. in case a scrollbar appears). | | `dispose` | Destroys an element's modal. (Removes stored data on the DOM element) | | `getInstance` | *Static* method which allows you to get the modal instance associated with a DOM element. | | `getOrCreateInstance` | *Static* method which allows you to get the modal instance associated with a DOM element, or create a new one in case it wasn't initialized. | +| `handleUpdate` | Manually readjust the modal's position if the height of a modal changes while it is open (i.e. in case a scrollbar appears). | +| `hide` | Manually hides a modal. **Returns to the caller before the modal has actually been hidden** (i.e. before the `hidden.bs.modal` event occurs). | +| `show` | Manually opens a modal. **Returns to the caller before the modal has actually been shown** (i.e. before the `shown.bs.modal` event occurs). Also, you can pass a DOM element as an argument that can be received in the modal events (as the `relatedTarget` property). (i.e. `const modalToggle = document.getElementById('toggleMyModal'); myModal.show(modalToggle)` | +| `toggle` | Manually toggles a modal. **Returns to the caller before the modal has actually been shown or hidden** (i.e. before the `shown.bs.modal` or `hidden.bs.modal` event occurs). | {{< /bs-table >}} ### Events @@ -869,11 +869,11 @@ Bootstrap's modal class exposes a few events for hooking into modal functionalit {{< bs-table >}} | Event | Description | | --- | --- | -| `show.bs.modal` | This event fires immediately when the `show` instance method is called. If caused by a click, the clicked element is available as the `relatedTarget` property of the event. | -| `shown.bs.modal` | This event is fired when the modal has been made visible to the user (will wait for CSS transitions to complete). If caused by a click, the clicked element is available as the `relatedTarget` property of the event. | | `hide.bs.modal` | This event is fired immediately when the `hide` instance method has been called. | | `hidden.bs.modal` | This event is fired when the modal has finished being hidden from the user (will wait for CSS transitions to complete). | | `hidePrevented.bs.modal` | This event is fired when the modal is shown, its backdrop is `static` and a click outside of the modal is performed. The event is also fired when the escape key is pressed and the `keyboard` option is set to `false`. | +| `show.bs.modal` | This event fires immediately when the `show` instance method is called. If caused by a click, the clicked element is available as the `relatedTarget` property of the event. | +| `shown.bs.modal` | This event is fired when the modal has been made visible to the user (will wait for CSS transitions to complete). If caused by a click, the clicked element is available as the `relatedTarget` property of the event. | {{< /bs-table >}} ```js diff --git a/site/content/docs/5.2/components/navs-tabs.md b/site/content/docs/5.2/components/navs-tabs.md index e09a9fee0e..2f21bfb426 100644 --- a/site/content/docs/5.2/components/navs-tabs.md +++ b/site/content/docs/5.2/components/navs-tabs.md @@ -705,10 +705,10 @@ If no tab was already active, then the `hide.bs.tab` and `hidden.bs.tab` events {{< bs-table >}} | Event type | Description | | --- | --- | -| `show.bs.tab` | This event fires on tab show, but before the new tab has been shown. Use `event.target` and `event.relatedTarget` to target the active tab and the previous active tab (if available) respectively. | -| `shown.bs.tab` | This event fires on tab show after a tab has been shown. Use `event.target` and `event.relatedTarget` to target the active tab and the previous active tab (if available) respectively. | | `hide.bs.tab` | This event fires when a new tab is to be shown (and thus the previous active tab is to be hidden). Use `event.target` and `event.relatedTarget` to target the current active tab and the new soon-to-be-active tab, respectively. | | `hidden.bs.tab` | This event fires after a new tab is shown (and thus the previous active tab is hidden). Use `event.target` and `event.relatedTarget` to target the previous active tab and the new active tab, respectively. | +| `show.bs.tab` | This event fires on tab show, but before the new tab has been shown. Use `event.target` and `event.relatedTarget` to target the active tab and the previous active tab (if available) respectively. | +| `shown.bs.tab` | This event fires on tab show after a tab has been shown. Use `event.target` and `event.relatedTarget` to target the active tab and the previous active tab (if available) respectively. | {{< /bs-table >}} ```js diff --git a/site/content/docs/5.2/components/offcanvas.md b/site/content/docs/5.2/components/offcanvas.md index 0a487b3b60..dfb6c72c42 100644 --- a/site/content/docs/5.2/components/offcanvas.md +++ b/site/content/docs/5.2/components/offcanvas.md @@ -306,11 +306,11 @@ const bsOffcanvas = new bootstrap.Offcanvas('#myOffcanvas') {{< bs-table "table" >}} | Method | Description | | --- | --- | -| `toggle` | Toggles an offcanvas element to shown or hidden. **Returns to the caller before the offcanvas element has actually been shown or hidden** (i.e. before the `shown.bs.offcanvas` or `hidden.bs.offcanvas` event occurs). | -| `show` | Shows an offcanvas element. **Returns to the caller before the offcanvas element has actually been shown** (i.e. before the `shown.bs.offcanvas` event occurs).| -| `hide` | Hides an offcanvas element. **Returns to the caller before the offcanvas element has actually been hidden** (i.e. before the `hidden.bs.offcanvas` event occurs).| | `getInstance` | *Static* method which allows you to get the offcanvas instance associated with a DOM element | | `getOrCreateInstance` | *Static* method which allows you to get the offcanvas instance associated with a DOM element, or create a new one in case it wasn't initialized | +| `hide` | Hides an offcanvas element. **Returns to the caller before the offcanvas element has actually been hidden** (i.e. before the `hidden.bs.offcanvas` event occurs).| +| `show` | Shows an offcanvas element. **Returns to the caller before the offcanvas element has actually been shown** (i.e. before the `shown.bs.offcanvas` event occurs).| +| `toggle` | Toggles an offcanvas element to shown or hidden. **Returns to the caller before the offcanvas element has actually been shown or hidden** (i.e. before the `shown.bs.offcanvas` or `hidden.bs.offcanvas` event occurs). | {{< /bs-table >}} ### Events @@ -320,11 +320,11 @@ Bootstrap's offcanvas class exposes a few events for hooking into offcanvas func {{< bs-table "table" >}} | Event type | Description | | --- | --- | -| `show.bs.offcanvas` | This event fires immediately when the `show` instance method is called. | -| `shown.bs.offcanvas` | This event is fired when an offcanvas element has been made visible to the user (will wait for CSS transitions to complete). | | `hide.bs.offcanvas` | This event is fired immediately when the `hide` method has been called. | | `hidden.bs.offcanvas` | This event is fired when an offcanvas element has been hidden from the user (will wait for CSS transitions to complete). | | `hidePrevented.bs.offcanvas` | This event is fired when the offcanvas is shown, its backdrop is `static` and a click outside of the offcanvas is performed. The event is also fired when the escape key is pressed and the `keyboard` option is set to `false`. | +| `show.bs.offcanvas` | This event fires immediately when the `show` instance method is called. | +| `shown.bs.offcanvas` | This event is fired when an offcanvas element has been made visible to the user (will wait for CSS transitions to complete). | {{< /bs-table >}} ```js diff --git a/site/content/docs/5.2/components/popovers.md b/site/content/docs/5.2/components/popovers.md index a9ff961c26..b6d3b304df 100644 --- a/site/content/docs/5.2/components/popovers.md +++ b/site/content/docs/5.2/components/popovers.md @@ -176,24 +176,24 @@ Note that for security reasons the `sanitize`, `sanitizeFn`, and `allowList` opt {{< bs-table "table" >}} | Name | Type | Default | Description | | --- | --- | --- | --- | +| `allowList` | object | [Default value]({{< docsref "/getting-started/javascript#sanitizer" >}}) | Object which contains allowed attributes and tags. | | `animation` | boolean | `true` | Apply a CSS fade transition to the popover | +| `boundary` | string, element | `'clippingParents'` | Overflow constraint boundary of the popover (applies only to Popper's preventOverflow modifier). By default, it's `'clippingParents'` and can accept an HTMLElement reference (via JavaScript only). For more information refer to Popper's [detectOverflow docs](https://popper.js.org/docs/v2/utils/detect-overflow/#boundary). | | `container` | string, element, false | `false` | Appends the popover to a specific element. Example: `container: 'body'`. This option is particularly useful in that it allows you to position the popover in the flow of the document near the triggering element - which will prevent the popover from floating away from the triggering element during a window resize. | | `content` | string, element, function | `''` | Default content value if `data-bs-content` attribute isn't present. If a function is given, it will be called with its `this` reference set to the element that the popover is attached to. +| `customClass` | string, function | `''` | Add classes to the popover when it is shown. Note that these classes will be added in addition to any classes specified in the template. To add multiple classes, separate them with spaces: `'class-1 class-2'`. You can also pass a function that should return a single string containing additional class names. | | `delay` | number, object | `0` | Delay showing and hiding the popover (ms)—doesn't apply to manual trigger type. If a number is supplied, delay is applied to both hide/show. Object structure is: `delay: { "show": 500, "hide": 100 }`. | +| `fallbackPlacements` | string, array | `['top', 'right', 'bottom', 'left']` | Define fallback placements by providing a list of placements in array (in order of preference). For more information refer to Popper's [behavior docs](https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements). | | `html` | boolean | `false` | Allow HTML in the popover. If true, HTML tags in the popover's `title` will be rendered in the popover. If false, `innerText` property will be used to insert content into the DOM. Use text if you're worried about XSS attacks. | +| `offset` | number, string, function | `[0, 0]` | Offset of the popover relative to its target. You can pass a string in data attributes with comma separated values like: `data-bs-offset="10,20"`. When a function is used to determine the offset, it is called with an object containing the popper placement, the reference, and popper rects as its first argument. The triggering element DOM node is passed as the second argument. The function must return an array with two numbers: [skidding](https://popper.js.org/docs/v2/modifiers/offset/#skidding-1), [distance](https://popper.js.org/docs/v2/modifiers/offset/#distance-1). For more information refer to Popper's [offset docs](https://popper.js.org/docs/v2/modifiers/offset/#options). | | `placement` | string, function | `'top'` | How to position the popover: auto, top, bottom, left, right. When `auto` is specified, it will dynamically reorient the popover. When a function is used to determine the placement, it is called with the popover DOM node as its first argument and the triggering element DOM node as its second. The `this` context is set to the popover instance. | +| `popperConfig` | null, object, function | `null` | To change Bootstrap's default Popper config, see [Popper's configuration](https://popper.js.org/docs/v2/constructors/#options). When a function is used to create the Popper configuration, it's called with an object that contains the Bootstrap's default Popper configuration. It helps you use and merge the default with your own configuration. The function must return a configuration object for Popper.| +| `sanitize` | boolean | `true` | Enable or disable the sanitization. If activated `'template'`, `'content'` and `'title'` options will be sanitized. | +| `sanitizeFn` | null, function | `null` | Here you can supply your own sanitize function. This can be useful if you prefer to use a dedicated library to perform sanitization. | | `selector` | string, false | `false` | If a selector is provided, popover objects will be delegated to the specified targets. In practice, this is used to also apply popovers to dynamically added DOM elements (`jQuery.on` support). See [this issue]({{< param repo >}}/issues/4215) and [an informative example](https://codepen.io/Johann-S/pen/djJYPb). | | `template` | string | `'<div class="popover" role="popover"><div class="popover-arrow"></div><div class="popover-inner"></div></div>'` | Base HTML to use when creating the popover. The popover's `title` will be injected into the `.popover-inner`. `.popover-arrow` will become the popover's arrow. The outermost wrapper element should have the `.popover` class and `role="popover"`. | | `title` | string, element, function | `''` | Default title value if `title` attribute isn't present. If a function is given, it will be called with its `this` reference set to the element that the popover is attached to. | -| `customClass` | string, function | `''` | Add classes to the popover when it is shown. Note that these classes will be added in addition to any classes specified in the template. To add multiple classes, separate them with spaces: `'class-1 class-2'`. You can also pass a function that should return a single string containing additional class names. | | `trigger` | string | `'hover focus'` | How popover is triggered: click, hover, focus, manual. You may pass multiple triggers; separate them with a space. `'manual'` indicates that the popover will be triggered programmatically via the `.popover('show')`, `.popover('hide')` and `.popover('toggle')` methods; this value cannot be combined with any other trigger. `'hover'` on its own will result in popovers that cannot be triggered via the keyboard, and should only be used if alternative methods for conveying the same information for keyboard users is present. | -| `offset` | number, string, function | `[0, 0]` | Offset of the popover relative to its target. You can pass a string in data attributes with comma separated values like: `data-bs-offset="10,20"`. When a function is used to determine the offset, it is called with an object containing the popper placement, the reference, and popper rects as its first argument. The triggering element DOM node is passed as the second argument. The function must return an array with two numbers: [skidding](https://popper.js.org/docs/v2/modifiers/offset/#skidding-1), [distance](https://popper.js.org/docs/v2/modifiers/offset/#distance-1). For more information refer to Popper's [offset docs](https://popper.js.org/docs/v2/modifiers/offset/#options). | -| `fallbackPlacements` | string, array | `['top', 'right', 'bottom', 'left']` | Define fallback placements by providing a list of placements in array (in order of preference). For more information refer to Popper's [behavior docs](https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements). | -| `boundary` | string, element | `'clippingParents'` | Overflow constraint boundary of the popover (applies only to Popper's preventOverflow modifier). By default, it's `'clippingParents'` and can accept an HTMLElement reference (via JavaScript only). For more information refer to Popper's [detectOverflow docs](https://popper.js.org/docs/v2/utils/detect-overflow/#boundary). | -| `sanitize` | boolean | `true` | Enable or disable the sanitization. If activated `'template'`, `'content'` and `'title'` options will be sanitized. | -| `allowList` | object | [Default value]({{< docsref "/getting-started/javascript#sanitizer" >}}) | Object which contains allowed attributes and tags. | -| `sanitizeFn` | null, function | `null` | Here you can supply your own sanitize function. This can be useful if you prefer to use a dedicated library to perform sanitization. | -| `popperConfig` | null, object, function | `null` | To change Bootstrap's default Popper config, see [Popper's configuration](https://popper.js.org/docs/v2/constructors/#options). When a function is used to create the Popper configuration, it's called with an object that contains the Bootstrap's default Popper configuration. It helps you use and merge the default with your own configuration. The function must return a configuration object for Popper.| {{< /bs-table >}} {{< callout info >}} @@ -223,17 +223,17 @@ const popover = new bootstrap.Popover(element, { {{< bs-table "table" >}} | Method | Description | | --- | --- | -| `show` | Reveals an element's popover. **Returns to the caller before the popover has actually been shown** (i.e. before the `shown.bs.popover` event occurs). This is considered a "manual" triggering of the popover. Popovers whose title and content are both zero-length are never displayed. | -| `hide` | Hides an element's popover. **Returns to the caller before the popover has actually been hidden** (i.e. before the `hidden.bs.popover` event occurs). This is considered a "manual" triggering of the popover. | -| `toggle` | Toggles an element's popover. **Returns to the caller before the popover has actually been shown or hidden** (i.e. before the `shown.bs.popover` or `hidden.bs.popover` event occurs). This is considered a "manual" triggering of the popover. | +| `disable` | Removes the ability for an element's popover to be shown. The popover will only be able to be shown if it is re-enabled. | | `dispose` | Hides and destroys an element's popover (Removes stored data on the DOM element). Popovers that use delegation (which are created using [the `selector` option](#options)) cannot be individually destroyed on descendant trigger elements. | | `enable` | Gives an element's popover the ability to be shown. **Popovers are enabled by default.** | -| `disable` | Removes the ability for an element's popover to be shown. The popover will only be able to be shown if it is re-enabled. | +| `getInstance` | _Static_ method which allows you to get the popover instance associated with a DOM element. | +| `getOrCreateInstance` | *Static* method which allows you to get the popover instance associated with a DOM element, or create a new one in case it wasn't initialized | +| `hide` | Hides an element's popover. **Returns to the caller before the popover has actually been hidden** (i.e. before the `hidden.bs.popover` event occurs). This is considered a "manual" triggering of the popover. | | `setContent` | Gives a way to change the popover's content after its initialization. | +| `show` | Reveals an element's popover. **Returns to the caller before the popover has actually been shown** (i.e. before the `shown.bs.popover` event occurs). This is considered a "manual" triggering of the popover. Popovers whose title and content are both zero-length are never displayed. | +| `toggle` | Toggles an element's popover. **Returns to the caller before the popover has actually been shown or hidden** (i.e. before the `shown.bs.popover` or `hidden.bs.popover` event occurs). This is considered a "manual" triggering of the popover. | | `toggleEnabled` | Toggles the ability for an element's popover to be shown or hidden. | | `update` | Updates the position of an element's popover. | -| `getInstance` | _Static_ method which allows you to get the popover instance associated with a DOM element. | -| `getOrCreateInstance` | *Static* method which allows you to get the popover instance associated with a DOM element, or create a new one in case it wasn't initialized | {{< /bs-table >}} diff --git a/site/content/docs/5.2/components/scrollspy.md b/site/content/docs/5.2/components/scrollspy.md index 30cf79b3e7..be2564e6ef 100644 --- a/site/content/docs/5.2/components/scrollspy.md +++ b/site/content/docs/5.2/components/scrollspy.md @@ -62,7 +62,7 @@ Scroll the area below the navbar and watch the active class change. Open the dro </div> ```html -<nav id="navbar-example2" class="navbar bg-light px-3"> +<nav id="navbar-example2" class="navbar bg-light px-3 mb-3"> <a class="navbar-brand" href="#">Navbar</a> <ul class="nav nav-pills"> <li class="nav-item"> @@ -82,7 +82,7 @@ Scroll the area below the navbar and watch the active class change. Open the dro </li> </ul> </nav> -<div data-bs-spy="scroll" data-bs-target="#navbar-example2" data-bs-root-margin="0px 0px -40%" data-bs-smooth-scroll="true" class="scrollspy-example" tabindex="0"> +<div data-bs-spy="scroll" data-bs-target="#navbar-example2" data-bs-root-margin="0px 0px -40%" data-bs-smooth-scroll="true" class="scrollspy-example bg-light p-3 rounded-2" tabindex="0"> <h4 id="scrollspyHeading1">First heading</h4> <p>...</p> <h4 id="scrollspyHeading2">Second heading</h4> @@ -162,51 +162,54 @@ Scrollspy also works with nested `.nav`s. If a nested `.nav` is `.active`, its p </div> ```html -<nav id="navbar-example3" class="navbar bg-light flex-column align-items-stretch p-3"> - <a class="navbar-brand" href="#">Navbar</a> - <nav class="nav nav-pills flex-column"> - <a class="nav-link" href="#item-1">Item 1</a> - <nav class="nav nav-pills flex-column"> - <a class="nav-link ms-3 my-1" href="#item-1-1">Item 1-1</a> - <a class="nav-link ms-3 my-1" href="#item-1-2">Item 1-2</a> - </nav> - <a class="nav-link" href="#item-2">Item 2</a> - <a class="nav-link" href="#item-3">Item 3</a> +<div class="col-4"> + <nav id="navbar-example3" class="h-100 flex-column align-items-stretch pe-4 border-end"> <nav class="nav nav-pills flex-column"> - <a class="nav-link ms-3 my-1" href="#item-3-1">Item 3-1</a> - <a class="nav-link ms-3 my-1" href="#item-3-2">Item 3-2</a> + <a class="nav-link" href="#item-1">Item 1</a> + <nav class="nav nav-pills flex-column"> + <a class="nav-link ms-3 my-1" href="#item-1-1">Item 1-1</a> + <a class="nav-link ms-3 my-1" href="#item-1-2">Item 1-2</a> + </nav> + <a class="nav-link" href="#item-2">Item 2</a> + <a class="nav-link" href="#item-3">Item 3</a> + <nav class="nav nav-pills flex-column"> + <a class="nav-link ms-3 my-1" href="#item-3-1">Item 3-1</a> + <a class="nav-link ms-3 my-1" href="#item-3-2">Item 3-2</a> + </nav> </nav> </nav> -</nav> +</div> -<div data-bs-spy="scroll" data-bs-target="#navbar-example3" data-bs-smooth-scroll="true" tabindex="0"> - <div id="item-1"> - <h4>Item 1</h4> - <p>...</p> - </div> - <div id="item-1-1"> - <h5>Item 1-1</h5> - <p>...</p> - </div> - <div id="item-1-2"> - <h5>Item 1-2</h5> - <p>...</p> - </div> - <div id="item-2"> - <h4>Item 2</h4> - <p>...</p> - </div> - <div id="item-3"> - <h4>Item 3</h4> - <p>...</p> - </div> - <div id="item-3-1"> - <h5>Item 3-1</h5> - <p>...</p> - </div> - <div id="item-3-2"> - <h5>Item 3-2</h5> - <p>...</p> +<div class="col-8"> + <div data-bs-spy="scroll" data-bs-target="#navbar-example3" data-bs-smooth-scroll="true" class="scrollspy-example-2" tabindex="0"> + <div id="item-1"> + <h4>Item 1</h4> + <p>...</p> + </div> + <div id="item-1-1"> + <h5>Item 1-1</h5> + <p>...</p> + </div> + <div id="item-1-2"> + <h5>Item 1-2</h5> + <p>...</p> + </div> + <div id="item-2"> + <h4>Item 2</h4> + <p>...</p> + </div> + <div id="item-3"> + <h4>Item 3</h4> + <p>...</p> + </div> + <div id="item-3-1"> + <h5>Item 3-1</h5> + <p>...</p> + </div> + <div id="item-3-2"> + <h5>Item 3-2</h5> + <p>...</p> + </div> </div> </div> ``` @@ -241,21 +244,25 @@ Scrollspy also works with `.list-group`s. Scroll the area next to the list group </div> ```html -<div id="list-example" class="list-group"> - <a class="list-group-item list-group-item-action" href="#list-item-1">Item 1</a> - <a class="list-group-item list-group-item-action" href="#list-item-2">Item 2</a> - <a class="list-group-item list-group-item-action" href="#list-item-3">Item 3</a> - <a class="list-group-item list-group-item-action" href="#list-item-4">Item 4</a> +<div class="col-4"> + <div id="list-example" class="list-group"> + <a class="list-group-item list-group-item-action" href="#list-item-1">Item 1</a> + <a class="list-group-item list-group-item-action" href="#list-item-2">Item 2</a> + <a class="list-group-item list-group-item-action" href="#list-item-3">Item 3</a> + <a class="list-group-item list-group-item-action" href="#list-item-4">Item 4</a> + </div> </div> -<div data-bs-spy="scroll" data-bs-target="#list-example" data-bs-smooth-scroll="true" class="scrollspy-example" tabindex="0"> - <h4 id="list-item-1">Item 1</h4> - <p>...</p> - <h4 id="list-item-2">Item 2</h4> - <p>...</p> - <h4 id="list-item-3">Item 3</h4> - <p>...</p> - <h4 id="list-item-4">Item 4</h4> - <p>...</p> +<div class="col-8"> + <div data-bs-spy="scroll" data-bs-target="#list-example" data-bs-smooth-scroll="true" class="scrollspy-example" tabindex="0"> + <h4 id="list-item-1">Item 1</h4> + <p>...</p> + <h4 id="list-item-2">Item 2</h4> + <p>...</p> + <h4 id="list-item-3">Item 3</h4> + <p>...</p> + <h4 id="list-item-4">Item 4</h4> + <p>...</p> + </div> </div> ``` @@ -292,21 +299,28 @@ Scrollspy is not limited to nav components and list groups, so it will work on a </div> ```html -<div id="list-example" class="d-flex flex-column"> - <a href="#item-1">Item 1</a> - <a href="#item-2">Item 2</a> - <a href="#item-3">Item 3</a> - <a href="#item-4">Item 4</a> +<div class="col-4"> + <div id="list-example" class="d-flex flex-column gap-2 simple-list-example-scrollspy text-center"> + <a class="p-1 rounded" href="#simple-list-item-1">Item 1</a> + <a class="p-1 rounded" href="#simple-list-item-2">Item 2</a> + <a class="p-1 rounded" href="#simple-list-item-3">Item 3</a> + <a class="p-1 rounded" href="#simple-list-item-4">Item 4</a> + <a class="p-1 rounded" href="#simple-list-item-5">Item 5</a> + </div> </div> -<div data-bs-spy="scroll" data-bs-target="#list-example" data-bs-offset="0" data-bs-smooth-scroll="true" class="scrollspy-example" tabindex="0"> - <h4 id="item-1">Item 1</h4> - <p>...</p> - <h4 id="item-2">Item 2</h4> - <p>...</p> - <h4 id="item-3">Item 3</h4> - <p>...</p> - <h4 id="item-4">Item 4</h4> - <p>...</p> +<div class="col-8"> + <div data-bs-spy="scroll" data-bs-target="#list-example" data-bs-offset="0" data-bs-smooth-scroll="true" class="scrollspy-example" tabindex="0"> + <h4 id="simple-list-item-1">Item 1</h4> + <p>...</p> + <h4 id="simple-list-item-2">Item 2</h4> + <p>...</p> + <h4 id="simple-list-item-3">Item 3</h4> + <p>...</p> + <h4 id="simple-list-item-4">Item 4</h4> + <p>...</p> + <h4 id="simple-list-item-5">Item 5</h4> + <p>...</p> + </div> </div> ``` @@ -362,10 +376,10 @@ To keep backwards compatibility, we will continue to parse a given `offset` to ` {{< bs-table "table" >}} | Method | Description | | --- | --- | -| `refresh` | When adding or removing elements in the DOM, you'll need to call the refresh method. | | `dispose` | Destroys an element's scrollspy. (Removes stored data on the DOM element) | | `getInstance` | *Static* method to get the scrollspy instance associated with a DOM element | | `getOrCreateInstance` | *Static* method to get the scrollspy instance associated with a DOM element, or to create a new one in case it wasn't initialized. | +| `refresh` | When adding or removing elements in the DOM, you'll need to call the refresh method. | {{< /bs-table >}} Here's an example using the refresh method: diff --git a/site/content/docs/5.2/components/toasts.md b/site/content/docs/5.2/components/toasts.md index 46f241cb3b..8c46d9a825 100644 --- a/site/content/docs/5.2/components/toasts.md +++ b/site/content/docs/5.2/components/toasts.md @@ -374,12 +374,12 @@ const toastList = [...toastElList].map(toastEl => new bootstrap.Toast(toastEl, o {{< bs-table "table" >}} | Method | Description | | --- | --- | -| `show` | Reveals an element's toast. **Returns to the caller before the toast has actually been shown** (i.e. before the `shown.bs.toast` event occurs). You have to manually call this method, instead your toast won't show. | -| `hide` | Hides an element's toast. **Returns to the caller before the toast has actually been hidden** (i.e. before the `hidden.bs.toast` event occurs). You have to manually call this method if you made `autohide` to `false`. | -| `isShown` | Returns a boolean according to toast's visibility state. | | `dispose` | Hides an element's toast. Your toast will remain on the DOM but won't show anymore. | | `getInstance` | *Static* method which allows you to get the scrollspy instance associated with a DOM element. <br> For example: `const myToastEl = document.getElementById('myToastEl')` `const myToast = bootstrap.Toast.getInstance(myToastEl)` Returns a Bootstrap toast instance| | `getOrCreateInstance` | *Static* method which allows you to get the scrollspy instance associated with a DOM element, or create a new one, in case it wasn't initialized. <br>`const myToastEl = document.getElementById('myToastEl')` `const myToast = bootstrap.Toast.getOrCreateInstance(myToastEl)` Returns a Bootstrap toast instance | +| `hide` | Hides an element's toast. **Returns to the caller before the toast has actually been hidden** (i.e. before the `hidden.bs.toast` event occurs). You have to manually call this method if you made `autohide` to `false`. | +| `isShown` | Returns a boolean according to toast's visibility state. | +| `show` | Reveals an element's toast. **Returns to the caller before the toast has actually been shown** (i.e. before the `shown.bs.toast` event occurs). You have to manually call this method, instead your toast won't show. | {{< /bs-table >}} ### Events @@ -387,10 +387,10 @@ const toastList = [...toastElList].map(toastEl => new bootstrap.Toast(toastEl, o {{< bs-table "table" >}} | Event | Description | | --- | --- | -| `show.bs.toast` | This event fires immediately when the `show` instance method is called. | -| `shown.bs.toast` | This event is fired when the toast has been made visible to the user. | | `hide.bs.toast` | This event is fired immediately when the `hide` instance method has been called. | | `hidden.bs.toast` | This event is fired when the toast has finished being hidden from the user. | +| `show.bs.toast` | This event fires immediately when the `show` instance method is called. | +| `shown.bs.toast` | This event is fired when the toast has been made visible to the user. | {{< /bs-table >}} ```js diff --git a/site/content/docs/5.2/examples/blog-rtl/index.html b/site/content/docs/5.2/examples/blog-rtl/index.html index 1aa228ead0..05af925eb1 100644 --- a/site/content/docs/5.2/examples/blog-rtl/index.html +++ b/site/content/docs/5.2/examples/blog-rtl/index.html @@ -45,7 +45,7 @@ include_js: false </div> <main class="container"> - <div class="p-4 p-md-5 mb-4 text-white rounded bg-dark"> + <div class="p-4 p-md-5 mb-4 rounded text-bg-dark"> <div class="col-md-6 px-0"> <h1 class="display-4 fst-italic">عنوان تدوينة مميزة أطول</h1> <p class="lead my-3">عدة أسطر نصية متعددة تعبر عن التدوية، وذلك لإعلام القراء الجدد بسرعة وكفاءة حول أكثر الأشياء إثارة للاهتمام في محتويات هذه التدوينة.</p> diff --git a/site/content/docs/5.2/examples/blog/index.html b/site/content/docs/5.2/examples/blog/index.html index dc5339c8a2..6b60ea069f 100644 --- a/site/content/docs/5.2/examples/blog/index.html +++ b/site/content/docs/5.2/examples/blog/index.html @@ -44,7 +44,7 @@ include_js: false </div> <main class="container"> - <div class="p-4 p-md-5 mb-4 text-white rounded bg-dark"> + <div class="p-4 p-md-5 mb-4 rounded text-bg-dark"> <div class="col-md-6 px-0"> <h1 class="display-4 fst-italic">Title of a longer featured blog post</h1> <p class="lead my-3">Multiple lines of text that form the lede, informing new readers quickly and efficiently about what’s most interesting in this post’s contents.</p> diff --git a/site/content/docs/5.2/examples/cheatsheet-rtl/index.html b/site/content/docs/5.2/examples/cheatsheet-rtl/index.html index 91e7e0ecb5..2a1db691cf 100644 --- a/site/content/docs/5.2/examples/cheatsheet-rtl/index.html +++ b/site/content/docs/5.2/examples/cheatsheet-rtl/index.html @@ -692,16 +692,16 @@ direction: rtl <p class="h2">مثال على عنوان <span class="badge bg-secondary">جديد</span></p> <p class="h3">مثال على عنوان <span class="badge bg-success">جديد</span></p> <p class="h4">مثال على عنوان <span class="badge bg-danger">جديد</span></p> - <p class="h5">مثال على عنوان <span class="badge bg-warning text-dark">جديد</span></p> - <p class="h6">مثال على عنوان <span class="badge bg-info text-dark">جديد</span></p> - <p class="h6">مثال على عنوان <span class="badge bg-light text-dark">جديد</span></p> + <p class="h5">مثال على عنوان <span class="badge text-bg-warning">جديد</span></p> + <p class="h6">مثال على عنوان <span class="badge text-bg-info">جديد</span></p> + <p class="h6">مثال على عنوان <span class="badge text-bg-light">جديد</span></p> <p class="h6">مثال على عنوان <span class="badge bg-dark">جديد</span></p> {{< /example >}} {{< example show_markup="false" >}} {{< badge.inline >}} {{- range (index $.Site.Data "theme-colors") }} - <span class="badge rounded-pill bg-{{ .name }}{{ if or (eq .name "light") (eq .name "warning") (eq .name "info") }} text-dark{{ end }}">{{ .name | title }}</span>{{- end -}} + <span class="badge rounded-pill {{ if or (eq .name "light") (eq .name "warning") (eq .name "info") }}text-{{ end }}bg-{{ .name }}">{{ .name | title }}</span>{{- end -}} {{< /badge.inline >}} {{< /example >}} </div> @@ -1395,10 +1395,10 @@ direction: rtl <div class="progress-bar bg-success w-25" role="progressbar" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100">25%</div> </div> <div class="progress mb-3"> - <div class="progress-bar bg-info text-dark w-50" role="progressbar" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100">50%</div> + <div class="progress-bar text-bg-info w-50" role="progressbar" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100">50%</div> </div> <div class="progress mb-3"> - <div class="progress-bar bg-warning text-dark w-75" role="progressbar" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100">75%</div> + <div class="progress-bar text-bg-warning w-75" role="progressbar" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100">75%</div> </div> <div class="progress"> <div class="progress-bar bg-danger w-100" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100">100%</div> diff --git a/site/content/docs/5.2/examples/cheatsheet/index.html b/site/content/docs/5.2/examples/cheatsheet/index.html index c3c76fae0d..afd66d4fa8 100644 --- a/site/content/docs/5.2/examples/cheatsheet/index.html +++ b/site/content/docs/5.2/examples/cheatsheet/index.html @@ -691,16 +691,16 @@ body_class: "bg-light" <p class="h2">Example heading <span class="badge bg-secondary">New</span></p> <p class="h3">Example heading <span class="badge bg-success">New</span></p> <p class="h4">Example heading <span class="badge bg-danger">New</span></p> - <p class="h5">Example heading <span class="badge bg-warning text-dark">New</span></p> - <p class="h6">Example heading <span class="badge bg-info text-dark">New</span></p> - <p class="h6">Example heading <span class="badge bg-light text-dark">New</span></p> + <p class="h5">Example heading <span class="badge text-bg-warning">New</span></p> + <p class="h6">Example heading <span class="badge text-bg-info">New</span></p> + <p class="h6">Example heading <span class="badge text-bg-light">New</span></p> <p class="h6">Example heading <span class="badge bg-dark">New</span></p> {{< /example >}} {{< example show_markup="false" >}} {{< badge.inline >}} {{- range (index $.Site.Data "theme-colors") }} - <span class="badge rounded-pill bg-{{ .name }}{{ if or (eq .name "light") (eq .name "warning") (eq .name "info") }} text-dark{{ end }}">{{ .name | title }}</span>{{- end -}} + <span class="badge rounded-pill {{ if or (eq .name "light") (eq .name "warning") (eq .name "info") }}text-{{ end }}bg-{{ .name }}">{{ .name | title }}</span>{{- end -}} {{< /badge.inline >}} {{< /example >}} </div> @@ -1392,10 +1392,10 @@ body_class: "bg-light" <div class="progress-bar bg-success w-25" role="progressbar" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100">25%</div> </div> <div class="progress mb-3"> - <div class="progress-bar bg-info text-dark w-50" role="progressbar" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100">50%</div> + <div class="progress-bar text-bg-info w-50" role="progressbar" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100">50%</div> </div> <div class="progress mb-3"> - <div class="progress-bar bg-warning text-dark w-75" role="progressbar" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100">75%</div> + <div class="progress-bar text-bg-warning w-75" role="progressbar" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100">75%</div> </div> <div class="progress"> <div class="progress-bar bg-danger w-100" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100">100%</div> diff --git a/site/content/docs/5.2/examples/cover/index.html b/site/content/docs/5.2/examples/cover/index.html index e8276a8de3..34dc1c2b64 100644 --- a/site/content/docs/5.2/examples/cover/index.html +++ b/site/content/docs/5.2/examples/cover/index.html @@ -4,7 +4,7 @@ title: Cover Template extra_css: - "cover.css" html_class: "h-100" -body_class: "d-flex h-100 text-center text-white bg-dark" +body_class: "d-flex h-100 text-center text-bg-dark" include_js: false --- diff --git a/site/content/docs/5.2/examples/features/index.html b/site/content/docs/5.2/examples/features/index.html index ebbde2d30d..07ae5ad3c4 100644 --- a/site/content/docs/5.2/examples/features/index.html +++ b/site/content/docs/5.2/examples/features/index.html @@ -71,7 +71,7 @@ body_class: "" <h2 class="pb-2 border-bottom">Columns with icons</h2> <div class="row g-4 py-5 row-cols-1 row-cols-lg-3"> <div class="feature col"> - <div class="feature-icon d-inline-flex align-items-center justify-content-center bg-primary bg-gradient text-white fs-2 mb-3"> + <div class="feature-icon d-inline-flex align-items-center justify-content-center text-bg-primary bg-gradient fs-2 mb-3"> <svg class="bi" width="1em" height="1em"><use xlink:href="#collection"/></svg> </div> <h2>Featured title</h2> @@ -82,7 +82,7 @@ body_class: "" </a> </div> <div class="feature col"> - <div class="feature-icon d-inline-flex align-items-center justify-content-center bg-primary bg-gradient text-white fs-2 mb-3"> + <div class="feature-icon d-inline-flex align-items-center justify-content-center text-bg-primary bg-gradient fs-2 mb-3"> <svg class="bi" width="1em" height="1em"><use xlink:href="#people-circle"/></svg> </div> <h2>Featured title</h2> @@ -93,7 +93,7 @@ body_class: "" </a> </div> <div class="feature col"> - <div class="feature-icon d-inline-flex align-items-center justify-content-center bg-primary bg-gradient text-white fs-2 mb-3"> + <div class="feature-icon d-inline-flex align-items-center justify-content-center text-bg-primary bg-gradient fs-2 mb-3"> <svg class="bi" width="1em" height="1em"><use xlink:href="#toggles2"/></svg> </div> <h2>Featured title</h2> @@ -112,7 +112,7 @@ body_class: "" <h2 class="pb-2 border-bottom">Hanging icons</h2> <div class="row g-4 py-5 row-cols-1 row-cols-lg-3"> <div class="col d-flex align-items-start"> - <div class="icon-square bg-light text-dark d-inline-flex align-items-center justify-content-center fs-4 flex-shrink-0 me-3"> + <div class="icon-square text-bg-light d-inline-flex align-items-center justify-content-center fs-4 flex-shrink-0 me-3"> <svg class="bi" width="1em" height="1em"><use xlink:href="#toggles2"/></svg> </div> <div> @@ -124,7 +124,7 @@ body_class: "" </div> </div> <div class="col d-flex align-items-start"> - <div class="icon-square bg-light text-dark d-inline-flex align-items-center justify-content-center fs-4 flex-shrink-0 me-3"> + <div class="icon-square text-bg-light d-inline-flex align-items-center justify-content-center fs-4 flex-shrink-0 me-3"> <svg class="bi" width="1em" height="1em"><use xlink:href="#cpu-fill"/></svg> </div> <div> @@ -136,7 +136,7 @@ body_class: "" </div> </div> <div class="col d-flex align-items-start"> - <div class="icon-square bg-light text-dark d-inline-flex align-items-center justify-content-center fs-4 flex-shrink-0 me-3"> + <div class="icon-square text-bg-light d-inline-flex align-items-center justify-content-center fs-4 flex-shrink-0 me-3"> <svg class="bi" width="1em" height="1em"><use xlink:href="#tools"/></svg> </div> <div> @@ -157,7 +157,7 @@ body_class: "" <div class="row row-cols-1 row-cols-lg-3 align-items-stretch g-4 py-5"> <div class="col"> - <div class="card card-cover h-100 overflow-hidden text-white bg-dark rounded-4 shadow-lg" style="background-image: url('unsplash-photo-1.jpg');"> + <div class="card card-cover h-100 overflow-hidden text-bg-dark rounded-4 shadow-lg" style="background-image: url('unsplash-photo-1.jpg');"> <div class="d-flex flex-column h-100 p-5 pb-3 text-white text-shadow-1"> <h2 class="pt-5 mt-5 mb-4 display-6 lh-1 fw-bold">Short title, long jacket</h2> <ul class="d-flex list-unstyled mt-auto"> @@ -178,7 +178,7 @@ body_class: "" </div> <div class="col"> - <div class="card card-cover h-100 overflow-hidden text-white bg-dark rounded-4 shadow-lg" style="background-image: url('unsplash-photo-2.jpg');"> + <div class="card card-cover h-100 overflow-hidden text-bg-dark rounded-4 shadow-lg" style="background-image: url('unsplash-photo-2.jpg');"> <div class="d-flex flex-column h-100 p-5 pb-3 text-white text-shadow-1"> <h2 class="pt-5 mt-5 mb-4 display-6 lh-1 fw-bold">Much longer title that wraps to multiple lines</h2> <ul class="d-flex list-unstyled mt-auto"> @@ -199,7 +199,7 @@ body_class: "" </div> <div class="col"> - <div class="card card-cover h-100 overflow-hidden text-white bg-dark rounded-4 shadow-lg" style="background-image: url('unsplash-photo-3.jpg');"> + <div class="card card-cover h-100 overflow-hidden text-bg-dark rounded-4 shadow-lg" style="background-image: url('unsplash-photo-3.jpg');"> <div class="d-flex flex-column h-100 p-5 pb-3 text-shadow-1"> <h2 class="pt-5 mt-5 mb-4 display-6 lh-1 fw-bold">Another longer title belongs here</h2> <ul class="d-flex list-unstyled mt-auto"> diff --git a/site/content/docs/5.2/examples/grid/index.html b/site/content/docs/5.2/examples/grid/index.html index fae182a1cd..7c4f1d322f 100644 --- a/site/content/docs/5.2/examples/grid/index.html +++ b/site/content/docs/5.2/examples/grid/index.html @@ -17,37 +17,37 @@ include_js: false <h2 class="mt-4">Five grid tiers</h2> <p>There are five tiers to the Bootstrap grid system, one for each range of devices we support. Each tier starts at a minimum viewport size and automatically applies to the larger devices unless overridden.</p> - <div class="row mb-3"> + <div class="row mb-3 text-center"> <div class="col-4 themed-grid-col">.col-4</div> <div class="col-4 themed-grid-col">.col-4</div> <div class="col-4 themed-grid-col">.col-4</div> </div> - <div class="row mb-3"> + <div class="row mb-3 text-center"> <div class="col-sm-4 themed-grid-col">.col-sm-4</div> <div class="col-sm-4 themed-grid-col">.col-sm-4</div> <div class="col-sm-4 themed-grid-col">.col-sm-4</div> </div> - <div class="row mb-3"> + <div class="row mb-3 text-center"> <div class="col-md-4 themed-grid-col">.col-md-4</div> <div class="col-md-4 themed-grid-col">.col-md-4</div> <div class="col-md-4 themed-grid-col">.col-md-4</div> </div> - <div class="row mb-3"> + <div class="row mb-3 text-center"> <div class="col-lg-4 themed-grid-col">.col-lg-4</div> <div class="col-lg-4 themed-grid-col">.col-lg-4</div> <div class="col-lg-4 themed-grid-col">.col-lg-4</div> </div> - <div class="row mb-3"> + <div class="row mb-3 text-center"> <div class="col-xl-4 themed-grid-col">.col-xl-4</div> <div class="col-xl-4 themed-grid-col">.col-xl-4</div> <div class="col-xl-4 themed-grid-col">.col-xl-4</div> </div> - <div class="row mb-3"> + <div class="row mb-3 text-center"> <div class="col-xxl-4 themed-grid-col">.col-xxl-4</div> <div class="col-xxl-4 themed-grid-col">.col-xxl-4</div> <div class="col-xxl-4 themed-grid-col">.col-xxl-4</div> @@ -55,7 +55,7 @@ include_js: false <h2 class="mt-4">Three equal columns</h2> <p>Get three equal-width columns <strong>starting at desktops and scaling to large desktops</strong>. On mobile devices, tablets and below, the columns will automatically stack.</p> - <div class="row mb-3"> + <div class="row mb-3 text-center"> <div class="col-md-4 themed-grid-col">.col-md-4</div> <div class="col-md-4 themed-grid-col">.col-md-4</div> <div class="col-md-4 themed-grid-col">.col-md-4</div> @@ -63,7 +63,7 @@ include_js: false <h2 class="mt-4">Three equal columns alternative</h2> <p>By using the <code>.row-cols-*</code> classes, you can easily create a grid with equal columns.</p> - <div class="row row-cols-md-3 mb-3"> + <div class="row row-cols-md-3 mb-3 text-center"> <div class="col themed-grid-col"><code>.col</code> child of <code>.row-cols-md-3</code></div> <div class="col themed-grid-col"><code>.col</code> child of <code>.row-cols-md-3</code></div> <div class="col themed-grid-col"><code>.col</code> child of <code>.row-cols-md-3</code></div> @@ -71,7 +71,7 @@ include_js: false <h2 class="mt-4">Three unequal columns</h2> <p>Get three columns <strong>starting at desktops and scaling to large desktops</strong> of various widths. Remember, grid columns should add up to twelve for a single horizontal block. More than that, and columns start stacking no matter the viewport.</p> - <div class="row mb-3"> + <div class="row mb-3 text-center"> <div class="col-md-3 themed-grid-col">.col-md-3</div> <div class="col-md-6 themed-grid-col">.col-md-6</div> <div class="col-md-3 themed-grid-col">.col-md-3</div> @@ -79,7 +79,7 @@ include_js: false <h2 class="mt-4">Two columns</h2> <p>Get two columns <strong>starting at desktops and scaling to large desktops</strong>.</p> - <div class="row mb-3"> + <div class="row mb-3 text-center"> <div class="col-md-8 themed-grid-col">.col-md-8</div> <div class="col-md-4 themed-grid-col">.col-md-4</div> </div> @@ -94,7 +94,7 @@ include_js: false <h2 class="mt-4">Two columns with two nested columns</h2> <p>Per the documentation, nesting is easy—just put a row of columns within an existing column. This gives you two columns <strong>starting at desktops and scaling to large desktops</strong>, with another two (equal widths) within the larger column.</p> <p>At mobile device sizes, tablets and down, these columns and their nested columns will stack.</p> - <div class="row mb-3"> + <div class="row mb-3 text-center"> <div class="col-md-8 themed-grid-col"> <div class="pb-3"> .col-md-8 @@ -112,16 +112,16 @@ include_js: false <h2 class="mt-4">Mixed: mobile and desktop</h2> <p>The Bootstrap v5 grid system has six tiers of classes: xs (extra small, this class infix is not used), sm (small), md (medium), lg (large), xl (x-large), and xxl (xx-large). You can use nearly any combination of these classes to create more dynamic and flexible layouts.</p> <p>Each tier of classes scales up, meaning if you plan on setting the same widths for md, lg, xl and xxl, you only need to specify md.</p> - <div class="row mb-3"> + <div class="row mb-3 text-center"> <div class="col-md-8 themed-grid-col">.col-md-8</div> <div class="col-6 col-md-4 themed-grid-col">.col-6 .col-md-4</div> </div> - <div class="row mb-3"> + <div class="row mb-3 text-center"> <div class="col-6 col-md-4 themed-grid-col">.col-6 .col-md-4</div> <div class="col-6 col-md-4 themed-grid-col">.col-6 .col-md-4</div> <div class="col-6 col-md-4 themed-grid-col">.col-6 .col-md-4</div> </div> - <div class="row mb-3"> + <div class="row mb-3 text-center"> <div class="col-6 themed-grid-col">.col-6</div> <div class="col-6 themed-grid-col">.col-6</div> </div> @@ -129,11 +129,11 @@ include_js: false <hr class="my-4"> <h2 class="mt-4">Mixed: mobile, tablet, and desktop</h2> - <div class="row mb-3"> + <div class="row mb-3 text-center"> <div class="col-sm-6 col-lg-8 themed-grid-col">.col-sm-6 .col-lg-8</div> <div class="col-6 col-lg-4 themed-grid-col">.col-6 .col-lg-4</div> </div> - <div class="row mb-3"> + <div class="row mb-3 text-center"> <div class="col-6 col-sm-4 themed-grid-col">.col-6 .col-sm-4</div> <div class="col-6 col-sm-4 themed-grid-col">.col-6 .col-sm-4</div> <div class="col-6 col-sm-4 themed-grid-col">.col-6 .col-sm-4</div> @@ -143,7 +143,7 @@ include_js: false <h2 class="mt-4">Gutters</h2> <p>With <code>.gx-*</code> classes, the horizontal gutters can be adjusted.</p> - <div class="row row-cols-1 row-cols-md-3 gx-4"> + <div class="row row-cols-1 row-cols-md-3 gx-4 text-center"> <div class="col themed-grid-col"><code>.col</code> with <code>.gx-4</code> gutters</div> <div class="col themed-grid-col"><code>.col</code> with <code>.gx-4</code> gutters</div> <div class="col themed-grid-col"><code>.col</code> with <code>.gx-4</code> gutters</div> @@ -152,7 +152,7 @@ include_js: false <div class="col themed-grid-col"><code>.col</code> with <code>.gx-4</code> gutters</div> </div> <p class="mt-4">Use the <code>.gy-*</code> classes to control the vertical gutters.</p> - <div class="row row-cols-1 row-cols-md-3 gy-4"> + <div class="row row-cols-1 row-cols-md-3 gy-4 text-center"> <div class="col themed-grid-col"><code>.col</code> with <code>.gy-4</code> gutters</div> <div class="col themed-grid-col"><code>.col</code> with <code>.gy-4</code> gutters</div> <div class="col themed-grid-col"><code>.col</code> with <code>.gy-4</code> gutters</div> @@ -161,7 +161,7 @@ include_js: false <div class="col themed-grid-col"><code>.col</code> with <code>.gy-4</code> gutters</div> </div> <p class="mt-4">With <code>.g-*</code> classes, the gutters in both directions can be adjusted.</p> - <div class="row row-cols-1 row-cols-md-3 g-3"> + <div class="row row-cols-1 row-cols-md-3 g-3 text-center"> <div class="col themed-grid-col"><code>.col</code> with <code>.g-3</code> gutters</div> <div class="col themed-grid-col"><code>.col</code> with <code>.g-3</code> gutters</div> <div class="col themed-grid-col"><code>.col</code> with <code>.g-3</code> gutters</div> @@ -178,11 +178,11 @@ include_js: false <p>Additional classes added in Bootstrap v4.4 allow containers that are 100% wide until a particular breakpoint. v5 adds a new <code>xxl</code> breakpoint.</p> </div> - <div class="container themed-container">.container</div> - <div class="container-sm themed-container">.container-sm</div> - <div class="container-md themed-container">.container-md</div> - <div class="container-lg themed-container">.container-lg</div> - <div class="container-xl themed-container">.container-xl</div> - <div class="container-xxl themed-container">.container-xxl</div> - <div class="container-fluid themed-container">.container-fluid</div> + <div class="container themed-container text-center">.container</div> + <div class="container-sm themed-container text-center">.container-sm</div> + <div class="container-md themed-container text-center">.container-md</div> + <div class="container-lg themed-container text-center">.container-lg</div> + <div class="container-xl themed-container text-center">.container-xl</div> + <div class="container-xxl themed-container text-center">.container-xxl</div> + <div class="container-fluid themed-container text-center">.container-fluid</div> </main> diff --git a/site/content/docs/5.2/examples/headers/index.html b/site/content/docs/5.2/examples/headers/index.html index 8d82330dc3..5ef2eef163 100644 --- a/site/content/docs/5.2/examples/headers/index.html +++ b/site/content/docs/5.2/examples/headers/index.html @@ -89,7 +89,7 @@ body_class: "" <div class="b-example-divider"></div> - <header class="p-3 bg-dark text-white"> + <header class="p-3 text-bg-dark"> <div class="container"> <div class="d-flex flex-wrap align-items-center justify-content-center justify-content-lg-start"> <a href="/" class="d-flex align-items-center mb-2 mb-lg-0 text-white text-decoration-none"> @@ -105,7 +105,7 @@ body_class: "" </ul> <form class="col-12 col-lg-auto mb-3 mb-lg-0 me-lg-3" role="search"> - <input type="search" class="form-control form-control-dark text-white bg-dark" placeholder="Search..." aria-label="Search"> + <input type="search" class="form-control form-control-dark text-bg-dark" placeholder="Search..." aria-label="Search"> </form> <div class="text-end"> @@ -235,7 +235,7 @@ body_class: "" <div class="b-example-divider"></div> <header> - <div class="px-3 py-2 bg-dark text-white"> + <div class="px-3 py-2 text-bg-dark"> <div class="container"> <div class="d-flex flex-wrap align-items-center justify-content-center justify-content-lg-start"> <a href="/" class="d-flex align-items-center my-2 my-lg-0 me-lg-auto text-white text-decoration-none"> diff --git a/site/content/docs/5.2/examples/jumbotron/index.html b/site/content/docs/5.2/examples/jumbotron/index.html index 99cc61dee3..8131d1903d 100644 --- a/site/content/docs/5.2/examples/jumbotron/index.html +++ b/site/content/docs/5.2/examples/jumbotron/index.html @@ -23,7 +23,7 @@ include_js: false <div class="row align-items-md-stretch"> <div class="col-md-6"> - <div class="h-100 p-5 text-white bg-dark rounded-3"> + <div class="h-100 p-5 text-bg-dark rounded-3"> <h2>Change the background</h2> <p>Swap the background-color utility and add a `.text-*` color utility to mix up the jumbotron look. Then, mix and match with additional component themes and more.</p> <button class="btn btn-outline-light" type="button">Example button</button> diff --git a/site/content/docs/5.2/examples/masonry/index.html b/site/content/docs/5.2/examples/masonry/index.html index 9061d7cceb..b4aecaa172 100644 --- a/site/content/docs/5.2/examples/masonry/index.html +++ b/site/content/docs/5.2/examples/masonry/index.html @@ -54,7 +54,7 @@ extra_js: </div> </div> <div class="col-sm-6 col-lg-4 mb-4"> - <div class="card bg-primary text-white text-center p-3"> + <div class="card text-bg-primary text-center p-3"> <figure class="mb-0"> <blockquote class="blockquote"> <p>A well-known quote, contained in a blockquote element.</p> diff --git a/site/content/docs/5.2/examples/navbars-offcanvas/index.html b/site/content/docs/5.2/examples/navbars-offcanvas/index.html index 47041fa011..b08ed63391 100644 --- a/site/content/docs/5.2/examples/navbars-offcanvas/index.html +++ b/site/content/docs/5.2/examples/navbars-offcanvas/index.html @@ -12,7 +12,7 @@ extra_css: <button class="navbar-toggler" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasNavbarDark" aria-controls="offcanvasNavbarDark"> <span class="navbar-toggler-icon"></span> </button> - <div class="offcanvas offcanvas-end text-white bg-dark" tabindex="-1" id="offcanvasNavbarDark" aria-labelledby="offcanvasNavbarDarkLabel"> + <div class="offcanvas offcanvas-end text-bg-dark" tabindex="-1" id="offcanvasNavbarDark" aria-labelledby="offcanvasNavbarDarkLabel"> <div class="offcanvas-header"> <h5 class="offcanvas-title" id="offcanvasNavbarDarkLabel">Offcanvas</h5> <button type="button" class="btn-close btn-close-white" data-bs-dismiss="offcanvas" aria-label="Close"></button> @@ -96,7 +96,7 @@ extra_css: <button class="navbar-toggler" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasNavbar2" aria-controls="offcanvasNavbar2"> <span class="navbar-toggler-icon"></span> </button> - <div class="offcanvas offcanvas-end text-white bg-dark" tabindex="-1" id="offcanvasNavbar2" aria-labelledby="offcanvasNavbar2Label"> + <div class="offcanvas offcanvas-end text-bg-dark" tabindex="-1" id="offcanvasNavbar2" aria-labelledby="offcanvasNavbar2Label"> <div class="offcanvas-header"> <h5 class="offcanvas-title" id="offcanvasNavbar2Label">Offcanvas</h5> <button type="button" class="btn-close btn-close-white" data-bs-dismiss="offcanvas" aria-label="Close"></button> diff --git a/site/content/docs/5.2/examples/offcanvas-navbar/index.html b/site/content/docs/5.2/examples/offcanvas-navbar/index.html index 0499cc3034..667e73bb44 100644 --- a/site/content/docs/5.2/examples/offcanvas-navbar/index.html +++ b/site/content/docs/5.2/examples/offcanvas-navbar/index.html @@ -52,7 +52,7 @@ aliases: "/docs/5.2/examples/offcanvas/" <a class="nav-link active" aria-current="page" href="#">Dashboard</a> <a class="nav-link" href="#"> Friends - <span class="badge bg-light text-dark rounded-pill align-text-bottom">27</span> + <span class="badge text-bg-light rounded-pill align-text-bottom">27</span> </a> <a class="nav-link" href="#">Explore</a> <a class="nav-link" href="#">Suggestions</a> diff --git a/site/content/docs/5.2/examples/pricing/index.html b/site/content/docs/5.2/examples/pricing/index.html index c62c68c70a..64b856a64f 100644 --- a/site/content/docs/5.2/examples/pricing/index.html +++ b/site/content/docs/5.2/examples/pricing/index.html @@ -73,7 +73,7 @@ include_js: false </div> <div class="col"> <div class="card mb-4 rounded-3 shadow-sm border-primary"> - <div class="card-header py-3 text-white bg-primary border-primary"> + <div class="card-header py-3 text-bg-primary border-primary"> <h4 class="my-0 fw-normal">Enterprise</h4> </div> <div class="card-body"> diff --git a/site/content/docs/5.2/examples/product/index.html b/site/content/docs/5.2/examples/product/index.html index 291901efa2..c2eb0eb2ae 100644 --- a/site/content/docs/5.2/examples/product/index.html +++ b/site/content/docs/5.2/examples/product/index.html @@ -32,7 +32,7 @@ extra_css: </div> <div class="d-md-flex flex-md-equal w-100 my-md-3 ps-md-3"> - <div class="bg-dark me-md-3 pt-3 px-3 pt-md-5 px-md-5 text-center text-white overflow-hidden"> + <div class="text-bg-dark me-md-3 pt-3 px-3 pt-md-5 px-md-5 text-center overflow-hidden"> <div class="my-3 py-3"> <h2 class="display-5">Another headline</h2> <p class="lead">And an even wittier subheading.</p> @@ -56,7 +56,7 @@ extra_css: </div> <div class="bg-dark shadow-sm mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0;"></div> </div> - <div class="bg-primary me-md-3 pt-3 px-3 pt-md-5 px-md-5 text-center text-white overflow-hidden"> + <div class="text-bg-primary me-md-3 pt-3 px-3 pt-md-5 px-md-5 text-center overflow-hidden"> <div class="my-3 py-3"> <h2 class="display-5">Another headline</h2> <p class="lead">And an even wittier subheading.</p> diff --git a/site/content/docs/5.2/examples/sidebars/index.html b/site/content/docs/5.2/examples/sidebars/index.html index e540e54799..33a80e1f8a 100644 --- a/site/content/docs/5.2/examples/sidebars/index.html +++ b/site/content/docs/5.2/examples/sidebars/index.html @@ -70,7 +70,7 @@ body_class: "" <main class="d-flex flex-nowrap"> <h1 class="visually-hidden">Sidebars examples</h1> - <div class="d-flex flex-column flex-shrink-0 p-3 text-white bg-dark" style="width: 280px;"> + <div class="d-flex flex-column flex-shrink-0 p-3 text-bg-dark" style="width: 280px;"> <a href="/" class="d-flex align-items-center mb-3 mb-md-0 me-md-auto text-white text-decoration-none"> <svg class="bi pe-none me-2" width="40" height="32"><use xlink:href="#bootstrap"/></svg> <span class="fs-4">Sidebar</span> diff --git a/site/content/docs/5.2/getting-started/parcel.md b/site/content/docs/5.2/getting-started/parcel.md index 4bdd119e63..c25fb644a8 100644 --- a/site/content/docs/5.2/getting-started/parcel.md +++ b/site/content/docs/5.2/getting-started/parcel.md @@ -22,13 +22,13 @@ When all will be completed, your project will be structured like this: project-name/ ├── build/ ├── node_modules/ +│ ├── @popperjs/ +| | └── core/ │ └── bootstrap/ -│ └── @popperjs/ -| └── core/ ├── scss/ │ └── custom.scss ├── src/ -│ └── index.html +│ ├── index.html │ └── index.js └── package.json ``` diff --git a/site/content/docs/5.2/layout/columns.md b/site/content/docs/5.2/layout/columns.md index 5c859065a4..2ebf96ea25 100644 --- a/site/content/docs/5.2/layout/columns.md +++ b/site/content/docs/5.2/layout/columns.md @@ -25,7 +25,7 @@ Use flexbox alignment utilities to vertically and horizontally align columns. ### Vertical alignment {{< example class="bd-example-row bd-example-row-flex-cols" >}} -<div class="container"> +<div class="container text-center"> <div class="row align-items-start"> <div class="col"> One of three columns @@ -63,7 +63,7 @@ Use flexbox alignment utilities to vertically and horizontally align columns. {{< /example >}} {{< example class="bd-example-row bd-example-row-flex-cols" >}} -<div class="container"> +<div class="container text-center"> <div class="row"> <div class="col align-self-start"> One of three columns @@ -81,7 +81,7 @@ Use flexbox alignment utilities to vertically and horizontally align columns. ### Horizontal alignment {{< example class="bd-example-row" >}} -<div class="container"> +<div class="container text-center"> <div class="row justify-content-start"> <div class="col-4"> One of two columns @@ -152,7 +152,7 @@ If more than 12 columns are placed within a single row, each group of extra colu Breaking columns to a new line in flexbox requires a small hack: add an element with `width: 100%` wherever you want to wrap your columns to a new line. Normally this is accomplished with multiple `.row`s, but not every implementation method can account for this. {{< example class="bd-example-row" >}} -<div class="container"> +<div class="container text-center"> <div class="row"> <div class="col-6 col-sm-3">.col-6 .col-sm-3</div> <div class="col-6 col-sm-3">.col-6 .col-sm-3</div> @@ -169,7 +169,7 @@ Breaking columns to a new line in flexbox requires a small hack: add an element You may also apply this break at specific breakpoints with our [responsive display utilities]({{< docsref "/utilities/display" >}}). {{< example class="bd-example-row" >}} -<div class="container"> +<div class="container text-center"> <div class="row"> <div class="col-6 col-sm-4">.col-6 .col-sm-4</div> <div class="col-6 col-sm-4">.col-6 .col-sm-4</div> @@ -190,7 +190,7 @@ You may also apply this break at specific breakpoints with our [responsive displ Use `.order-` classes for controlling the **visual order** of your content. These classes are responsive, so you can set the `order` by breakpoint (e.g., `.order-1.order-md-2`). Includes support for `1` through `5` across all six grid tiers. {{< example class="bd-example-row" >}} -<div class="container"> +<div class="container text-center"> <div class="row"> <div class="col"> First in DOM, no order applied @@ -208,7 +208,7 @@ Use `.order-` classes for controlling the **visual order** of your content. Thes There are also responsive `.order-first` and `.order-last` classes that change the `order` of an element by applying `order: -1` and `order: 6`, respectively. These classes can also be intermixed with the numbered `.order-*` classes as needed. {{< example class="bd-example-row" >}} -<div class="container"> +<div class="container text-center"> <div class="row"> <div class="col order-last"> First in DOM, ordered last @@ -232,7 +232,7 @@ You can offset grid columns in two ways: our responsive `.offset-` grid classes Move columns to the right using `.offset-md-*` classes. These classes increase the left margin of a column by `*` columns. For example, `.offset-md-4` moves `.col-md-4` over four columns. {{< example class="bd-example-row" >}} -<div class="container"> +<div class="container text-center"> <div class="row"> <div class="col-md-4">.col-md-4</div> <div class="col-md-4 offset-md-4">.col-md-4 .offset-md-4</div> @@ -250,7 +250,7 @@ Move columns to the right using `.offset-md-*` classes. These classes increase t In addition to column clearing at responsive breakpoints, you may need to reset offsets. See this in action in [the grid example]({{< docsref "/examples/grid" >}}). {{< example class="bd-example-row" >}} -<div class="container"> +<div class="container text-center"> <div class="row"> <div class="col-sm-5 col-md-6">.col-sm-5 .col-md-6</div> <div class="col-sm-5 offset-sm-2 col-md-6 offset-md-0">.col-sm-5 .offset-sm-2 .col-md-6 .offset-md-0</div> @@ -267,7 +267,7 @@ In addition to column clearing at responsive breakpoints, you may need to reset With the move to flexbox in v4, you can use margin utilities like `.me-auto` to force sibling columns away from one another. {{< example class="bd-example-row" >}} -<div class="container"> +<div class="container text-center"> <div class="row"> <div class="col-md-4">.col-md-4</div> <div class="col-md-4 ms-auto">.col-md-4 .ms-auto</div> diff --git a/site/content/docs/5.2/layout/css-grid.md b/site/content/docs/5.2/layout/css-grid.md index 4b0be38462..397733c8a2 100644 --- a/site/content/docs/5.2/layout/css-grid.md +++ b/site/content/docs/5.2/layout/css-grid.md @@ -47,8 +47,8 @@ Compared to the default grid system: Three equal-width columns across all viewports and devices can be created by using the `.g-col-4` classes. Add [responsive classes](#responsive) to change the layout by viewport size. -{{< example class="bd-example-cssgrid text-center" >}} -<div class="grid"> +{{< example class="bd-example-cssgrid" >}} +<div class="grid text-center"> <div class="g-col-4">.g-col-4</div> <div class="g-col-4">.g-col-4</div> <div class="g-col-4">.g-col-4</div> @@ -59,8 +59,8 @@ Three equal-width columns across all viewports and devices can be created by usi Use responsive classes to adjust your layout across viewports. Here we start with two columns on the narrowest viewports, and then grow to three columns on medium viewports and above. -{{< example class="bd-example-cssgrid text-center" >}} -<div class="grid"> +{{< example class="bd-example-cssgrid" >}} +<div class="grid text-center"> <div class="g-col-6 g-col-md-4">.g-col-6 .g-col-md-4</div> <div class="g-col-6 g-col-md-4">.g-col-6 .g-col-md-4</div> <div class="g-col-6 g-col-md-4">.g-col-6 .g-col-md-4</div> @@ -69,8 +69,8 @@ Use responsive classes to adjust your layout across viewports. Here we start wit Compare that to this two column layout at all viewports. -{{< example class="bd-example-cssgrid text-center" >}} -<div class="grid"> +{{< example class="bd-example-cssgrid" >}} +<div class="grid text-center"> <div class="g-col-6">.g-col-6</div> <div class="g-col-6">.g-col-6</div> </div> @@ -80,8 +80,8 @@ Compare that to this two column layout at all viewports. Grid items automatically wrap to the next line when there's no more room horizontally. Note that the `gap` applies to horizontal and vertical gaps between grid items. -{{< example class="bd-example-cssgrid text-center" >}} -<div class="grid"> +{{< example class="bd-example-cssgrid" >}} +<div class="grid text-center"> <div class="g-col-6">.g-col-6</div> <div class="g-col-6">.g-col-6</div> @@ -94,8 +94,8 @@ Grid items automatically wrap to the next line when there's no more room horizon Start classes aim to replace our default grid's offset classes, but they're not entirely the same. CSS Grid creates a grid template through styles that tell browsers to "start at this column" and "end at this column." Those properties are `grid-column-start` and `grid-column-end`. Start classes are shorthand for the former. Pair them with the column classes to size and align your columns however you need. Start classes begin at `1` as `0` is an invalid value for these properties. -{{< example class="bd-example-cssgrid text-center" >}} -<div class="grid"> +{{< example class="bd-example-cssgrid" >}} +<div class="grid text-center"> <div class="g-col-3 g-start-2">.g-col-3 .g-start-2</div> <div class="g-col-4 g-start-6">.g-col-4 .g-start-6</div> </div> @@ -105,8 +105,8 @@ Start classes aim to replace our default grid's offset classes, but they're not When there are no classes on the grid items (the immediate children of a `.grid`), each grid item will automatically be sized to one column. -{{< example class="bd-example-cssgrid text-center" >}} -<div class="grid"> +{{< example class="bd-example-cssgrid" >}} +<div class="grid text-center"> <div>1</div> <div>1</div> <div>1</div> @@ -124,8 +124,8 @@ When there are no classes on the grid items (the immediate children of a `.grid` This behavior can be mixed with grid column classes. -{{< example class="bd-example-cssgrid text-center" >}} -<div class="grid"> +{{< example class="bd-example-cssgrid" >}} +<div class="grid text-center"> <div class="g-col-6">.g-col-6</div> <div>1</div> <div>1</div> @@ -147,8 +147,8 @@ Similar to our default grid system, our CSS Grid allows for easy nesting of `.gr In practice this allows for more complex and custom layouts when compared to our default grid system. -{{< example class="bd-example-cssgrid text-center" >}} -<div class="grid" style="--bs-columns: 3;"> +{{< example class="bd-example-cssgrid" >}} +<div class="grid text-center" style="--bs-columns: 3;"> <div> First auto-column <div class="grid"> @@ -186,8 +186,8 @@ These CSS variables have no default value; instead, they apply fallback values t Immediate children elements of `.grid` are grid items, so they'll be sized without explicitly adding a `.g-col` class. -{{< example class="bd-example-cssgrid text-center" >}} -<div class="grid" style="--bs-columns: 3;"> +{{< example class="bd-example-cssgrid" >}} +<div class="grid text-center" style="--bs-columns: 3;"> <div>Auto-column</div> <div>Auto-column</div> <div>Auto-column</div> @@ -198,15 +198,15 @@ Immediate children elements of `.grid` are grid items, so they'll be sized witho Adjust the number of columns and the gap. -{{< example class="bd-example-cssgrid text-center" >}} -<div class="grid" style="--bs-columns: 4; --bs-gap: 5rem;"> +{{< example class="bd-example-cssgrid" >}} +<div class="grid text-center" style="--bs-columns: 4; --bs-gap: 5rem;"> <div class="g-col-2">.g-col-2</div> <div class="g-col-2">.g-col-2</div> </div> {{< /example >}} -{{< example class="bd-example-cssgrid text-center" >}} -<div class="grid" style="--bs-columns: 10; --bs-gap: 1rem;"> +{{< example class="bd-example-cssgrid" >}} +<div class="grid text-center" style="--bs-columns: 10; --bs-gap: 1rem;"> <div class="g-col-6">.g-col-6</div> <div class="g-col-4">.g-col-4</div> </div> @@ -216,8 +216,8 @@ Adjust the number of columns and the gap. Adding more rows and changing the placement of columns: -{{< example class="bd-example-cssgrid text-center" >}} -<div class="grid" style="--bs-rows: 3; --bs-columns: 3;"> +{{< example class="bd-example-cssgrid" >}} +<div class="grid text-center" style="--bs-rows: 3; --bs-columns: 3;"> <div>Auto-column</div> <div class="g-start-2" style="grid-row: 2">Auto-column</div> <div class="g-start-3" style="grid-row: 3">Auto-column</div> @@ -228,8 +228,8 @@ Adding more rows and changing the placement of columns: Change the vertical gaps only by modifying the `row-gap`. Note that we use `gap` on `.grid`s, but `row-gap` and `column-gap` can be modified as needed. -{{< example class="bd-example-cssgrid text-center" >}} -<div class="grid" style="row-gap: 0;"> +{{< example class="bd-example-cssgrid" >}} +<div class="grid text-center" style="row-gap: 0;"> <div class="g-col-6">.g-col-6</div> <div class="g-col-6">.g-col-6</div> @@ -240,8 +240,8 @@ Change the vertical gaps only by modifying the `row-gap`. Note that we use `gap` Because of that, you can have different vertical and horizontal `gap`s, which can take a single value (all sides) or a pair of values (vertical and horizontal). This can be applied with an inline style for `gap`, or with our `--bs-gap` CSS variable. -{{< example class="bd-example-cssgrid text-center" >}} -<div class="grid" style="--bs-gap: .25rem 1rem;"> +{{< example class="bd-example-cssgrid" >}} +<div class="grid text-center" style="--bs-gap: .25rem 1rem;"> <div class="g-col-6">.g-col-6</div> <div class="g-col-6">.g-col-6</div> @@ -259,8 +259,8 @@ One limitation of the CSS Grid is that our default classes are still generated b For example, you can increase the column count and change the gap size, and then size your "columns" with a mix of inline styles and predefined CSS Grid column classes (e.g., `.g-col-4`). -{{< example class="bd-example-cssgrid text-center" >}} -<div class="grid" style="--bs-columns: 18; --bs-gap: .5rem;"> +{{< example class="bd-example-cssgrid" >}} +<div class="grid text-center" style="--bs-columns: 18; --bs-gap: .5rem;"> <div style="grid-column: span 14;">14 columns</div> <div class="g-col-4">.g-col-4</div> </div> diff --git a/site/content/docs/5.2/layout/grid.md b/site/content/docs/5.2/layout/grid.md index 05fc1bd65d..765b7eb603 100644 --- a/site/content/docs/5.2/layout/grid.md +++ b/site/content/docs/5.2/layout/grid.md @@ -15,7 +15,7 @@ Bootstrap's grid system uses a series of containers, rows, and columns to layout {{< /callout >}} {{< example class="bd-example-row" >}} -<div class="container"> +<div class="container text-center"> <div class="row"> <div class="col"> Column @@ -144,7 +144,7 @@ Utilize breakpoint-specific column classes for easy column sizing without an exp For example, here are two grid layouts that apply to every device and viewport, from `xs` to `xxl`. Add any number of unit-less classes for each breakpoint you need and every column will be the same width. {{< example class="bd-example-row" >}} -<div class="container"> +<div class="container text-center"> <div class="row"> <div class="col"> 1 of 2 @@ -172,7 +172,7 @@ For example, here are two grid layouts that apply to every device and viewport, Auto-layout for flexbox grid columns also means you can set the width of one column and have the sibling columns automatically resize around it. You may use predefined grid classes (as shown below), grid mixins, or inline widths. Note that the other columns will resize no matter the width of the center column. {{< example class="bd-example-row" >}} -<div class="container"> +<div class="container text-center"> <div class="row"> <div class="col"> 1 of 3 @@ -203,7 +203,7 @@ Auto-layout for flexbox grid columns also means you can set the width of one col Use `col-{breakpoint}-auto` classes to size columns based on the natural width of their content. {{< example class="bd-example-row" >}} -<div class="container"> +<div class="container text-center"> <div class="row justify-content-md-center"> <div class="col col-lg-2"> 1 of 3 @@ -238,7 +238,7 @@ Bootstrap's grid includes six tiers of predefined classes for building complex r For grids that are the same from the smallest of devices to the largest, use the `.col` and `.col-*` classes. Specify a numbered class when you need a particularly sized column; otherwise, feel free to stick to `.col`. {{< example class="bd-example-row" >}} -<div class="container"> +<div class="container text-center"> <div class="row"> <div class="col">col</div> <div class="col">col</div> @@ -257,7 +257,7 @@ For grids that are the same from the smallest of devices to the largest, use the Using a single set of `.col-sm-*` classes, you can create a basic grid system that starts out stacked and becomes horizontal at the small breakpoint (`sm`). {{< example class="bd-example-row" >}} -<div class="container"> +<div class="container text-center"> <div class="row"> <div class="col-sm-8">col-sm-8</div> <div class="col-sm-4">col-sm-4</div> @@ -275,7 +275,7 @@ Using a single set of `.col-sm-*` classes, you can create a basic grid system th Don't want your columns to simply stack in some grid tiers? Use a combination of different classes for each tier as needed. See the example below for a better idea of how it all works. {{< example class="bd-example-row" >}} -<div class="container"> +<div class="container text-center"> <!-- Stack the columns on mobile by making one full-width and the other half-width --> <div class="row"> <div class="col-md-8">.col-md-8</div> @@ -304,7 +304,7 @@ Use the responsive `.row-cols-*` classes to quickly set the number of columns th Use these row columns classes to quickly create basic grid layouts or to control your card layouts. {{< example class="bd-example-row" >}} -<div class="container"> +<div class="container text-center"> <div class="row row-cols-2"> <div class="col">Column</div> <div class="col">Column</div> @@ -315,7 +315,7 @@ Use these row columns classes to quickly create basic grid layouts or to control {{< /example >}} {{< example class="bd-example-row" >}} -<div class="container"> +<div class="container text-center"> <div class="row row-cols-3"> <div class="col">Column</div> <div class="col">Column</div> @@ -326,7 +326,7 @@ Use these row columns classes to quickly create basic grid layouts or to control {{< /example >}} {{< example class="bd-example-row" >}} -<div class="container"> +<div class="container text-center"> <div class="row row-cols-auto"> <div class="col">Column</div> <div class="col">Column</div> @@ -337,7 +337,7 @@ Use these row columns classes to quickly create basic grid layouts or to control {{< /example >}} {{< example class="bd-example-row" >}} -<div class="container"> +<div class="container text-center"> <div class="row row-cols-4"> <div class="col">Column</div> <div class="col">Column</div> @@ -348,7 +348,7 @@ Use these row columns classes to quickly create basic grid layouts or to control {{< /example >}} {{< example class="bd-example-row" >}} -<div class="container"> +<div class="container text-center"> <div class="row row-cols-4"> <div class="col">Column</div> <div class="col">Column</div> @@ -359,7 +359,7 @@ Use these row columns classes to quickly create basic grid layouts or to control {{< /example >}} {{< example class="bd-example-row" >}} -<div class="container"> +<div class="container text-center"> <div class="row row-cols-1 row-cols-sm-2 row-cols-md-4"> <div class="col">Column</div> <div class="col">Column</div> @@ -388,7 +388,7 @@ You can also use the accompanying Sass mixin, `row-cols()`: To nest your content with the default grid, add a new `.row` and set of `.col-sm-*` columns within an existing `.col-sm-*` column. Nested rows should include a set of columns that add up to 12 or fewer (it is not required that you use all 12 available columns). {{< example class="bd-example-row" >}} -<div class="container"> +<div class="container text-center"> <div class="row"> <div class="col-sm-3"> Level 1: .col-sm-3 diff --git a/site/content/docs/5.2/layout/gutters.md b/site/content/docs/5.2/layout/gutters.md index 9ea13e4ab2..1cb68303f1 100644 --- a/site/content/docs/5.2/layout/gutters.md +++ b/site/content/docs/5.2/layout/gutters.md @@ -19,7 +19,7 @@ toc: true `.gx-*` classes can be used to control the horizontal gutter widths. The `.container` or `.container-fluid` parent may need to be adjusted if larger gutters are used too to avoid unwanted overflow, using a matching padding utility. For example, in the following example we've increased the padding with `.px-4`: {{< example >}} -<div class="container px-4"> +<div class="container px-4 text-center"> <div class="row gx-5"> <div class="col"> <div class="p-3 border bg-light">Custom column padding</div> @@ -34,7 +34,7 @@ toc: true An alternative solution is to add a wrapper around the `.row` with the `.overflow-hidden` class: {{< example >}} -<div class="container overflow-hidden"> +<div class="container overflow-hidden text-center"> <div class="row gx-5"> <div class="col"> <div class="p-3 border bg-light">Custom column padding</div> @@ -51,7 +51,7 @@ An alternative solution is to add a wrapper around the `.row` with the `.overflo `.gy-*` classes can be used to control the vertical gutter widths. Like the horizontal gutters, the vertical gutters can cause some overflow below the `.row` at the end of a page. If this occurs, you add a wrapper around `.row` with the `.overflow-hidden` class: {{< example >}} -<div class="container overflow-hidden"> +<div class="container overflow-hidden text-center"> <div class="row gy-5"> <div class="col-6"> <div class="p-3 border bg-light">Custom column padding</div> @@ -74,7 +74,7 @@ An alternative solution is to add a wrapper around the `.row` with the `.overflo `.g-*` classes can be used to control the horizontal gutter widths, for the following example we use a smaller gutter width, so there won't be a need to add the `.overflow-hidden` wrapper class. {{< example >}} -<div class="container"> +<div class="container text-center"> <div class="row g-2"> <div class="col-6"> <div class="p-3 border bg-light">Custom column padding</div> @@ -97,7 +97,7 @@ An alternative solution is to add a wrapper around the `.row` with the `.overflo Gutter classes can also be added to [row columns]({{< docsref "/layout/grid#row-columns" >}}). In the following example, we use responsive row columns and responsive gutter classes. {{< example >}} -<div class="container"> +<div class="container text-center"> <div class="row row-cols-2 row-cols-lg-5 g-2 g-lg-3"> <div class="col"> <div class="p-3 border bg-light">Row column</div> @@ -142,7 +142,7 @@ The gutters between columns in our predefined grid classes can be removed with ` In practice, here's how it looks. Note you can continue to use this with all other predefined grid classes (including column widths, responsive tiers, reorders, and more). {{< example class="bd-example-row" >}} -<div class="row g-0"> +<div class="row g-0 text-center"> <div class="col-sm-6 col-md-8">.col-sm-6 .col-md-8</div> <div class="col-6 col-md-4">.col-6 .col-md-4</div> </div> diff --git a/site/content/docs/5.2/utilities/display.md b/site/content/docs/5.2/utilities/display.md index 65eb333c7b..cbbb9d48e2 100644 --- a/site/content/docs/5.2/utilities/display.md +++ b/site/content/docs/5.2/utilities/display.md @@ -39,13 +39,13 @@ The media queries affect screen widths with the given breakpoint *or larger*. Fo ## Examples {{< example >}} -<div class="d-inline p-2 bg-primary text-white">d-inline</div> -<div class="d-inline p-2 bg-dark text-white">d-inline</div> +<div class="d-inline p-2 text-bg-primary">d-inline</div> +<div class="d-inline p-2 text-bg-dark">d-inline</div> {{< /example >}} {{< example >}} -<span class="d-block p-2 bg-primary text-white">d-block</span> -<span class="d-block p-2 bg-dark text-white">d-block</span> +<span class="d-block p-2 text-bg-primary">d-block</span> +<span class="d-block p-2 text-bg-dark">d-block</span> {{< /example >}} ## Hiding elements diff --git a/site/data/sidebar.yml b/site/data/sidebar.yml index cdf0b04d8b..c63f29c6ee 100644 --- a/site/data/sidebar.yml +++ b/site/data/sidebar.yml @@ -102,13 +102,13 @@ - title: Clearfix - title: Color & background - title: Colored links - - title: Ratio - title: Position + - title: Ratio - title: Stacks - - title: Visually hidden - title: Stretched link - title: Text truncation - title: Vertical rule + - title: Visually hidden - title: Utilities icon: braces-asterisk diff --git a/site/layouts/_default/docs.html b/site/layouts/_default/docs.html index d08e5a393a..5046d72607 100644 --- a/site/layouts/_default/docs.html +++ b/site/layouts/_default/docs.html @@ -62,5 +62,5 @@ {{ range .Page.Params.extra_js -}} <script{{ with .async }} async{{ end }} src="{{ .src }}"></script> {{- end -}} - <div class="position-fixed"><input type="text"></div> + <div class="position-fixed"><input type="text" tabindex="-1"></div> {{ end }} diff --git a/site/layouts/_default/single.html b/site/layouts/_default/single.html index ae1a41faa7..52ae87c8e1 100644 --- a/site/layouts/_default/single.html +++ b/site/layouts/_default/single.html @@ -32,7 +32,7 @@ <hr class="my-5"> <div class="container"> <div class="text-center"> - <div class="masthead-followup-icon d-inline-block mb-2 text-white bg-danger"> + <div class="masthead-followup-icon d-inline-block mb-2 text-bg-danger"> {{ partial "icons/droplet-fill.svg" (dict "width" "32" "height" "32") }} </div> <h2 class="display-6 fw-normal">Go further with Bootstrap Themes</h2> |