A label tells the user what the corresponding input field means.
<label for="{{ for }}">{{ label }}
{% if label_optional %}
<span class="label-optional">
{{ label_optional }}
</span>
{% endif %}
</label>
<label for="form-item">Label
<span class="label-optional">
Optional
</span>
</label>
{
"label": "Label",
"for": "form-item",
"label_optional": "Optional"
}
label {
@include theme('color', 'color-tertiary', 'label-color');
@include bold-text;
.label-optional {
@include theme('color', 'color-primary--darken-2', 'label-optional-color');
@include theme('background-color', 'color-primary--lighten-5', 'label-optional-background');
padding: 0 .2rem;
float: right;
border-top-left-radius: border-radius('radius-1');
border-top-right-radius: border-radius('radius-1');
font-size: .6rem;
}
display: block;
//margin: 0 0 .4rem;
font-size: .8rem;
line-height: 1.2rem;
}