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 %}
|
{% example html %}
|
||||||
{% for color in site.data.theme-colors %}
|
{% 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 %}
|
{% 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.
|
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 %}
|
{% example html %}
|
||||||
{% for color in site.data.theme-colors %}
|
{% 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 %}
|
{% endexample %}
|
||||||
|
|
||||||
{% callout info %}
|
{% callout info %}
|
||||||
|
|
|
@ -1,11 +1,3 @@
|
||||||
//
|
|
||||||
// Contextual backgrounds
|
|
||||||
//
|
|
||||||
|
|
||||||
.bg-faded {
|
|
||||||
background-color: darken($body-bg, 3%);
|
|
||||||
}
|
|
||||||
|
|
||||||
@each $color, $value in $theme-colors {
|
@each $color, $value in $theme-colors {
|
||||||
@include bg-variant('.bg-#{$color}', $value);
|
@include bg-variant('.bg-#{$color}', $value);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue