File tree Expand file tree Collapse file tree 2 files changed +37
-6
lines changed Expand file tree Collapse file tree 2 files changed +37
-6
lines changed Original file line number Diff line number Diff line change 9
9
@btn-ghost-bg : transparent ;
10
10
@btn-ghost-border : @border-color-base ;
11
11
12
+ .btn-link () {
13
+ .button-variant-other (@primary-color , transparent , transparent );
14
+ box-shadow : none ;
15
+ & :hover ,
16
+ & :focus ,
17
+ & :active {
18
+ border-color : transparent ;
19
+ }
20
+ .button-disabled (@disabled-color ; transparent ; transparent );
21
+ }
22
+
12
23
// Button styles
13
24
// -----------------------------
14
25
.@{btn-prefix-cls} {
69
80
.btn-danger ;
70
81
}
71
82
83
+ &-link {
84
+ .btn-link ;
85
+ }
86
+
72
87
&-round {
73
88
.btn-round (@btn-prefix-cls );
74
89
}
162
177
.button-variant-ghost (@btn-danger-color );
163
178
}
164
179
180
+ &-background-ghost&-link {
181
+ .button-variant-ghost (@primary-color ; transparent );
182
+ color : @component-background ;
183
+ }
184
+
165
185
&-two-chinese-chars ::first-letter {
166
186
letter-spacing : 0.34em ;
167
187
}
Original file line number Diff line number Diff line change 7
7
border-radius : @border-radius ;
8
8
}
9
9
10
- .button-disabled () {
10
+ .button-disabled (@color : @btn-disable-color ; @background : @btn-disable-bg ; @border : @btn-disable-border ) {
11
11
&-disabled ,
12
12
& .disabled ,
13
13
& [disabled ] {
16
16
& :focus ,
17
17
& :active ,
18
18
& .active {
19
- .button-color (@btn-disable-color ; @btn-disable-bg ; @btn-disable-border );
19
+ .button-color (@color ; @background ; @border );
20
+
20
21
text-shadow : none ;
21
22
box-shadow : none ;
22
23
}
84
85
}
85
86
.button-disabled ();
86
87
}
87
- .button-variant-ghost (@color ) {
88
- .button-color (@color ; transparent ; @color );
88
+ .button-variant-ghost (@color ; @border : @color ) {
89
+ .button-color (@color ; transparent ; @border );
89
90
text-shadow : none ;
90
91
& :hover ,
91
92
& :focus {
92
- .button-color (~ `colorPalette(' @{color} ' , 5 ) `; transparent ; ~ `colorPalette(' @{color} ' , 5 ) `);
93
+ & when (@border = transparent ) {
94
+ .button-color (~ `colorPalette(' @{color} ' , 5 ) `; transparent ; transparent );
95
+ }
96
+ & when not (@border = transparent ) {
97
+ .button-color (~ `colorPalette(' @{color} ' , 5 ) `; transparent ; ~ `colorPalette(' @{color} ' , 5 ) `);
98
+ }
93
99
}
94
100
& :active ,
95
101
& .active {
96
- .button-color (~ `colorPalette(' @{color} ' , 7 ) `; transparent ; ~ `colorPalette(' @{color} ' , 7 ) `);
102
+ & when (@border = transparent ) {
103
+ .button-color (~ `colorPalette(' @{color} ' , 7 ) `; transparent ; transparent );
104
+ }
105
+ & when not (@border = transparent ) {
106
+ .button-color (~ `colorPalette(' @{color} ' , 7 ) `; transparent ; ~ `colorPalette(' @{color} ' , 7 ) `);
107
+ }
97
108
}
98
109
.button-disabled ();
99
110
}
You can’t perform that action at this time.
0 commit comments