_badges.scss 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. .badge {
  2. justify-content: center;
  3. align-items: center;
  4. background: $badge-bg-color;
  5. overflow: hidden;
  6. user-select: none;
  7. border: var(--#{$prefix}border-width) var(--#{$prefix}border-style) transparent;
  8. min-width: ($badge-padding-y * 2 ) + (divide($badge-font-size, 100%) * 1em);
  9. font-weight: $headings-font-weight;
  10. letter-spacing: .04em;
  11. vertical-align: bottom;
  12. @at-root a#{&} {
  13. color: $card-bg;
  14. }
  15. .avatar {
  16. box-sizing: content-box;
  17. width: 1.25rem;
  18. height: 1.25rem;
  19. margin: 0 .5rem 0 -.5rem;
  20. }
  21. .icon {
  22. width: 1em;
  23. height: 1em;
  24. font-size: 1rem;
  25. stroke-width: 2;
  26. }
  27. }
  28. .badge:empty,
  29. .badge-empty {
  30. display: inline-block;
  31. width: $badge-empty-size;
  32. height: $badge-empty-size;
  33. min-width: 0;
  34. min-height: auto;
  35. padding: 0;
  36. border-radius: $border-radius-pill;
  37. vertical-align: baseline;
  38. }
  39. //
  40. // Outline badge
  41. //
  42. .badge-outline {
  43. background-color: transparent;
  44. border: var(--#{$prefix}border-width) var(--#{$prefix}border-style) currentColor;
  45. }
  46. //
  47. // Pill badge
  48. //
  49. .badge-pill {
  50. border-radius: $border-radius-pill;
  51. }
  52. //
  53. // Badges list
  54. //
  55. .badges-list {
  56. @include elements-list;
  57. }
  58. //
  59. // Notification badge
  60. //
  61. .badge-notification {
  62. position: absolute !important;
  63. top: 0 !important;
  64. right: 0 !important;
  65. transform: translate(50%, -50%);
  66. z-index: 1;
  67. }
  68. .badge-blink {
  69. animation: blink 2s infinite;
  70. }