diff --git a/site/content/docs/5.1/components/badge.md b/site/content/docs/5.1/components/badge.md index e00b21a12b..55b1ffb851 100644 --- a/site/content/docs/5.1/components/badge.md +++ b/site/content/docs/5.1/components/badge.md @@ -27,7 +27,7 @@ Badges can be used as part of links or buttons to provide a counter. {{< example >}} {{< /example >}} @@ -62,12 +62,14 @@ You can also replace the `.badge` class with a few more utilities without a coun ## Background colors -Use our background utility classes to quickly change the appearance of a badge. Please note that when using Bootstrap's default `.bg-light`, you'll likely need a text color utility like `.text-dark` for proper styling. This is because background utilities do not set anything but `background-color`. +{{< added-in "5.2.0" >}} + +Set a `background-color` with contrasting foreground `color` with [our `.text-bg-{color}` helpers]({{< docsref "helpers/color-background" >}}). Previously it was required to manually pair your choice of [`.text-{color}`]({{< docsref "/utilities/colors" >}}) and [`.bg-{color}`]({{< docsref "/utilities/background" >}}) utilities for styling, which you still may use if you prefer. {{< example >}} {{< badge.inline >}} {{- range (index $.Site.Data "theme-colors") }} -{{ .name | title }}{{- end -}} +{{ .name | title }}{{- end -}} {{< /badge.inline >}} {{< /example >}} @@ -82,7 +84,7 @@ Use the `.rounded-pill` utility class to make badges more rounded with a larger {{< example >}} {{< badge.inline >}} {{- range (index $.Site.Data "theme-colors") }} -{{ .name | title }}{{- end -}} +{{ .name | title }}{{- end -}} {{< /badge.inline >}} {{< /example >}} diff --git a/site/content/docs/5.1/components/card.md b/site/content/docs/5.1/components/card.md index 22b413325c..9e395cd5ec 100644 --- a/site/content/docs/5.1/components/card.md +++ b/site/content/docs/5.1/components/card.md @@ -417,12 +417,14 @@ Cards include various options for customizing their backgrounds, borders, and co ### Background and color -Use [text color]({{< docsref "/utilities/colors" >}}) and [background utilities]({{< docsref "/utilities/background" >}}) to change the appearance of a card. +{{< added-in "5.2.0" >}} + +Set a `background-color` with contrasting foreground `color` with [our `.text-bg-{color}` helpers]({{< docsref "helpers/color-background" >}}). Previously it was required to manually pair your choice of [`.text-{color}`]({{< docsref "/utilities/colors" >}}) and [`.bg-{color}`]({{< docsref "/utilities/background" >}}) utilities for styling, which you still may use if you prefer. {{< example >}} {{< card.inline >}} {{- range (index $.Site.Data "theme-colors") }} -