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

70 lines
1.2 KiB
Plaintext
Raw Normal View History

//
// Labels
// --------------------------------------------------
.label {
2013-04-19 21:31:55 +02:00
display: inline;
padding: .25em .6em;
font-size: 75%;
font-weight: 500;
line-height: 1;
color: #fff;
text-align: center;
white-space: nowrap;
vertical-align: middle;
background-color: @gray-light;
border-radius: .25em;
// Add hover effects, but only for links
&[href] {
2013-04-19 21:31:55 +02:00
&:hover,
&:focus {
color: #fff;
text-decoration: none;
cursor: pointer;
background-color: darken(@gray-light, 10%);
2013-04-19 21:31:55 +02:00
}
}
}
// Colors
// Contextual variations (linked labels get darker on :hover)
2013-04-19 21:31:55 +02:00
.label-danger {
background-color: @label-danger-bg;
&[href] {
&:hover,
&:focus {
background-color: darken(@label-danger-bg, 10%);
}
}
2013-04-19 21:31:55 +02:00
}
.label-success {
background-color: @label-success-bg;
&[href] {
&:hover,
&:focus {
background-color: darken(@label-success-bg, 10%);
}
}
2013-04-19 21:31:55 +02:00
}
.label-warning {
background-color: @label-warning-bg;
&[href] {
&:hover,
&:focus {
background-color: darken(@label-warning-bg, 10%);
}
}
}
2013-04-19 21:31:55 +02:00
.label-info {
background-color: @label-info-bg;
&[href] {
&:hover,
&:focus {
background-color: darken(@label-info-bg, 10%);
}
}
}