1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-31 00:59:51 +02:00

Rewrite some callouts to remove most headings and reduce their content

This commit is contained in:
Mark Otto
2022-12-11 18:10:19 -08:00
committed by Mark Otto
parent d13c8f625c
commit 89f9ffc212
13 changed files with 30 additions and 70 deletions

View File

@@ -400,8 +400,7 @@ And putting it to use in a navbar:
## Directions
{{< callout info >}}
#### RTL
Directions are mirrored when using Bootstrap in RTL, meaning `.dropstart` will appear on the right side.
**Directions are flipped in RTL mode.** As such, `.dropstart` will appear on the right side.
{{< /callout >}}
### Centered
@@ -1057,6 +1056,10 @@ Add `data-bs-toggle="dropdown"` to a link or button to toggle a dropdown.
### Via JavaScript
{{< callout warning >}}
Dropdowns must have `data-bs-toggle="dropdown"` on their trigger element, regardless of using the Data API or JavaScript.
{{< /callout >}}
Call the dropdowns via JavaScript:
```js
@@ -1064,12 +1067,6 @@ const dropdownElementList = document.querySelectorAll('.dropdown-toggle')
const dropdownList = [...dropdownElementList].map(dropdownToggleEl => new bootstrap.Dropdown(dropdownToggleEl))
```
{{< callout info >}}
##### `data-bs-toggle="dropdown"` still required
Regardless of whether you call your dropdown via JavaScript or instead use the data-api, `data-bs-toggle="dropdown"` is always required to be present on the dropdown's trigger element.
{{< /callout >}}
### Options
{{< markdown >}}