Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1 | espaco | 1 | // |
| 2 | // Badges |
||
| 3 | // -------------------------------------------------- |
||
| 4 | |||
| 5 | |||
| 6 | // Base class |
||
| 7 | .badge { |
||
| 8 | display: inline-block; |
||
| 9 | min-width: 10px; |
||
| 10 | padding: 3px 7px; |
||
| 11 | font-size: $font-size-small; |
||
| 12 | font-weight: $badge-font-weight; |
||
| 13 | color: $badge-color; |
||
| 14 | line-height: $badge-line-height; |
||
| 15 | vertical-align: middle; |
||
| 16 | white-space: nowrap; |
||
| 17 | text-align: center; |
||
| 18 | background-color: $badge-bg; |
||
| 19 | border-radius: $badge-border-radius; |
||
| 20 | |||
| 21 | // Empty badges collapse automatically (not available in IE8) |
||
| 22 | &:empty { |
||
| 23 | display: none; |
||
| 24 | } |
||
| 25 | |||
| 26 | // Quick fix for badges in buttons |
||
| 27 | .btn & { |
||
| 28 | position: relative; |
||
| 29 | top: -1px; |
||
| 30 | } |
||
| 31 | |||
| 32 | .btn-xs &, |
||
| 33 | .btn-group-xs > .btn & { |
||
| 34 | top: 0; |
||
| 35 | padding: 1px 5px; |
||
| 36 | } |
||
| 37 | |||
| 38 | // [converter] extracted a& to a.badge |
||
| 39 | |||
| 40 | // Account for badges in navs |
||
| 41 | .list-group-item.active > &, |
||
| 42 | .nav-pills > .active > a > & { |
||
| 43 | color: $badge-active-color; |
||
| 44 | background-color: $badge-active-bg; |
||
| 45 | } |
||
| 46 | |||
| 47 | .list-group-item > & { |
||
| 48 | float: right; |
||
| 49 | } |
||
| 50 | |||
| 51 | .list-group-item > & + & { |
||
| 52 | margin-right: 5px; |
||
| 53 | } |
||
| 54 | |||
| 55 | .nav-pills > li > a > & { |
||
| 56 | margin-left: 3px; |
||
| 57 | } |
||
| 58 | } |
||
| 59 | |||
| 60 | // Hover state, but only for links |
||
| 61 | a.badge { |
||
| 62 | &:hover, |
||
| 63 | &:focus { |
||
| 64 | color: $badge-link-hover-color; |
||
| 65 | text-decoration: none; |
||
| 66 | cursor: pointer; |
||
| 67 | } |
||
| 68 | } |