mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-18 10:52:19 +01:00
update background utils
This commit is contained in:
parent
aa83c4f417
commit
fc053ed096
@ -15,14 +15,14 @@ Contextual text classes also work well on anchors with the provided hover and fo
|
||||
|
||||
{% example html %}
|
||||
{% for color in site.data.theme-colors %}
|
||||
<p><a href="#" class="text-{{ color.name }}{% if color.name == "white" %} bg-gray{% endif %}">{{ color.name | capitalize }} link</a></p>{% endfor %}
|
||||
<p><a href="#" class="text-{{ color.name }}{% if color.name == "light" %} bg-gray{% endif %}">{{ color.name | capitalize }} link</a></p>{% endfor %}
|
||||
{% endexample %}
|
||||
|
||||
Similar to the contextual text color classes, easily set the background of an element to any contextual class. Anchor components will darken on hover, just like the text classes. Background utilities **do not set `color`**, so in some cases you'll want to use `.text-*` utilities.
|
||||
|
||||
{% example html %}
|
||||
{% for color in site.data.theme-colors %}
|
||||
<div class="p-3 bg-{{ color.name }} {% if color.name == "white" %}text-gray-dark{% else %}text-white{% endif %}">.bg-{{ color.name }}</div>{% endfor %}
|
||||
<div class="p-3 mb-2 bg-{{ color.name }} {% if color.name == "light" %}text-gray-dark{% else %}text-white{% endif %}">.bg-{{ color.name }}</div>{% endfor %}
|
||||
{% endexample %}
|
||||
|
||||
{% callout info %}
|
||||
|
@ -1,11 +1,3 @@
|
||||
//
|
||||
// Contextual backgrounds
|
||||
//
|
||||
|
||||
.bg-faded {
|
||||
background-color: darken($body-bg, 3%);
|
||||
}
|
||||
|
||||
@each $color, $value in $theme-colors {
|
||||
@include bg-variant('.bg-#{$color}', $value);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user