Skip to content

Commit 519b5bf

Browse files
rex-zsdchenjiahan
authored andcommitted
[improvement] Stepper: update style (youzan#2790)
1 parent 9d0255d commit 519b5bf

File tree

2 files changed

+22
-13
lines changed

2 files changed

+22
-13
lines changed

packages/stepper/index.less

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55

66
&__minus,
77
&__plus {
8-
width: 40px;
9-
height: 30px;
8+
width: 28px;
9+
height: 28px;
1010
box-sizing: border-box;
11-
background-color: @white;
12-
border: 1px solid @border-color;
11+
background-color: @stepper-background-color;
12+
border: 0;
13+
margin: 1px;
1314
position: relative;
1415
padding: 5px;
1516
vertical-align: middle;
@@ -33,15 +34,15 @@
3334
left: 0;
3435
right: 0;
3536
bottom: 0;
36-
background-color: @gray-darker;
37+
background-color: @text-color;
3738
}
3839

3940
&:active {
4041
background-color: @active-color;
4142
}
4243

4344
&--disabled {
44-
background-color: @background-color;
45+
background-color: @stepper-button-disabled-color;
4546

4647
&::before,
4748
&::after {
@@ -50,39 +51,41 @@
5051
}
5152

5253
&--disabled:active {
53-
background-color: @background-color;
54+
background-color: @stepper-button-disabled-color;
5455
}
5556
}
5657

5758
&__minus {
58-
border-radius: 2px 0 0 2px;
59+
border-radius: @stepper-border-radius 0 0 @stepper-border-radius;
5960

6061
&::after {
6162
display: none;
6263
}
6364
}
6465

6566
&__plus {
66-
border-radius: 0 2px 2px 0;
67+
border-radius: 0 @stepper-border-radius @stepper-border-radius 0;
6768
}
6869

6970
&__input {
70-
width: 33px;
71+
width: 30px;
7172
height: 26px;
7273
padding: 1px;
73-
border: 1px solid @border-color;
74+
border: 0;
75+
margin: 1px;
76+
background-color: @stepper-background-color;
7477
border-width: 1px 0;
7578
border-radius: 0;
7679
box-sizing: content-box;
77-
color: @gray-darker;
80+
color: @text-color;
7881
font-size: 14px;
7982
vertical-align: middle;
8083
text-align: center;
8184
-webkit-appearance: none;
8285

8386
&[disabled] {
8487
color: @gray;
85-
background-color: @background-color;
88+
background-color: @stepper-input-disabled-color;
8689
}
8790
}
8891

packages/style/var.less

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,3 +148,9 @@
148148

149149
// Search
150150
@search-background-color: #f7f8fA;
151+
152+
// Stepper
153+
@stepper-background-color: #f2f3f5;
154+
@stepper-button-disabled-color: #f7f8fa;
155+
@stepper-border-radius: 4px;
156+
@stepper-input-disabled-color: #f2f3f5;

0 commit comments

Comments
 (0)