descriptions.scss 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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. }
  93. .#{$module}-value {
  94. @include font-size-header-6;
  95. }
  96. }
  97. &-medium {
  98. .#{$module}-item {
  99. padding-right: $spacing-descriptions_item_medium-paddingRight;
  100. }
  101. & .#{$module}-key {
  102. padding-bottom: $spacing-descriptions_key_medium-paddingBottom;
  103. }
  104. & .#{$module}-value {
  105. @include font-size-header-4;
  106. }
  107. }
  108. &-large {
  109. .#{$module}-item {
  110. padding-right: $spacing-descriptions_item_large-paddingRight;
  111. }
  112. & .#{$module}-key {
  113. padding-bottom: $spacing-descriptions_key_large-paddingBottom;
  114. }
  115. & .#{$module}-value {
  116. @include font-size-header-2;
  117. }
  118. }
  119. }
  120. }
  121. @import "./rtl.scss";