index.scss 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. @import '../common/abstracts/variable';
  2. @import '../common/abstracts/mixin';
  3. @include b(notice-bar) {
  4. display: flex;
  5. padding: $-notice-bar-padding;
  6. align-items: center;
  7. font-size: $-notice-bar-fs;
  8. border-radius: $-notice-bar-border-radius;
  9. position: relative;
  10. box-sizing: border-box;
  11. @include when(warning) {
  12. background: $-notice-bar-warning-bg;
  13. color: $-notice-bar-warning-color;
  14. }
  15. @include when(info) {
  16. background: $-notice-bar-info-bg;
  17. color: $-notice-bar-info-color;
  18. }
  19. @include when(danger) {
  20. background: $-notice-bar-danger-bg;
  21. color: $-notice-bar-danger-color;
  22. }
  23. @include edeep(prefix) {
  24. padding-right: 4px;
  25. font-size: $-notice-bar-prefix-size;
  26. }
  27. @include edeep(suffix) {
  28. text-align: center;
  29. font-size: $-notice-bar-close-size;
  30. display: inline-block;
  31. background-color: $-notice-bar-close-bg;
  32. color: $-notice-bar-close-color;
  33. padding: 0;
  34. border-radius: 0px 8px 0px 4px;
  35. position: absolute;
  36. right: 0;
  37. top: 0;
  38. }
  39. @include e(wrap) {
  40. position: relative;
  41. flex: 1;
  42. height: $-notice-bar-line-height;
  43. overflow: hidden;
  44. line-height: $-notice-bar-line-height;
  45. }
  46. @include e(content) {
  47. position: absolute;
  48. white-space: nowrap;
  49. }
  50. @include m(ellipse) {
  51. .wd-notice-bar__content {
  52. position: static;
  53. @include lineEllipsis;
  54. }
  55. }
  56. @include m(wrap) {
  57. .wd-notice-bar__wrap {
  58. height: auto;
  59. }
  60. .wd-notice-bar__content {
  61. position: static;
  62. white-space: normal;
  63. }
  64. }
  65. }