index.less 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. @import (reference) './variable.less';
  2. .@{gridPrefix} {
  3. padding: 24 * @rpx;
  4. box-sizing: border-box;
  5. &-columns-3 {
  6. padding: 24 * @rpx 0;
  7. }
  8. &-default {
  9. display: flex;
  10. flex-wrap: wrap;
  11. justify-content: flex-start;
  12. }
  13. &-scroll {
  14. display: flex;
  15. flex-wrap: nowrap;
  16. align-items: flex-start;
  17. }
  18. &-item {
  19. box-sizing: border-box;
  20. display: flex;
  21. flex-direction: column;
  22. align-items: center;
  23. text-align: center;
  24. flex-shrink: 0;
  25. position: relative;
  26. &-line {
  27. .hairline('right',@border-color);
  28. }
  29. &-vertical-space {
  30. margin-bottom: @vertical-space;
  31. }
  32. &-columns-5 {
  33. width: 20%;
  34. }
  35. &-columns-4 {
  36. width: 25%;
  37. }
  38. &-columns-3 {
  39. width: 33.3%;
  40. }
  41. &-columns-2 {
  42. width: 50%;
  43. }
  44. &-horizontal {
  45. justify-content: center;
  46. text-align: left;
  47. position: relative;
  48. min-height: @icon-size;
  49. padding-left: 80 * @rpx;
  50. .@{gridPrefix}-item-img,
  51. .@{gridPrefix}-item-icon {
  52. position: absolute;
  53. left: 0;
  54. top: 0;
  55. bottom: 0;
  56. margin: auto;
  57. }
  58. .@{gridPrefix}-item-title {
  59. margin-top: 0;
  60. }
  61. }
  62. &-columns-scroll {
  63. width: @columnsscroll-width;
  64. }
  65. &-icon {
  66. &-circle {
  67. border-radius: 50%;
  68. overflow: hidden;
  69. }
  70. &-icon {
  71. font-size: @icon-size;
  72. }
  73. &-image {
  74. width: @icon-size;
  75. height: @icon-size;
  76. }
  77. }
  78. &-title {
  79. font-size: 26 * @rpx;
  80. color: @title-color;
  81. line-height: 37 * @rpx;
  82. width: 100%;
  83. margin-top: 16 * @rpx;
  84. white-space: nowrap;
  85. overflow: hidden;
  86. text-overflow: ellipsis;
  87. }
  88. &-description {
  89. font-size: @description-size;
  90. color: @description-color;
  91. line-height: 33 * @rpx;
  92. width: 100%;
  93. white-space: nowrap;
  94. overflow: hidden;
  95. text-overflow: ellipsis;
  96. &:empty {
  97. display: none;
  98. }
  99. }
  100. }
  101. }