aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEricDunsworth <[email protected]>2022-11-29 02:07:27 -0500
committerGitHub <[email protected]>2022-11-28 23:07:27 -0800
commit019a9774817ff8269821c36dd102554b739d35df (patch)
tree43b3927f6961aeeae4b89000c00d44cd6174dbf3
parentfc3f4b67d65c575daa661ecf31cf59b4ff3cced5 (diff)
downloadbootstrap-019a9774817ff8269821c36dd102554b739d35df.tar.xz
bootstrap-019a9774817ff8269821c36dd102554b739d35df.zip
Docs: Add black text/background examples (#37538)
These classes have existed since 5.1 but weren't previously documented. Specifically: * .text-black * .bg-black * .bg-black.bg-gradient Co-authored-by: Mark Otto <[email protected]>
-rw-r--r--site/content/docs/5.2/utilities/background.md3
-rw-r--r--site/content/docs/5.2/utilities/colors.md1
2 files changed, 3 insertions, 1 deletions
diff --git a/site/content/docs/5.2/utilities/background.md b/site/content/docs/5.2/utilities/background.md
index ef7b2468e..dad71ec37 100644
--- a/site/content/docs/5.2/utilities/background.md
+++ b/site/content/docs/5.2/utilities/background.md
@@ -17,11 +17,11 @@ Similar to the contextual text color classes, set the background of an element t
<div class="p-3 mb-2 bg-{{ .name }}-subtle text-emphasis-{{ .name }}">.bg-{{ .name }}-subtle</div>
{{- end -}}
{{< /colors.inline >}}
-
<p class="p-3 mb-2 bg-body-secondary">.bg-body-secondary</p>
<p class="p-3 mb-2 bg-body-tertiary">.bg-body-tertiary</p>
<div class="p-3 mb-2 bg-body text-body">.bg-body</div>
+<div class="p-3 mb-2 bg-black text-white">.bg-black</div>
<div class="p-3 mb-2 bg-white text-dark">.bg-white</div>
<div class="p-3 mb-2 bg-transparent text-body">.bg-transparent</div>
{{< /example >}}
@@ -38,6 +38,7 @@ Do you need a gradient in your custom CSS? Just add `background-image: var(--bs-
<div class="p-3 mb-2 bg-{{ .name }} bg-gradient{{ with .contrast_color }} text-{{ . }}{{ else }} text-white{{ end }}">.bg-{{ .name }}.bg-gradient</div>
{{- end -}}
{{< /colors.inline >}}
+<div class="p-3 mb-2 bg-black bg-gradient text-white">.bg-black.bg-gradient</div>
{{< /markdown >}}
## Opacity
diff --git a/site/content/docs/5.2/utilities/colors.md b/site/content/docs/5.2/utilities/colors.md
index 94418ac5e..4b1647242 100644
--- a/site/content/docs/5.2/utilities/colors.md
+++ b/site/content/docs/5.2/utilities/colors.md
@@ -24,6 +24,7 @@ Colorize text with color utilities. If you want to colorize links, you can use t
<p class="text-body-secondary">.text-body-secondary</p>
<p class="text-body-tertiary">.text-body-tertiary</p>
+<p class="text-black bg-white">.text-black</p>
<p class="text-white bg-dark">.text-white</p>
<p class="text-black-50 bg-white">.text-black-50</p>
<p class="text-white-50 bg-dark">.text-white-50</p>