badge.scss 860 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. .cl-badge {
  2. position: relative;
  3. vertical-align: middle;
  4. display: inline-block;
  5. z-index: 9;
  6. &__content {
  7. display: inline-block;
  8. height: 16rpx;
  9. min-width: 16rpx;
  10. line-height: 16rpx;
  11. position: absolute;
  12. top: -8rpx;
  13. right: -8rpx;
  14. background-color: $cl-color-error;
  15. color: #fff;
  16. font-size: 24rpx;
  17. text-align: center;
  18. white-space: nowrap;
  19. border: 4rpx solid rgba(255, 255, 255, 1);
  20. border-radius: 20rpx;
  21. padding: 8rpx;
  22. transform: scale(0.9);
  23. &.is-dot {
  24. height: 20rpx;
  25. min-width: 20rpx;
  26. padding: 0;
  27. border-radius: 50%;
  28. }
  29. &--primary {
  30. background-color: $cl-color-primary;
  31. }
  32. &--success {
  33. background-color: $cl-color-success;
  34. }
  35. &--warning {
  36. background-color: $cl-color-warning;
  37. }
  38. &--info {
  39. background-color: $cl-color-info;
  40. }
  41. &--error {
  42. background-color: $cl-color-error;
  43. }
  44. }
  45. }