0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-12 00:08:59 +01:00
Bootstrap/less/labels.less

65 lines
1.0 KiB
Plaintext
Raw Normal View History

//
// Labels
// --------------------------------------------------
.label {
2013-04-19 21:31:55 +02: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();
2013-07-02 02:32:07 +02:00
// Add hover effects, but only for links
2014-03-07 18:54:53 +01:00
a& {
2013-04-19 21:31:55 +02:00
&:hover,
&:focus {
color: @label-link-hover-color;
2013-04-19 21:31:55 +02:00
text-decoration: none;
cursor: pointer;
}
}
// Empty labels collapse automatically
&:empty {
display: none;
}
// Quick fix for labels in buttons
.btn & {
position: relative;
top: -1px;
}
2013-04-19 21:31:55 +02: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 21:31:55 +02:00
}
.label-success {
2013-07-07 23:26:51 +02:00
.label-variant(@label-success-bg);
2013-04-19 21:31:55 +02:00
}
.label-info {
.label-variant(@label-info-bg);
}
.label-warning {
2013-07-07 23:26:51 +02:00
.label-variant(@label-warning-bg);
}
.label-danger {
.label-variant(@label-danger-bg);
2013-07-02 02:32:07 +02:00
}