No Description

_labels.scss 1.1KB

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