mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-17 19:21:23 +03:00
Link helpers & use utility API for all utilities
This commit is contained in:
@@ -8,6 +8,8 @@ toc: true
|
||||
|
||||
## Color
|
||||
|
||||
Colorize text with color utilities. If you want to colorize links, you can use the [`.link-*` helper classes]({{< docsref "/helpers/colored-links" >}}) which have `:hover` and `:focus` states.
|
||||
|
||||
{{< example >}}
|
||||
{{< colors.inline >}}
|
||||
{{- range (index $.Site.Data "theme-colors") }}
|
||||
@@ -21,18 +23,6 @@ toc: true
|
||||
<p class="text-white-50 bg-dark">.text-white-50</p>
|
||||
{{< /example >}}
|
||||
|
||||
Contextual text classes also work well on anchors with the provided hover and focus states. **Note that the `.text-white` and `.text-muted` class has no additional link styling beyond underline.**
|
||||
|
||||
{{< example >}}
|
||||
{{< colors.inline >}}
|
||||
{{- range (index $.Site.Data "theme-colors") }}
|
||||
<p><a href="#" class="text-{{ .name }}{{ if eq .name "light" }} bg-dark{{ end }}">{{ .name | title }} link</a></p>
|
||||
{{- end -}}
|
||||
{{< /colors.inline >}}
|
||||
<p><a href="#" class="text-muted">Muted link</a></p>
|
||||
<p><a href="#" class="text-white bg-dark">White link</a></p>
|
||||
{{< /example >}}
|
||||
|
||||
## Background color
|
||||
|
||||
Similar to the contextual text color classes, easily set the background of an element to any contextual class. Background utilities **do not set `color`**, so in some cases you'll want to use `.text-*` utilities.
|
||||
|
||||
Reference in New Issue
Block a user