Skip to content

Commit a5f4719

Browse files
committed
refactor(module:*): consolidate rtl styles
1 parent cb05330 commit a5f4719

9 files changed

Lines changed: 12 additions & 25 deletions

File tree

components/button/style/index.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
}
123123

124124
.@{iconfont-css-prefix} {
125-
transition: margin-left 0.3s @ease-in-out;
125+
transition: margin 0.3s @ease-in-out;
126126

127127
// Follow icon blur under windows. Change the render.
128128
// https://github.com/ant-design/ant-design/issues/13924

components/button/style/mixin.less

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,8 +470,7 @@
470470
// circle button: the content only contains icon
471471
.btn-circle(@btnClassName: btn) {
472472
min-width: @btn-height-base;
473-
padding-right: 0;
474-
padding-left: 0;
473+
padding-inline: 0;
475474
text-align: center;
476475
border-radius: 50%;
477476
&.@{btnClassName}-lg {

components/checkbox/style/mixin.less

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,7 @@
179179
}
180180

181181
.@{checkbox-prefix-cls} + span {
182-
padding-right: 8px;
183-
padding-left: 8px;
182+
padding-inline: 8px;
184183
}
185184

186185
.@{checkbox-prefix-cls}-group {

components/date-picker/style/Calendar.less

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,7 @@
308308

309309
&-disabled-cell&-today &-date {
310310
position: relative;
311-
padding-right: 5px;
312-
padding-left: 5px;
311+
padding-inline: 5px;
313312

314313
&::before {
315314
position: absolute;

components/date-picker/style/RangePicker.less

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,7 @@
114114
.@{calendar-timepicker-prefix-cls}-input {
115115
.input;
116116
height: @input-height-sm;
117-
padding-right: 0;
118-
padding-left: 0;
117+
padding-inline: 0;
119118
line-height: @input-height-sm;
120119
border: 0;
121120
box-shadow: none;

components/date-picker/style/TimePicker.less

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@
6262
}
6363

6464
&:first-child {
65-
margin-left: 0;
66-
border-left: 0;
65+
margin-inline: 0;
6766
}
6867

6968
&:last-child {

components/dropdown/style/index.less

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,7 @@
288288
}
289289

290290
&:last-child:not(:first-child):not(.@{ant-prefix}-btn-icon-only) {
291-
padding-right: @padding-xs;
292-
padding-left: @padding-xs;
291+
padding-inline: @padding-xs;
293292
}
294293
}
295294
}

components/form/style/index.less

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -338,10 +338,3 @@
338338
opacity: 1;
339339
}
340340
}
341-
342-
// vertical
343-
.make-vertical-layout-label() {
344-
&:dir(rtl) {
345-
text-align: right;
346-
}
347-
}

components/tooltip/demo/placement.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,24 @@ import { NzTooltipModule } from 'ng-zorro-antd/tooltip';
77
selector: 'nz-demo-tooltip-placement',
88
imports: [NzButtonModule, NzTooltipModule],
99
template: `
10-
<div style="margin-left:60px;">
10+
<div style="margin-inline-start:60px;">
1111
<button nzTooltipTitle="prompt text" [nzTooltipPlacement]="['topLeft', 'leftTop']" nz-button nz-tooltip>
1212
TL
1313
</button>
1414
<button nzTooltipTitle="prompt text" nzTooltipPlacement="top" nz-button nz-tooltip>Top</button>
1515
<button nzTooltipTitle="prompt text" nzTooltipPlacement="topRight" nz-button nz-tooltip>TR</button>
1616
</div>
17-
<div style="float:left;width: 60px;">
17+
<div style="float:left; width: 60px;">
1818
<button nzTooltipTitle="prompt text" nzTooltipPlacement="leftTop" nz-button nz-tooltip>LT</button>
1919
<button nzTooltipTitle="prompt text" nzTooltipPlacement="left" nz-button nz-tooltip>Left</button>
2020
<button nzTooltipTitle="prompt text" nzTooltipPlacement="leftBottom" nz-button nz-tooltip>LB</button>
2121
</div>
22-
<div style="margin-left:270px;width: 60px;">
22+
<div style="margin-inline-start:270px; width: 60px;">
2323
<button nzTooltipTitle="prompt text" nzTooltipPlacement="rightTop" nz-button nz-tooltip>RT</button>
2424
<button nzTooltipTitle="prompt text" nzTooltipPlacement="right" nz-button nz-tooltip>Right</button>
2525
<button nzTooltipTitle="prompt text" nzTooltipPlacement="rightBottom" nz-button nz-tooltip>RB</button>
2626
</div>
27-
<div style="margin-left:60px;clear: both;">
27+
<div style="margin-inline-start:60px; clear: both;">
2828
<button nzTooltipTitle="prompt text" nzTooltipPlacement="bottomLeft" nz-button nz-tooltip>BL</button>
2929
<button nzTooltipTitle="prompt text" nzTooltipPlacement="bottom" nz-button nz-tooltip>Bottom</button>
3030
<button nzTooltipTitle="prompt text" nzTooltipPlacement="bottomRight" nz-button nz-tooltip>BR</button>
@@ -35,7 +35,7 @@ import { NzTooltipModule } from 'ng-zorro-antd/tooltip';
3535
width: 70px;
3636
text-align: center;
3737
padding: 0;
38-
margin-right: 8px;
38+
margin-inline-end: 8px;
3939
margin-bottom: 8px;
4040
}
4141
`

0 commit comments

Comments
 (0)