@@ -10,8 +10,6 @@ OF ANY KIND, either express or implied. See the License for the specific languag
10
10
governing permissions and limitations under the License.
11
11
*/
12
12
13
- @import "@spectrum-css/commons/basebutton.css" ;
14
-
15
13
.spectrum-ActionButton {
16
14
--spectrum-actionbutton-animation-duration : var (--spectrum-animation-duration-100 );
17
15
--spectrum-actionbutton-border-radius : var (--spectrum-corner-radius-medium-size-medium );
@@ -234,9 +232,46 @@ governing permissions and limitations under the License.
234
232
}
235
233
236
234
.spectrum-ActionButton {
237
- @extend %spectrum- BaseButto n;
235
+ cursor : pointer;
236
+ user-select : none;
237
+
238
+ /* Contain halo */
238
239
position : relative;
239
240
241
+ /* Show the button overflow in Edge. */
242
+ overflow : visible;
243
+ display : inline-flex;
244
+ align-items : center;
245
+ justify-content : center;
246
+
247
+ box-sizing : border-box;
248
+
249
+ /* Remove button the margin in Firefox and Safari. */
250
+ margin : 0 ;
251
+
252
+ font-family : var (--mod-button-font-family , var (--spectrum-sans-font-family-stack ));
253
+
254
+ /* Adjacent buttons should be aligned correctly */
255
+ vertical-align : top;
256
+
257
+ -webkit-font-smoothing : antialiased;
258
+
259
+ /* Font smoothing for Firefox */
260
+ -moz-osx-font-smoothing : grayscale;
261
+ text-decoration : none;
262
+
263
+ /* Remove the inheritance of text transform on button in Edge, Firefox, and IE. */
264
+ text-transform : none;
265
+
266
+ /* stylelint-disable-next-line property-no-vendor-prefix -- Correct the inability to style clickable types in iOS and Safari (normalize). */
267
+ -webkit-appearance : button;
268
+
269
+ transition :
270
+ background var (--mod-button-animation-duration , var (--spectrum-animation-duration-100 )) ease-out,
271
+ border-color var (--mod-button-animation-duration , var (--spectrum-animation-duration-100 )) ease-out,
272
+ color var (--mod-button-animation-duration , var (--spectrum-animation-duration-100 )) ease-out,
273
+ box-shadow var (--mod-button-animation-duration , var (--spectrum-animation-duration-100 )) ease-out;
274
+
240
275
min-inline-size : var (--mod-actionbutton-min-width , var (--spectrum-actionbutton-min-width ));
241
276
block-size : var (--mod-actionbutton-height , var (--spectrum-actionbutton-height ));
242
277
line-height : var (--mod-actionbutton-line-height , var (--spectrum-actionbutton-line-height ));
@@ -252,6 +287,26 @@ governing permissions and limitations under the License.
252
287
background-color : var (--highcontrast-actionbutton-background-color-default , var (--mod-actionbutton-background-color-default , var (--spectrum-actionbutton-background-color-default )));
253
288
color : var (--highcontrast-actionbutton-content-color-default , var (--mod-actionbutton-content-color-default , var (--spectrum-actionbutton-content-color-default )));
254
289
290
+ /* Fix Firefox */
291
+ & ::-moz-focus-inner {
292
+ margin-block-start : -2px ;
293
+ margin-block-end : -2px ;
294
+ padding : 0 ;
295
+ border : 0 ;
296
+
297
+ /* Remove the inner border and padding for button in Firefox. */
298
+ border-style : none;
299
+ }
300
+
301
+ & : focus {
302
+ outline : none;
303
+ }
304
+
305
+ & : disabled ,
306
+ & .is-disabled {
307
+ cursor : default;
308
+ }
309
+
255
310
& : hover {
256
311
background-color : var (--highcontrast-actionbutton-background-color-default , var (--mod-actionbutton-background-color-hover , var (--spectrum-actionbutton-background-color-hover )));
257
312
color : var (--highcontrast-actionbutton-content-color-default , var (--mod-actionbutton-content-color-hover , var (--spectrum-actionbutton-content-color-hover )));
@@ -276,11 +331,16 @@ governing permissions and limitations under the License.
276
331
}
277
332
278
333
a .spectrum-ActionButton {
279
- @extend %spectrum- AnchorButto n;
334
+ /* Make link text not selectable */
335
+ user-select : none;
336
+
337
+ /* stylelint-disable-next-line property-no-vendor-prefix -- Remove appearance for clickable types in iOS and Safari. */
338
+ -webkit-appearance : none;
280
339
}
281
340
282
341
.spectrum-ActionButton-icon {
283
- @extend %spectrum- Butto nIcon;
342
+ flex-shrink : 0 ;
343
+ max-block-size : 100% ;
284
344
285
345
inline-size : var (--mod-actionbutton-icon-size , var (--spectrum-actionbutton-icon-size ));
286
346
block-size : var (--mod-actionbutton-icon-size , var (--spectrum-actionbutton-icon-size ));
@@ -298,7 +358,16 @@ a.spectrum-ActionButton {
298
358
}
299
359
300
360
.spectrum-ActionButton-label {
301
- @extend %spectrum- Butto nLabel;
361
+ align-self : center;
362
+ justify-self : center;
363
+
364
+ /* Fixes horizontal alignment of text in anchor buttons */
365
+ text-align : center;
366
+
367
+ & : empty {
368
+ display : none;
369
+ }
370
+
302
371
pointer-events : none;
303
372
304
373
font-size : var (--mod-actionbutton-font-size , var (--spectrum-actionbutton-font-size ));
0 commit comments