index.less 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. @import (reference) './variable.less';
  2. @import '../style/mixins/hairline.less';
  3. @collapsePrefix: ant-collapse-item;
  4. .@{collapsePrefix} {
  5. &-disabled {
  6. .ant-collapse-item-title-node,
  7. .ant-collapse-item-brief-container {
  8. opacity: 0.4;
  9. }
  10. .@{collapsePrefix}-title:active {
  11. background: @collapse-title-background-color;
  12. transition: 0s;
  13. }
  14. }
  15. &-line {
  16. display: flex;
  17. flex: 1;
  18. border-bottom: 1px solid @COLOR_BORDER;
  19. padding: 0 @collapse-title-padding @collapse-title-padding 0;
  20. }
  21. &-title {
  22. position: relative;
  23. display: flex;
  24. text-align: justify;
  25. align-items: center;
  26. justify-content: space-between;
  27. line-height: 48 * @rpx;
  28. padding: @collapse-title-padding 0 0 @collapse-title-padding;
  29. font-size: @collapse-title-size;
  30. color: @collapse-title-color;
  31. background-color: @collapse-title-background-color;
  32. transition: all 300ms linear;
  33. box-sizing: border-box;
  34. &-node {
  35. display: flex;
  36. flex: 1;
  37. max-width: 100%;
  38. // height: @collapse-title-height;
  39. overflow: hidden;
  40. white-space: nowrap;
  41. text-overflow: ellipsis;
  42. font-size: 34 * @rpx;
  43. color: @COLOR_TEXT_PRIMARY;
  44. }
  45. &-arrow {
  46. color: @COLOR_TEXT_WEAK;
  47. }
  48. &-icon {
  49. width: 44 * @rpx;
  50. height: 44 * @rpx;
  51. overflow: hidden;
  52. margin-right: 24 * @rpx;
  53. .ant-icon {
  54. font-size: 40 * @rpx;
  55. }
  56. & image {
  57. width: 44 * @rpx;
  58. height: 44 * @rpx;
  59. }
  60. }
  61. &:active {
  62. background-color: @COLOR_BORDER;
  63. transition: 0s;
  64. }
  65. }
  66. &-brief {
  67. &-container {
  68. display: flex;
  69. .ant-icon {
  70. font-size: 40 * @rpx;
  71. }
  72. }
  73. &-node {
  74. display: flex;
  75. flex: 1;
  76. font-size: 30 * @rpx;
  77. color: @COLOR_TEXT_ASSIST;
  78. margin-right: 8 * @rpx;
  79. }
  80. }
  81. &-content {
  82. color: @COLOR_TEXT_PRIMARY;
  83. border-bottom: 1px solid @COLOR_BORDER;
  84. padding: 24 * @rpx 24 * @rpx 24 * @rpx 0;
  85. box-sizing: border-box;
  86. &-container {
  87. padding-left: 24 * @rpx;
  88. background: @COLOR_WHITE_CHANGE;
  89. }
  90. &-wrap {
  91. will-change: height;
  92. overflow: hidden;
  93. &-active {
  94. animation: trigger1 0.2s;
  95. }
  96. &-non-active {
  97. animation: trigger2 0.2s;
  98. }
  99. &-transition {
  100. transition: height 0.2s ease-in-out;
  101. }
  102. &-first {
  103. height: 0;
  104. }
  105. }
  106. }
  107. }
  108. @keyframes trigger1 {
  109. 0% {
  110. content: '';
  111. }
  112. 100% {
  113. content: '';
  114. }
  115. }
  116. @keyframes trigger2 {
  117. 0% {
  118. content: '';
  119. }
  120. 100% {
  121. content: '';
  122. }
  123. }