descriptions.scss 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. @import "./variables.scss";
  2. $module: #{$prefix}-descriptions;
  3. .#{$module} {
  4. line-height: $font-descriptions-lineHeight;
  5. table,
  6. tr,
  7. th,
  8. td {
  9. margin: 0;
  10. padding: 0;
  11. border: 0;
  12. }
  13. th {
  14. padding-right: $spacing-descriptions_th-paddingRight;
  15. }
  16. & &-item {
  17. margin: 0;
  18. padding-bottom: $spacing-descriptions_item-paddingBottom;
  19. text-align: left;
  20. vertical-align: top;
  21. }
  22. &-key {
  23. font-weight: normal;
  24. @include font-size-regular;
  25. min-height: $font-size-regular;
  26. white-space: nowrap;
  27. color: $color-descriptions_key-text-default;
  28. }
  29. &-value {
  30. font-weight: normal;
  31. @include font-size-regular;
  32. color: $color-descriptions_value-text-default;
  33. }
  34. &-center {
  35. .#{$module}-item-th {
  36. text-align: right;
  37. }
  38. .#{$module}-item-td {
  39. text-align: left;
  40. }
  41. }
  42. &-left {
  43. .#{$module}-item-th,
  44. .#{$module}-item-td {
  45. text-align: left;
  46. }
  47. }
  48. &-justify {
  49. .#{$module}-item-th {
  50. text-align: left;
  51. }
  52. .#{$module}-item-td {
  53. text-align: right;
  54. }
  55. }
  56. &-plain {
  57. // tag 垂直居中
  58. .#{$module}-key,
  59. .#{$module}-value {
  60. display: inline-block;
  61. }
  62. .#{$module}-value {
  63. padding-left: $spacing-descriptions_value_plain-paddingLeft;
  64. & .#{$prefix}-tag {
  65. vertical-align: middle;
  66. }
  67. }
  68. }
  69. &-double {
  70. tbody {
  71. display: flex;
  72. flex-wrap: wrap;
  73. }
  74. tr {
  75. display: inline-flex;
  76. flex-direction: column;
  77. }
  78. & .#{$module}-item {
  79. padding: $spacing-descriptions_item_double-padding;
  80. flex: 1;
  81. }
  82. .#{$module}-value {
  83. font-weight: $font-descriptions_value-fontWeight;
  84. }
  85. &-small {
  86. .#{$module}-item {
  87. padding-right: $spacing-descriptions_item_small-paddingRight;
  88. }
  89. .#{$module}-key {
  90. @include font-size-small;
  91. padding-bottom: 0;
  92. font-size: $font-descriptions_key_small-fontSize;
  93. }
  94. .#{$module}-value {
  95. @include font-size-header-6;
  96. font-size: $font-descriptions_value_small-fontSize;
  97. }
  98. }
  99. &-medium {
  100. .#{$module}-item {
  101. padding-right: $spacing-descriptions_item_medium-paddingRight;
  102. }
  103. & .#{$module}-key {
  104. padding-bottom: $spacing-descriptions_key_medium-paddingBottom;
  105. font-size: $font-descriptions_key_medium-fontSize;
  106. }
  107. & .#{$module}-value {
  108. @include font-size-header-4;
  109. font-size: $font-descriptions_value_medium-fontSize;
  110. }
  111. }
  112. &-large {
  113. .#{$module}-item {
  114. padding-right: $spacing-descriptions_item_large-paddingRight;
  115. }
  116. & .#{$module}-key {
  117. padding-bottom: $spacing-descriptions_key_large-paddingBottom;
  118. font-size: $font-descriptions_key_large-fontSize;
  119. }
  120. & .#{$module}-value {
  121. @include font-size-header-2;
  122. font-size: $font-descriptions_value_large-fontSize;
  123. }
  124. }
  125. }
  126. }
  127. @import "./rtl.scss";