Labels are small inline elements used to tag, categorize, or highlight content. Apply the label class,
then add a color class to style it.
<span class="label label-red">Red</span>
<span class="label label-blue">Blue</span>
<span class="label label-green">Green</span>
<span class="label label-yellow">Yellow</span>
<span class="label label-white">White</span>
<span class="label label-grey-light">Grey light</span>
.label {
padding: var(--sh-label-padding);
border-radius: var(--sh-label-radius);
display: inline-block;
}
/* generated for each color in the palette */
.label-red {
background-color: var(--sh-red);
color: var(--sh-white);
}
/* ... label-blue, label-green, label-yellow, label-grey-light ... */
.label-white {
border: 1px solid var(--sh-grey);
}
When the label is a link, it gets a transition, and a lighter background on hover.
<a href="#" class="label label-red">Red</a>
<a href="#" class="label label-blue">Blue</a>
<a href="#" class="label label-green">Green</a>
<a href="#" class="label label-yellow">Yellow</a>
<a href="#" class="label label-white">White</a>
<a href="#" class="label label-grey-light">Grey light</a>
a.label {
transition: background-color 0.15s, color 0.15s;
}
/* lighter shade on hover, for each color */
a.label-red:hover {
background-color: /* red lightened by 15% */;
}