diff options
| author | Gaƫl Poupard <[email protected]> | 2020-10-05 15:47:46 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-10-05 16:47:46 +0300 |
| commit | 00dd55269af534fd1c37da51573ec122e36313d5 (patch) | |
| tree | 5442058d25b3c682c805704a45d5788bfbc42588 /site | |
| parent | ce1db01af07588be7c04b967459249df69d02464 (diff) | |
| download | bootstrap-00dd55269af534fd1c37da51573ec122e36313d5.tar.xz bootstrap-00dd55269af534fd1c37da51573ec122e36313d5.zip | |
docs: fix contrast color against `.bg-info` (#31839)
* docs(badge): ensure info badge's contrast
* docs(colors): fix contrasts in example using .bg-info
* Update card.md
Co-authored-by: XhmikosR <[email protected]>
Diffstat (limited to 'site')
| -rw-r--r-- | site/content/docs/5.0/components/badge.md | 4 | ||||
| -rw-r--r-- | site/content/docs/5.0/components/card.md | 2 | ||||
| -rw-r--r-- | site/content/docs/5.0/customize/color.md | 2 | ||||
| -rw-r--r-- | site/content/docs/5.0/utilities/colors.md | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/site/content/docs/5.0/components/badge.md b/site/content/docs/5.0/components/badge.md index 475eb75f0..78bc89f5b 100644 --- a/site/content/docs/5.0/components/badge.md +++ b/site/content/docs/5.0/components/badge.md @@ -45,7 +45,7 @@ Use our background utility classes to quickly change the appearance of a badge. {{< example >}} {{< badge.inline >}} {{- range (index $.Site.Data "theme-colors") }} -<span class="badge bg-{{ .name }}{{ if or (eq .name "light") (eq .name "warning") }} text-dark{{ end }}">{{ .name | title }}</span>{{- end -}} +<span class="badge bg-{{ .name }}{{ if or (eq .name "light") (eq .name "warning") (eq .name "info") }} text-dark{{ end }}">{{ .name | title }}</span>{{- end -}} {{< /badge.inline >}} {{< /example >}} @@ -60,6 +60,6 @@ Use the `.rounded-pill` utility class to make badges more rounded with a larger {{< example >}} {{< badge.inline >}} {{- range (index $.Site.Data "theme-colors") }} -<span class="badge rounded-pill bg-{{ .name }}{{ if or (eq .name "light") (eq .name "warning") }} text-dark{{ end }}">{{ .name | title }}</span>{{- end -}} +<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 -}} {{< /badge.inline >}} {{< /example >}} diff --git a/site/content/docs/5.0/components/card.md b/site/content/docs/5.0/components/card.md index 015b5d936..baa645be7 100644 --- a/site/content/docs/5.0/components/card.md +++ b/site/content/docs/5.0/components/card.md @@ -422,7 +422,7 @@ Use [text and background utilities]({{< docsref "/utilities/colors" >}}) to chan {{< example >}} {{< card.inline >}} {{- range (index $.Site.Data "theme-colors") }} -<div class="card{{ if (eq .name "info") }} text-body {{ else if not (or (eq .name "light") (eq .name "warning")) }} text-white{{ end }} bg-{{ .name }} mb-3" style="max-width: 18rem;"> +<div class="card{{ if (eq .name "info") }} text-body{{ else if not (or (eq .name "light") (eq .name "warning") (eq .name "info")) }} text-white{{ end }} bg-{{ .name }} mb-3" style="max-width: 18rem;"> <div class="card-header">Header</div> <div class="card-body"> <h5 class="card-title">{{ .name | title }} card title</h5> diff --git a/site/content/docs/5.0/customize/color.md b/site/content/docs/5.0/customize/color.md index 350aab699..7c51664b7 100644 --- a/site/content/docs/5.0/customize/color.md +++ b/site/content/docs/5.0/customize/color.md @@ -14,7 +14,7 @@ We use a subset of all colors to create a smaller color palette for generating c {{< theme-colors.inline >}} {{- range (index $.Site.Data "theme-colors") }} <div class="col-md-4"> - <div class="p-3 mb-3 bg-{{ .name }} {{ if or (eq .name "light") (eq .name "warning") }}text-dark{{ else if (eq .name "info")}}text-body{{ else }}text-white{{ end }}">{{ .name | title }}</div> + <div class="p-3 mb-3 bg-{{ .name }} {{ if or (eq .name "light") (eq .name "warning") (eq .name "info") }}text-dark{{ else if (eq .name "info")}}text-body{{ else }}text-white{{ end }}">{{ .name | title }}</div> </div> {{ end -}} {{< /theme-colors.inline >}} diff --git a/site/content/docs/5.0/utilities/colors.md b/site/content/docs/5.0/utilities/colors.md index 6ca7a7d12..65cddd75c 100644 --- a/site/content/docs/5.0/utilities/colors.md +++ b/site/content/docs/5.0/utilities/colors.md @@ -40,7 +40,7 @@ Similar to the contextual text color classes, easily set the background of an el {{< example >}} {{< colors.inline >}} {{- range (index $.Site.Data "theme-colors") }} -<div class="p-3 mb-2 bg-{{ .name }} {{ if or (eq .name "light") (eq .name "warning") }}text-dark{{ else if (eq .name "info") }}text-body{{ else }}text-white{{ end }}">.bg-{{ .name }}</div> +<div class="p-3 mb-2 bg-{{ .name }} {{ if or (eq .name "light") (eq .name "warning") (eq .name "info") }}text-dark{{ else if (eq .name "info") }}text-body{{ else }}text-white{{ end }}">.bg-{{ .name }}</div> {{- end -}} {{< /colors.inline >}} <div class="p-3 mb-2 bg-white text-dark">.bg-white</div> @@ -56,7 +56,7 @@ Do you need a gradient in your custom CSS? Just add `background-image: var(--bs- {{< markdown >}} {{< colors.inline >}} {{- range (index $.Site.Data "theme-colors") }} -<div class="p-3 mb-2 bg-{{ .name }} bg-gradient {{ if or (eq .name "light") (eq .name "warning") }}text-dark{{ else }}text-white{{ end }}">.bg-{{ .name }}.bg-gradient</div> +<div class="p-3 mb-2 bg-{{ .name }} bg-gradient {{ if or (eq .name "light") (eq .name "warning") (eq .name "info") }}text-dark{{ else }}text-white{{ end }}">.bg-{{ .name }}.bg-gradient</div> {{- end -}} {{< /colors.inline >}} {{< /markdown >}} |
