ant-design-blazor/components/table/style/rtl.less

163 lines
3.6 KiB
Plaintext
Raw Normal View History

2020-03-23 13:51:37 +08:00
@import '../../style/themes/index';
@import '../../style/mixins/index';
@table-prefix-cls: ~'@{ant-prefix}-table';
2020-04-30 10:55:54 +08:00
@table-wrapepr-cls: ~'@{table-prefix-cls}-wrapper';
2020-03-23 13:51:37 +08:00
@table-wrapepr-rtl-cls: ~'@{table-prefix-cls}-wrapper-rtl';
.@{table-prefix-cls}-wrapper {
&-rtl {
direction: rtl;
}
}
.@{table-prefix-cls} {
2020-04-10 17:44:53 +08:00
&-rtl {
direction: rtl;
}
2020-03-23 13:51:37 +08:00
table {
.@{table-wrapepr-rtl-cls} & {
text-align: right;
}
}
// ============================ Header ============================
2020-03-30 09:53:10 +08:00
&-thead {
2020-03-23 13:51:37 +08:00
> tr {
> th {
&[colspan]:not([colspan='1']) {
.@{table-wrapepr-rtl-cls} & {
text-align: center;
}
}
.@{table-wrapepr-rtl-cls} & {
text-align: right;
}
}
}
}
// ============================= Body =============================
2020-03-30 09:53:10 +08:00
&-tbody {
2020-03-23 13:51:37 +08:00
> tr {
// ========================= Nest Table ===========================
2020-07-01 21:38:23 +08:00
.@{table-prefix-cls}-wrapper:only-child {
2020-08-03 12:42:59 +08:00
.@{table-prefix-cls}.@{table-prefix-cls}-rtl {
2020-03-23 13:51:37 +08:00
margin: -@table-padding-vertical (@table-padding-horizontal + ceil(@font-size-sm * 1.4)) -@table-padding-vertical -@table-padding-horizontal;
}
}
}
}
// ========================== Pagination ==========================
2020-04-30 10:55:54 +08:00
&-pagination {
&-left {
.@{table-wrapepr-cls}.@{table-wrapepr-rtl-cls} & {
2020-09-13 22:16:12 +08:00
justify-content: flex-end;
2020-04-30 10:55:54 +08:00
}
}
&-right {
.@{table-wrapepr-cls}.@{table-wrapepr-rtl-cls} & {
2020-09-13 22:16:12 +08:00
justify-content: flex-start;
2020-04-30 10:55:54 +08:00
}
}
2020-03-23 13:51:37 +08:00
}
// ================================================================
// = Function =
// ================================================================
// ============================ Sorter ============================
&-column-sorter {
.@{table-wrapepr-rtl-cls} & {
margin-right: @padding-xs;
margin-left: 0;
}
}
// ============================ Filter ============================
&-filter-column-title {
.@{table-wrapepr-rtl-cls} & {
padding: @table-padding-vertical @table-padding-horizontal @table-padding-vertical 2.3em;
}
}
2020-07-01 21:38:23 +08:00
&-thead tr th.@{table-prefix-cls}-column-has-sorters {
.@{table-prefix-cls}-filter-column-title {
.@{table-prefix-cls}-rtl & {
padding: 0 0 0 2.3em;
}
}
}
2020-03-23 13:51:37 +08:00
&-filter-trigger-container {
.@{table-wrapepr-rtl-cls} & {
right: auto;
left: 0;
}
}
// Dropdown
&-filter-dropdown {
// Checkbox
&,
&-submenu {
.@{ant-prefix}-checkbox-wrapper + span {
2020-05-31 16:00:40 +08:00
.@{ant-prefix}-dropdown-rtl &,
.@{ant-prefix}-dropdown-menu-submenu-rtl& {
2020-03-23 13:51:37 +08:00
padding-right: 8px;
padding-left: 0;
}
}
}
}
// ========================== Selections ==========================
&-selection {
.@{table-wrapepr-rtl-cls} & {
text-align: center;
}
}
// ========================== Expandable ==========================
&-row-indent {
.@{table-wrapepr-rtl-cls} & {
float: right;
}
}
&-row-expand-icon {
.@{table-wrapepr-rtl-cls} & {
float: right;
}
.@{table-prefix-cls}-row-indent + & {
.@{table-wrapepr-rtl-cls} & {
margin-right: 0;
margin-left: @padding-xs;
}
}
2020-04-30 10:55:54 +08:00
&::after {
.@{table-wrapepr-rtl-cls} & {
transform: rotate(-90deg);
}
}
&-collapsed::before {
.@{table-wrapepr-rtl-cls} & {
transform: rotate(180deg);
}
}
&-collapsed::after {
.@{table-wrapepr-rtl-cls} & {
transform: rotate(0deg);
}
}
2020-03-23 13:51:37 +08:00
}
}