説明なし

labels.less 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. // Add hover effects, but only for links
  16. a& {
  17. &:hover,
  18. &:focus {
  19. color: @label-link-hover-color;
  20. text-decoration: none;
  21. cursor: pointer;
  22. }
  23. }
  24. // Empty labels collapse automatically (not available in IE8)
  25. &:empty {
  26. display: none;
  27. }
  28. // Quick fix for labels in buttons
  29. .btn & {
  30. position: relative;
  31. top: -1px;
  32. }
  33. }
  34. // Colors
  35. // Contextual variations (linked labels get darker on :hover)
  36. .label-default {
  37. .label-variant(@label-default-bg);
  38. }
  39. .label-primary {
  40. .label-variant(@label-primary-bg);
  41. }
  42. .label-success {
  43. .label-variant(@label-success-bg);
  44. }
  45. .label-info {
  46. .label-variant(@label-info-bg);
  47. }
  48. .label-warning {
  49. .label-variant(@label-warning-bg);
  50. }
  51. .label-danger {
  52. .label-variant(@label-danger-bg);
  53. }