diff --git a/site/content/docs/5.1/components/alerts.md b/site/content/docs/5.1/components/alerts.md index 5a5b4c1405..ac312a6e9e 100644 --- a/site/content/docs/5.1/components/alerts.md +++ b/site/content/docs/5.1/components/alerts.md @@ -130,6 +130,29 @@ You can see this in action with a live demo: When an alert is dismissed, the element is completely removed from the page structure. If a keyboard user dismisses the alert using the close button, their focus will suddenly be lost and, depending on the browser, reset to the start of the page/document. For this reason, we recommend including additional JavaScript that listens for the `closed.bs.alert` event and programmatically sets `focus()` to the most appropriate location in the page. If you're planning to move focus to a non-interactive element that normally does not receive focus, make sure to add `tabindex="-1"` to the element. {{< /callout >}} +### Dark variant + +Add `.bg-dark` to the `.alert` for a dark variant. Close button can be inverted as well by using the [dark variant of close button]({{< docsref "/components/close-button#dark-variant" >}}) + +{{< example class="bg-dark" >}} + + + +{{< /example >}} + ## CSS Added in v5.2.0 diff --git a/site/content/docs/5.1/components/close-button.md b/site/content/docs/5.1/components/close-button.md index 5cb0be996d..1e36b3b81f 100644 --- a/site/content/docs/5.1/components/close-button.md +++ b/site/content/docs/5.1/components/close-button.md @@ -22,7 +22,7 @@ Disabled close buttons change their `color`. We've also applied `pointer-events: {{< /example >}} -## White variant +## Dark variant Change the default `.btn-close` to be white with the `.btn-close-white` class.