index.less 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. @import '../style/var';
  2. @import '../style/mixins/hairline';
  3. .van-cell {
  4. position: relative;
  5. display: flex;
  6. box-sizing: border-box;
  7. width: 100%;
  8. padding: @cell-vertical-padding @cell-horizontal-padding;
  9. overflow: hidden;
  10. color: @cell-text-color;
  11. font-size: @cell-font-size;
  12. line-height: @cell-line-height;
  13. background-color: @cell-background-color;
  14. &::after {
  15. .hairline-bottom(@cell-border-color, @padding-md, @padding-md);
  16. }
  17. &:last-child::after,
  18. &--borderless::after {
  19. display: none;
  20. }
  21. &__label {
  22. margin-top: @cell-label-margin-top;
  23. color: @cell-label-color;
  24. font-size: @cell-label-font-size;
  25. line-height: @cell-label-line-height;
  26. }
  27. &__title,
  28. &__value {
  29. flex: 1;
  30. }
  31. &__value {
  32. position: relative;
  33. overflow: hidden;
  34. color: @cell-value-color;
  35. text-align: right;
  36. vertical-align: middle;
  37. word-wrap: break-word;
  38. &--alone {
  39. color: @text-color;
  40. text-align: left;
  41. }
  42. }
  43. &__left-icon,
  44. &__right-icon {
  45. height: @cell-line-height;
  46. font-size: @cell-icon-size;
  47. line-height: @cell-line-height;
  48. }
  49. &__left-icon {
  50. margin-right: @padding-base;
  51. }
  52. &__right-icon {
  53. margin-left: @padding-base;
  54. color: @cell-right-icon-color;
  55. }
  56. &--clickable {
  57. cursor: pointer;
  58. &:active {
  59. background-color: @cell-active-color;
  60. }
  61. }
  62. &--required {
  63. overflow: visible;
  64. &::before {
  65. position: absolute;
  66. left: @padding-xs;
  67. color: @cell-required-color;
  68. font-size: @cell-font-size;
  69. content: '*';
  70. }
  71. }
  72. &--center {
  73. align-items: center;
  74. }
  75. &--large {
  76. padding-top: @cell-large-vertical-padding;
  77. padding-bottom: @cell-large-vertical-padding;
  78. .van-cell__title {
  79. font-size: @cell-large-title-font-size;
  80. }
  81. .van-cell__label {
  82. font-size: @cell-large-label-font-size;
  83. }
  84. }
  85. }