index.less 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. @import '../style/var';
  2. @import '../style/mixins/ellipsis';
  3. .van-coupon {
  4. margin: @coupon-margin;
  5. overflow: hidden;
  6. background-color: @coupon-background-color;
  7. border-radius: @coupon-border-radius;
  8. box-shadow: @coupon-box-shadow;
  9. &:active {
  10. background-color: @coupon-active-background-color;
  11. }
  12. &__content {
  13. display: flex;
  14. align-items: center;
  15. box-sizing: border-box;
  16. min-height: @coupon-content-height;
  17. padding: @coupon-content-padding;
  18. color: @gray-8;
  19. }
  20. &__head {
  21. position: relative;
  22. min-width: @coupon-head-width;
  23. padding: 0 @padding-xs;
  24. color: @coupon-amount-color;
  25. text-align: center;
  26. }
  27. &__amount,
  28. &__condition,
  29. &__name,
  30. &__valid {
  31. .ellipsis();
  32. }
  33. &__amount {
  34. margin-bottom: 6px;
  35. font-weight: @font-weight-bold;
  36. font-size: @coupon-amount-font-size;
  37. .ellipsis();
  38. span {
  39. font-weight: normal;
  40. font-size: @coupon-currency-font-size;
  41. &:not(:empty) {
  42. margin-left: 2px;
  43. }
  44. }
  45. }
  46. &__condition {
  47. font-size: @font-size-sm;
  48. line-height: 16px;
  49. white-space: pre-wrap;
  50. }
  51. &__body {
  52. position: relative;
  53. flex: 1;
  54. border-radius: 0 @coupon-border-radius @coupon-border-radius 0;
  55. }
  56. &__name {
  57. margin-bottom: 10px;
  58. font-weight: bold;
  59. font-size: @coupon-name-font-size;
  60. line-height: @line-height-md;
  61. }
  62. &__valid {
  63. font-size: @font-size-sm;
  64. }
  65. &__corner {
  66. position: absolute;
  67. top: 0;
  68. right: @padding-md;
  69. bottom: 0;
  70. }
  71. &__description {
  72. padding: @coupon-description-padding;
  73. font-size: @font-size-sm;
  74. border-top: 1px dashed @coupon-description-border-color;
  75. }
  76. &--disabled {
  77. &:active {
  78. background-color: @coupon-background-color;
  79. }
  80. .van-coupon-item__content {
  81. height: @coupon-content-height - 10px;
  82. }
  83. .van-coupon__head {
  84. color: inherit;
  85. }
  86. }
  87. }