1
0
Fork 0
mirror of https://github.com/twbs/bootstrap.git synced 2022-11-09 12:25:43 -05:00
twbs--bootstrap/less/labels.less

65 lines
1.1 KiB
Text
Raw Normal View History

//
// Labels
// --------------------------------------------------
.label {
2013-04-19 15:31:55 -04:00
display: inline;
padding: .2em .6em .3em;
font-size: 75%;
font-weight: bold;
line-height: 1;
color: @label-color;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
border-radius: .25em;
2013-07-01 20:32:07 -04:00
// Add hover effects, but only for links
&[href] {
2013-04-19 15:31:55 -04:00
&:hover,
&:focus {
color: @label-link-hover-color;
2013-04-19 15:31:55 -04:00
text-decoration: none;
cursor: pointer;
}
}
// Empty labels collapse automatically (not available in IE8)
&:empty {
display: none;
}
// Quick fix for labels in buttons
.btn & {
position: relative;
top: -1px;
}
2013-04-19 15:31:55 -04:00
}
// Colors
// Contextual variations (linked labels get darker on :hover)
.label-default {
.label-variant(@label-default-bg);
}
.label-primary {
.label-variant(@label-primary-bg);
2013-04-19 15:31:55 -04:00
}
.label-success {
2013-07-07 17:26:51 -04:00
.label-variant(@label-success-bg);
2013-04-19 15:31:55 -04:00
}
.label-info {
.label-variant(@label-info-bg);
}
.label-warning {
2013-07-07 17:26:51 -04:00
.label-variant(@label-warning-bg);
}
.label-danger {
.label-variant(@label-danger-bg);
2013-07-01 20:32:07 -04:00
}