_labels.scss (1222B)
1 // 2 // Labels 3 // -------------------------------------------------- 4 5 .label { 6 display: inline; 7 padding: .2em .6em .3em; 8 font-size: 75%; 9 font-weight: bold; 10 line-height: 1; 11 color: $label-color; 12 text-align: center; 13 white-space: nowrap; 14 vertical-align: baseline; 15 border-radius: .25em; 16 17 // [converter] extracted a& to a.label 18 19 // Empty labels collapse automatically (not available in IE8) 20 &:empty { 21 display: none; 22 } 23 24 // Quick fix for labels in buttons 25 .btn & { 26 position: relative; 27 top: -1px; 28 } 29 } 30 31 // Add hover effects, but only for links 32 a.label { 33 &:hover, 34 &:focus { 35 color: $label-link-hover-color; 36 text-decoration: none; 37 cursor: pointer; 38 } 39 } 40 41 // Colors 42 // Contextual variations (linked labels get darker on :hover) 43 44 .label-default { 45 @include label-variant($label-default-bg); 46 } 47 48 .label-primary { 49 @include label-variant($label-primary-bg); 50 } 51 52 .label-success { 53 @include label-variant($label-success-bg); 54 } 55 56 .label-info { 57 @include label-variant($label-info-bg); 58 } 59 60 .label-warning { 61 @include label-variant($label-warning-bg); 62 } 63 64 .label-danger { 65 @include label-variant($label-danger-bg); 66 }