@@ -41,6 +41,8 @@ governing permissions and limitations under the License.
41
41
margin: 0;
42
42
43
43
bor der- style: solid;
44
+ bor der- radius: var(- - spectrum- butto n- bor der- radius);
45
+ bor der- width: var(- - spectrum- butto n- bor der- width);
44
46
45
47
/* Remove the inheritance of text transform on button in Edge, Firefox, and IE. */
46
48
text- transfor m: none;
@@ -113,8 +115,8 @@ governing permissions and limitations under the License.
113
115
}
114
116
115
117
%spectrum- Butto nWithFocusRing {
116
- & : after {
117
- border-radius : calc (var (--spectrum-button-primary -border-radius ) + var (--spectrum-alias-focus-ring-gap ));
118
+ & : after {
119
+ border-radius : calc (var (--spectrum-button-border-radius ) + var (--spectrum-alias-focus-ring-gap ));
118
120
content : '' ;
119
121
display : block;
120
122
position : absolute;
@@ -131,7 +133,7 @@ governing permissions and limitations under the License.
131
133
132
134
& : focus-ring {
133
135
& : after {
134
- margin : calc (var (--spectrum-alias-focus-ring-gap ) * -2 );
136
+ margin : calc (var (--spectrum-alias-focus-ring-gap ) * -1 - var ( --spectrum-button-border-width ) );
135
137
}
136
138
}
137
139
}
@@ -140,9 +142,9 @@ governing permissions and limitations under the License.
140
142
@inherit : %spectrum- BaseButto n;
141
143
@inherit : %spectrum- Butto nWithFocusRing;
142
144
143
- border-width : var (--spectrum-button-primary-border-size );
144
145
border-style : solid;
145
- border-radius : var (--spectrum-button-primary-border-radius );
146
+ --spectrum-button-border-radius : var (--spectrum-button-primary-border-radius );
147
+ --spectrum-button-border-width : var (--spectrum-button-primary-border-size );
146
148
147
149
min-block-size : var (--spectrum-button-primary-height );
148
150
block-size : 0% ;
@@ -188,6 +190,7 @@ a.spectrum-ActionButton {
188
190
189
191
.spectrum-ActionButton {
190
192
@inherit : %spectrum- BaseButto n;
193
+ @inherit : %spectrum- Butto nWithFocusRing;
191
194
position : relative;
192
195
193
196
block-size : var (--spectrum-actionbutton-height );
@@ -196,8 +199,8 @@ a.spectrum-ActionButton {
196
199
/* Use icon padding by default as it's smaller */
197
200
padding : 0 ;
198
201
199
- border-width : var (--spectrum-actionbutton-border-size );
200
- border-radius : var (--spectrum-actionbutton-border-radius );
202
+ --spectrum-button- border-radius : var (--spectrum-actionbutton-border-radius );
203
+ --spectrum-button- border-width : var (--spectrum-actionbutton-border-size );
201
204
202
205
font-size : var (--spectrum-actionbutton-text-size );
203
206
font-weight : var (--spectrum-actionbutton-text-font-weight );
@@ -276,41 +279,19 @@ a.spectrum-ActionButton {
276
279
font-weight : var (--spectrum-actionbutton-quiet-text-font-weight );
277
280
}
278
281
279
- .spectrum-ActionButton--emphasized ,
280
- .spectrum-ActionButton--staticColor {
281
- @inherit : %spectrum- Butto nWithFocusRing;
282
-
283
- & : after {
284
- /* Override border-radius set in %spectrum-ButtonWithFocusRing since this is not a pill button */
285
- border-radius : calc (var (--spectrum-actionbutton-border-radius ) + var (--spectrum-alias-focus-ring-gap ));
286
- }
287
-
288
- & : focus-ring {
289
- & : after {
290
- /* action buttons only have a 1px border, not 2px */
291
- margin : calc (calc (var (--spectrum-alias-focus-ring-gap ) * -1 ) - var (--spectrum-actionbutton-quiet-border-size ));
292
- }
293
- }
294
- }
295
-
296
282
.spectrum-LogicButton {
297
283
@inherit : %spectrum- BaseButto n;
298
284
@inherit : %spectrum- Butto nWithFocusRing;
299
285
300
286
block-size : var (--spectrum-logicbutton-and-height );
301
287
padding : var (--spectrum-logicbutton-and-padding-x );
302
288
303
- border-width : var (--spectrum-logicbutton-and-border-size );
304
- border-radius : var (--spectrum-logicbutton-and-border-radius );
289
+ --spectrum-button- border-width: var (--spectrum-logicbutton-and-border-size );
290
+ --spectrum-button- border-radius: var (--spectrum-logicbutton-and-border-radius );
305
291
306
292
font-size : var (--spectrum-logicbutton-and-text-size );
307
293
font-weight : var (--spectrum-logicbutton-and-text-font-weight );
308
294
line-height : 0 ;
309
-
310
- & : after {
311
- /* Override border-radius set in %spectrum-ButtonWithFocusRing since this is not a pill button */
312
- border-radius : calc (var (--spectrum-logicbutton-and-border-radius ) + var (--spectrum-alias-focus-ring-gap ));
313
- }
314
295
}
315
296
316
297
.spectrum-FieldButton {
@@ -375,7 +356,8 @@ a.spectrum-ActionButton {
375
356
inline-size : var (--spectrum-clearbutton-medium-width );
376
357
block-size : var (--spectrum-clearbutton-medium-height );
377
358
378
- border-radius : 100% ;
359
+ --spectrum-button-border-radius : 100% ;
360
+ --spectrum-button-border-width : 0px ;
379
361
380
362
padding : 0 ;
381
363
margin : 0 ;
@@ -389,15 +371,6 @@ a.spectrum-ActionButton {
389
371
}
390
372
}
391
373
392
- .spectrum-ClearButton--overBackground {
393
- & : focus-ring {
394
- & : after {
395
- /* Adjust margin because ClearButton does not have a border */
396
- margin : calc (var (--spectrum-alias-focus-ring-gap ) * -1 );
397
- }
398
- }
399
- }
400
-
401
374
@media screen and (-ms-high-contrast : active), (-ms-high-contrast : none) {
402
375
.spectrum-ClearButton {
403
376
> .spectrum-Icon {
0 commit comments