index.scss 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. @import './../common/abstracts/_mixin.scss';
  2. @import './../common/abstracts/variable.scss';
  3. .wot-theme-dark {
  4. @include b(badge) {
  5. @include e(content) {
  6. border-color: $-dark-background2;
  7. }
  8. }
  9. }
  10. @include b(badge) {
  11. position: relative;
  12. vertical-align: middle;
  13. display: inline-block;
  14. @include e(content) {
  15. display: inline-block;
  16. box-sizing: content-box;
  17. height: $-badge-height;
  18. line-height: $-badge-height;
  19. padding: $-badge-padding;
  20. background-color: $-badge-bg;
  21. border-radius: calc($-badge-height / 2 + 2px);
  22. color: $-badge-color;
  23. font-size: $-badge-fs;
  24. text-align: center;
  25. white-space: nowrap;
  26. border: $-badge-border;
  27. font-weight: 500;
  28. @include when(fixed) {
  29. position: absolute;
  30. top: 0px;
  31. right: 0px;
  32. transform: translateY(-50%) translateX(50%);
  33. }
  34. @include when(dot) {
  35. height: $-badge-dot-size;
  36. width: $-badge-dot-size;
  37. padding: 0;
  38. border-radius: 50%;
  39. }
  40. @each $type in (primary, success, warning, info, danger) {
  41. @include m($type) {
  42. @if $type == primary {
  43. background-color: $-badge-primary;
  44. } @else if $type == success {
  45. background-color: $-badge-success;
  46. } @else if $type == warning {
  47. background-color: $-badge-warning;
  48. } @else if $type == info {
  49. background-color: $-badge-info;
  50. } @else {
  51. background-color: $-badge-danger;
  52. }
  53. }
  54. }
  55. }
  56. }