@@ -10,8 +10,6 @@ OF ANY KIND, either express or implied. See the License for the specific languag
1010governing permissions and limitations under the License.
1111*/
1212
13- @import "@spectrum-css/commons/basebutton.css" ;
14-
1513.spectrum-ActionButton {
1614 --spectrum-actionbutton-animation-duration : var (--spectrum-animation-duration-100 );
1715 --spectrum-actionbutton-border-radius : var (--spectrum-corner-radius-medium-size-medium );
@@ -234,9 +232,46 @@ governing permissions and limitations under the License.
234232}
235233
236234.spectrum-ActionButton {
237- @extend %spectrum- BaseButto n;
235+ cursor : pointer;
236+ user-select : none;
237+
238+ /* Contain halo */
238239 position : relative;
239240
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+
240275 min-inline-size : var (--mod-actionbutton-min-width , var (--spectrum-actionbutton-min-width ));
241276 block-size : var (--mod-actionbutton-height , var (--spectrum-actionbutton-height ));
242277 line-height : var (--mod-actionbutton-line-height , var (--spectrum-actionbutton-line-height ));
@@ -252,6 +287,26 @@ governing permissions and limitations under the License.
252287 background-color : var (--highcontrast-actionbutton-background-color-default , var (--mod-actionbutton-background-color-default , var (--spectrum-actionbutton-background-color-default )));
253288 color : var (--highcontrast-actionbutton-content-color-default , var (--mod-actionbutton-content-color-default , var (--spectrum-actionbutton-content-color-default )));
254289
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+
255310 & : hover {
256311 background-color : var (--highcontrast-actionbutton-background-color-default , var (--mod-actionbutton-background-color-hover , var (--spectrum-actionbutton-background-color-hover )));
257312 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.
276331}
277332
278333a .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;
280339}
281340
282341.spectrum-ActionButton-icon {
283- @extend %spectrum- Butto nIcon;
342+ flex-shrink : 0 ;
343+ max-block-size : 100% ;
284344
285345 inline-size : var (--mod-actionbutton-icon-size , var (--spectrum-actionbutton-icon-size ));
286346 block-size : var (--mod-actionbutton-icon-size , var (--spectrum-actionbutton-icon-size ));
@@ -298,7 +358,16 @@ a.spectrum-ActionButton {
298358}
299359
300360.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+
302371 pointer-events : none;
303372
304373 font-size : var (--mod-actionbutton-font-size , var (--spectrum-actionbutton-font-size ));
0 commit comments