Skip to content

Commit adc6afb

Browse files
authored
chore: support less4 (#3449)
1 parent c90afee commit adc6afb

File tree

71 files changed

+510
-491
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+510
-491
lines changed

.stylelintrc.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"extends": [
3+
"stylelint-config-standard",
4+
"stylelint-config-rational-order",
5+
"stylelint-config-prettier"
6+
],
7+
"plugins": ["stylelint-order", "stylelint-declaration-block-no-ignored-properties"],
8+
"rules": {
9+
"comment-empty-line-before": null,
10+
"function-name-case": ["lower", { "ignoreFunctions": ["/colorPalette/"] }],
11+
"no-invalid-double-slash-comments": null,
12+
"no-descending-specificity": null,
13+
"declaration-empty-line-before": null
14+
},
15+
"ignoreFiles": ["components/style/color/{bezierEasing,colorPalette,tinyColor}.less"]
16+
}

antdv-demo

components/alert/style/index.less

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
@alert-close-hover-color: @icon-color-hover;
1010

1111
.@{alert-prefix-cls} {
12-
.reset-component;
12+
.reset-component();
1313

1414
position: relative;
1515
padding: 8px 15px 8px 37px;
@@ -26,7 +26,7 @@
2626

2727
&-icon {
2828
position: absolute;
29-
top: 8px + @font-size-base * @line-height-base / 2 - @font-size-base / 2;
29+
top: 8px + (@font-size-base * @line-height-base / 2) - (@font-size-base / 2);
3030
left: 16px;
3131
}
3232

components/anchor/style/index.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
@anchor-border-width: 2px;
55

66
.@{ant-prefix}-anchor {
7-
.reset-component;
7+
.reset-component();
88

99
position: relative;
1010
padding-left: @anchor-border-width;

components/auto-complete/style/index.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
@autocomplete-prefix-cls: ~'@{select-prefix-cls}-auto-complete';
88

99
.@{autocomplete-prefix-cls} {
10-
.reset-component;
10+
.reset-component();
1111

1212
// https://github.com/ant-design/ant-design/issues/22302
1313
.@{select-prefix-cls}-clear {

components/avatar/style/index.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
@avatar-prefix-cls: ~'@{ant-prefix}-avatar';
55

66
.@{avatar-prefix-cls} {
7-
.reset-component;
7+
.reset-component();
88

99
position: relative;
1010
display: inline-block;

components/back-top/style/index.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
@backtop-prefix-cls: ~'@{ant-prefix}-back-top';
55

66
.@{backtop-prefix-cls} {
7-
.reset-component;
7+
.reset-component();
88

99
position: fixed;
1010
right: 100px;

components/badge/style/index.less

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
@number-prefix-cls: ~'@{ant-prefix}-scroll-number';
66

77
.@{badge-prefix-cls} {
8-
.reset-component;
8+
.reset-component();
99

1010
position: relative;
1111
display: inline-block;
@@ -23,7 +23,7 @@
2323
white-space: nowrap;
2424
text-align: center;
2525
background: @highlight-color;
26-
border-radius: @badge-height / 2;
26+
border-radius: (@badge-height / 2);
2727
box-shadow: 0 0 0 1px @shadow-color-inverse;
2828
a,
2929
a:hover {

components/breadcrumb/style/index.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
@breadcrumb-prefix-cls: ~'@{ant-prefix}-breadcrumb';
55

66
.@{breadcrumb-prefix-cls} {
7-
.reset-component;
7+
.reset-component();
88

99
color: @breadcrumb-base-color;
1010
font-size: @breadcrumb-font-size;

components/button/style/index.less

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
// It is a render problem of chrome, which is only happened in the codesandbox demo
2222
// 0.001px solution works and I don't why
2323
line-height: @line-height-base;
24-
.btn;
25-
.btn-default;
24+
.btn();
25+
.btn-default();
2626

2727
// Make sure that the target of Button's click event always be `button`
2828
// Ref: https://github.com/ant-design/ant-design/issues/7034
@@ -34,7 +34,7 @@
3434
}
3535

3636
&-primary {
37-
.btn-primary;
37+
.btn-primary();
3838

3939
.@{btn-prefix-cls}-group &:not(:first-child):not(:last-child) {
4040
border-right-color: @btn-group-border;
@@ -64,19 +64,19 @@
6464
}
6565

6666
&-ghost {
67-
.btn-ghost;
67+
.btn-ghost();
6868
}
6969

7070
&-dashed {
71-
.btn-dashed;
71+
.btn-dashed();
7272
}
7373

7474
&-danger {
75-
.btn-danger;
75+
.btn-danger();
7676
}
7777

7878
&-link {
79-
.btn-link;
79+
.btn-link();
8080
}
8181

8282
&-icon-only {

0 commit comments

Comments
 (0)