index.less 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. @import "../styles/mixins/index.less";
  2. @import "../styles/themes/index.less";
  3. .card-button-style(@theme, @color) {
  4. &--@{theme} {
  5. color: @color !important;
  6. }
  7. }
  8. .@{wux-prefix}-card {
  9. position: relative;
  10. min-height: @card-height;
  11. padding-bottom: 6px;
  12. display: flex;
  13. -webkit-box-orient: vertical;
  14. flex-direction: column;
  15. background-color: @card-bg;
  16. &--hover {
  17. background-color: @active-state-bg;
  18. }
  19. &--bordered {
  20. border-radius: @card-radius;
  21. &::before {
  22. .hairline(@border-color-split);
  23. border-radius: @card-radius;
  24. border-top-width: @border-width-base;
  25. border-right-width: @border-width-base;
  26. border-bottom-width: @border-width-base;
  27. border-left-width: @border-width-base;
  28. }
  29. }
  30. &--full {
  31. border-radius: 0;
  32. &::before {
  33. border-radius: 0;
  34. border-right-width: 0;
  35. border-left-width: 0;
  36. }
  37. }
  38. &--has-actions {
  39. padding-bottom: 0;
  40. }
  41. &__hd {
  42. position: relative;
  43. display: flex;
  44. font-size: 17px;
  45. padding: @card-hd-padding;
  46. align-items: center;
  47. &::before {
  48. .setBottomLine(@border-color-split);
  49. }
  50. }
  51. &__content {
  52. flex: 1;
  53. text-align: left;
  54. color: @black;
  55. }
  56. &__thumb {
  57. .square(@card-icon-size);
  58. display: inline-block;
  59. position: relative;
  60. margin-left: auto;
  61. margin-right: @margin-component-base;
  62. overflow: hidden;
  63. vertical-align: middle;
  64. }
  65. &__extra {
  66. flex: 1;
  67. text-align: right;
  68. font-size: 17px;
  69. color: @text-color-secondary;
  70. }
  71. &__bd {
  72. position: relative;
  73. padding: @card-bd-padding;
  74. font-size: 15px;
  75. color: @heading-color;
  76. min-height: 40px;
  77. }
  78. &__ft {
  79. display: flex;
  80. font-size: @font-size-base;
  81. color: @text-color-secondary;
  82. padding: @card-ft-padding;
  83. }
  84. &__actions {
  85. position: relative;
  86. display: flex;
  87. line-height: 50px;
  88. margin-top: 6px;
  89. justify-content: center;
  90. align-items: center;
  91. &::before {
  92. .setTopLine(@border-color-split);
  93. }
  94. }
  95. &__action {
  96. position: relative;
  97. display: block;
  98. flex: 1;
  99. color: @balanced;
  100. text-align: center;
  101. &::before {
  102. .setRightLine(@border-color-split);
  103. }
  104. &:last-child::before {
  105. display: none;
  106. }
  107. .card-button-style(default, @dark);
  108. .card-button-style(primary, @balanced);
  109. .card-button-style(light, @light-inverse);
  110. .card-button-style(stable, @stable-inverse);
  111. .card-button-style(positive, @positive);
  112. .card-button-style(calm, @calm);
  113. .card-button-style(assertive, @assertive);
  114. .card-button-style(balanced, @balanced);
  115. .card-button-style(energized, @energized);
  116. .card-button-style(royal, @royal);
  117. .card-button-style(dark, @dark);
  118. &--bold {
  119. font-weight: 500 !important;
  120. }
  121. &--hover {
  122. background-color: @active-state-bg !important;
  123. }
  124. &--disabled {
  125. opacity: @disabled-opacity;
  126. }
  127. }
  128. }