mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-20 20:00:36 +03:00
Contrast colors added to theme-colors (#30044)
* Contrast colors added to theme-colors * redundant colors removed froms docs, theme-colors refactor * Add spaces for consistency * Adapt to the recent changes Co-authored-by: Sead Memic <sead.memic@intracto.com> Co-authored-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
@@ -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") (eq .name "info") }} text-dark{{ end }}">{{ .name | title }}</span>{{- end -}}
|
||||
<span class="badge bg-{{ .name }}{{ with .contrast_color }} text-{{ . }}{{ 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") (eq .name "info") }} text-dark{{ end }}">{{ .name | title }}</span>{{- end -}}
|
||||
<span class="badge rounded-pill bg-{{ .name }}{{ with .contrast_color }} text-{{ . }}{{ end }}">{{ .name | title }}</span>{{- end -}}
|
||||
{{< /badge.inline >}}
|
||||
{{< /example >}}
|
||||
|
||||
Reference in New Issue
Block a user