9b33dba828a22b7a0d1075fe76dbeb087d538bda1d097298d8403ac40c412fedc5c7965703c5ef6b9b4a8c78cb99c506a4b6ca75598f222911517152da3cd4 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. @import "mixins/mixins";
  2. @import "common/var";
  3. @include b(alert) {
  4. width: 100%;
  5. padding: $--alert-padding;
  6. margin: 0;
  7. box-sizing: border-box;
  8. border-radius: $--alert-border-radius;
  9. position: relative;
  10. background-color: $--color-white;
  11. overflow: hidden;
  12. opacity: 1;
  13. display: flex;
  14. align-items: center;
  15. transition: opacity .2s;
  16. @include when(light) {
  17. .el-alert__closebtn {
  18. color: $--color-text-placeholder;
  19. }
  20. }
  21. @include when(dark) {
  22. .el-alert__closebtn {
  23. color: $--color-white;
  24. }
  25. .el-alert__description {
  26. color: $--color-white;
  27. }
  28. }
  29. @include when(center) {
  30. justify-content: center;
  31. }
  32. @include m(success) {
  33. &.is-light {
  34. background-color: $--alert-success-color;
  35. color: $--color-success;
  36. .el-alert__description {
  37. color: $--color-success;
  38. }
  39. }
  40. &.is-dark {
  41. background-color: $--color-success;
  42. color: $--color-white;
  43. }
  44. }
  45. @include m(info) {
  46. &.is-light {
  47. background-color: $--alert-info-color;
  48. color: $--color-info;
  49. }
  50. &.is-dark {
  51. background-color: $--color-info;
  52. color: $--color-white;
  53. }
  54. .el-alert__description {
  55. color: $--color-info;
  56. }
  57. }
  58. @include m(warning) {
  59. &.is-light {
  60. background-color: $--alert-warning-color;
  61. color: $--color-warning;
  62. .el-alert__description {
  63. color: $--color-warning;
  64. }
  65. }
  66. &.is-dark {
  67. background-color: $--color-warning;
  68. color: $--color-white;
  69. }
  70. }
  71. @include m(error) {
  72. &.is-light {
  73. background-color: $--alert-danger-color;
  74. color: $--color-danger;
  75. .el-alert__description {
  76. color: $--color-danger;
  77. }
  78. }
  79. &.is-dark {
  80. background-color: $--color-danger;
  81. color: $--color-white;
  82. }
  83. }
  84. @include e(content) {
  85. display: table-cell;
  86. padding: 0 8px;
  87. }
  88. @include e(icon) {
  89. font-size: $--alert-icon-size;
  90. width: $--alert-icon-size;
  91. @include when(big) {
  92. font-size: $--alert-icon-large-size;
  93. width: $--alert-icon-large-size;
  94. }
  95. }
  96. @include e(title) {
  97. font-size: $--alert-title-font-size;
  98. line-height: 18px;
  99. @include when(bold) {
  100. font-weight: bold;
  101. }
  102. }
  103. & .el-alert__description {
  104. font-size: $--alert-description-font-size;
  105. margin: 5px 0 0 0;
  106. }
  107. @include e(closebtn) {
  108. font-size: $--alert-close-font-size;
  109. opacity: 1;
  110. position: absolute;
  111. top: 12px;
  112. right: 15px;
  113. cursor: pointer;
  114. @include when(customed) {
  115. font-style: normal;
  116. font-size: $--alert-close-customed-font-size;
  117. top: 9px;
  118. }
  119. }
  120. }
  121. .el-alert-fade-enter,
  122. .el-alert-fade-leave-active {
  123. opacity: 0;
  124. }