Yunti Yunti - 1 month ago 8
CSS Question

boostrap override checkbox label css

I'm trying to do a simple checkbox label override. However I don't seem to have the selector correct:

default in bootstrap forms.less

.checkbox label, .radio label {
min-height: 20px;
padding-left: 20px;
margin-bottom: 0;
font-weight: 400;
cursor: pointer;
}


my addition in base.less

.checkbox {
.label {
color: @grey;
font-size: 14px;
}
}


However this doesn't work (if I can change the radio label at the same time too, that's fine).

Answer

You are addressing a class "label" and not the label itself:

.checkbox, .radio {
    label {
        color: @grey;
        font-size: 14px;
    }
}
Comments