2012-06-29 06:46:45 +02:00
|
|
|
//
|
|
|
|
// Labels and badges
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
2012-03-23 00:02:00 +01:00
|
|
|
|
|
|
|
// Base classes
|
|
|
|
.badge {
|
2012-10-01 21:04:10 +02:00
|
|
|
display: inline-block;
|
|
|
|
padding: 2px 4px;
|
2012-11-30 23:45:25 +01:00
|
|
|
font-size: @font-size-base * .846;
|
2012-03-23 00:02:00 +01:00
|
|
|
font-weight: bold;
|
2012-03-23 08:40:10 +01:00
|
|
|
line-height: 14px; // ensure proper line-height if floated
|
2012-12-01 00:05:23 +01:00
|
|
|
color: #fff;
|
2012-04-18 18:47:30 +02:00
|
|
|
vertical-align: baseline;
|
2012-03-23 00:02:00 +01:00
|
|
|
white-space: nowrap;
|
|
|
|
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
|
|
|
|
background-color: @grayLight;
|
2012-10-01 08:11:54 +02:00
|
|
|
border-radius: 3px;
|
2012-03-23 00:02:00 +01:00
|
|
|
|
2012-12-20 06:18:32 +01:00
|
|
|
// Empty labels/badges collapse
|
2012-11-03 21:18:23 +01:00
|
|
|
&:empty {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-03-23 00:02:00 +01:00
|
|
|
// Hover state, but only for links
|
2012-12-20 06:18:32 +01:00
|
|
|
a.badge {
|
|
|
|
&:hover {
|
2012-12-01 00:05:23 +01:00
|
|
|
color: #fff;
|
2012-03-23 00:02:00 +01:00
|
|
|
text-decoration: none;
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Colors
|
|
|
|
// Only give background-color difference to links (and to simplify, we don't qualifty with `a` but [href] attribute)
|
|
|
|
.badge {
|
|
|
|
// Important (red)
|
2012-12-01 00:38:31 +01:00
|
|
|
&-danger { background-color: @state-error-text; }
|
|
|
|
&-danger[href] { background-color: darken(@state-error-text, 10%); }
|
2012-03-23 00:02:00 +01:00
|
|
|
// Warnings (orange)
|
2012-12-01 00:18:49 +01:00
|
|
|
&-warning { background-color: #f89406; }
|
|
|
|
&-warning[href] { background-color: darken(#f89406, 10%); }
|
2012-03-23 00:02:00 +01:00
|
|
|
// Success (green)
|
2012-12-01 00:38:31 +01:00
|
|
|
&-success { background-color: @state-success-text; }
|
|
|
|
&-success[href] { background-color: darken(@state-success-text, 10%); }
|
2012-03-23 00:02:00 +01:00
|
|
|
}
|
2012-07-30 22:25:27 +02:00
|
|
|
|
|
|
|
// Quick fix for labels/badges in buttons
|
|
|
|
.btn {
|
|
|
|
.badge {
|
|
|
|
position: relative;
|
|
|
|
top: -1px;
|
|
|
|
}
|
|
|
|
}
|
2012-07-31 00:54:03 +02:00
|
|
|
.btn-mini {
|
|
|
|
.badge {
|
|
|
|
top: 0;
|
|
|
|
}
|
|
|
|
}
|