rtl.scss 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. $module: #{$prefix}-table;
  2. .#{$module}-wrapper-rtl {
  3. .#{$module} {
  4. direction: rtl;
  5. text-align: right;
  6. &-align-left {
  7. .#{$module}-operate-wrapper {
  8. justify-content: flex-end;
  9. }
  10. }
  11. &-align-right {
  12. .#{$module}-operate-wrapper {
  13. justify-content: flex-start;
  14. }
  15. }
  16. &-thead {
  17. & > .#{$module}-row {
  18. & > .#{$module}-row-head {
  19. text-align: right;
  20. &.#{$module}-cell-fixed {
  21. &-left-last {
  22. border-right: 0;
  23. border-left: 1px solid $color-table_shadow-border-default;
  24. &.resizing {
  25. // rtl override mixin
  26. border-left: $width-table_resizer_border solid $color-table_resizer-bg-default;
  27. }
  28. }
  29. &-right-first {
  30. border-left: 0;
  31. border-right: 1px solid $color-table_shadow-border-default;
  32. &.resizing {
  33. border-left: $width-table_resizer_border solid $color-table_resizer-bg-default;
  34. }
  35. &[x-type="column-scrollbar"] {
  36. box-shadow: none;
  37. border-right: transparent;
  38. }
  39. }
  40. }
  41. }
  42. .resizing {
  43. border-left: $width-table_resizer_border solid $color-table_resizer-bg-default;
  44. }
  45. .react-resizable-handle {
  46. right: auto;
  47. left: $spacing-table_react_resizable_handle-right;
  48. }
  49. }
  50. }
  51. &-tbody {
  52. display: table-row-group;
  53. & > .#{$module}-row {
  54. & > .#{$module}-row-cell {
  55. &.resizing {
  56. border-right: 0;
  57. border-left: $width-table_resizer_border solid $color-table_resizer-bg-default;
  58. }
  59. }
  60. & > .#{$module}-cell-fixed {
  61. &-left-last {
  62. border-right: 0;
  63. border-left: $width-table_cell_fixed_left_last solid $color-table_shadow-border-default;
  64. }
  65. &-right-first {
  66. border-left: 0;
  67. border-right: $width-table_cell_fixed_right_first solid $color-table_shadow-border-default;
  68. }
  69. }
  70. }
  71. }
  72. .#{$module}-column {
  73. &-selection {
  74. .#{$prefix}-checkbox-inner-display {
  75. .#{$prefix}-icon {
  76. left: auto;
  77. right: 0;
  78. }
  79. }
  80. }
  81. &-expand {
  82. .#{$module}-expand-icon {
  83. transform: scaleX(-1) translateY(2px);
  84. &:last-child {
  85. margin-right: auto;
  86. margin-left: 0;
  87. }
  88. }
  89. }
  90. &-sorter {
  91. margin-left: 0;
  92. margin-right: $spacing-table_column_sorter-marginLeft;
  93. }
  94. &-filter {
  95. margin-left: 0;
  96. margin-right: $spacing-table_column_filter-marginLeft;
  97. }
  98. }
  99. &-bordered {
  100. .#{$module}-container {
  101. border-left: 0;
  102. border-right: $width-table_base_border $border-table_base-borderStyle $color-table-border-default;
  103. }
  104. .#{$module}-thead > .#{$module}-row > .#{$module}-row-head,
  105. .#{$module}-tbody > .#{$module}-row > .#{$module}-row-cell {
  106. border-right: 0;
  107. border-left: $width-table_base_border $border-table_base-borderStyle $color-table-border-default;
  108. }
  109. .#{$module}-placeholder {
  110. border-left: $width-table_base_border $border-table_base-borderStyle $color-table-border-default;
  111. border-right: 0;
  112. }
  113. .#{$module}-header {
  114. &::-webkit-scrollbar {
  115. border-right: 0;
  116. border-left: $width-table_base_border $border-table_base-borderStyle $color-table-border-default;
  117. }
  118. }
  119. }
  120. &-fixed {
  121. & > .#{$module}-tbody {
  122. & > .#{$module}-row-expand > .#{$module}-row-cell > .#{$module}-expand-inner,
  123. & > .#{$module}-row-section > .#{$module}-row-cell > .#{$module}-section-inner {
  124. left: auto;
  125. right: 0;
  126. margin-right: -$spacing-table_expand_row-paddingLeft;
  127. margin-left: -$spacing-table_expand_row-paddingRight;
  128. padding-right: $spacing-table_expand_row-paddingLeft;
  129. padding-left: $spacing-table_expand_row-paddingRight;
  130. }
  131. }
  132. }
  133. &-scroll {
  134. &-position {
  135. &-left {
  136. .#{$module}-tbody,
  137. .#{$module}-thead {
  138. & > .#{$module}-row > .#{$module}-cell-fixed-left-last {
  139. box-shadow: $shadow-table_right;
  140. }
  141. & > .#{$module}-row > .#{$module}-cell-fixed-right-first {
  142. box-shadow: none;
  143. }
  144. }
  145. }
  146. &-right {
  147. .#{$module}-tbody,
  148. .#{$module}-thead {
  149. & > .#{$module}-row > .#{$module}-cell-fixed-left-last {
  150. box-shadow: none;
  151. }
  152. & > .#{$module}-row > .#{$module}-cell-fixed-right-first {
  153. box-shadow: $shadow-table_left;
  154. }
  155. }
  156. }
  157. }
  158. }
  159. }
  160. .#{$module}-expand-icon {
  161. margin-right: auto;
  162. margin-left: $spacing-table_expand_icon-marginRight;
  163. transform: scaleX(-1) translateY(2px);
  164. }
  165. .#{$prefix}-spin {
  166. direction: rtl;
  167. }
  168. }