Skip to content

Commit

Permalink
Button: Standardize reduced motion handling using media queries
Browse files Browse the repository at this point in the history
  • Loading branch information
SainathPoojary committed Dec 31, 2024
1 parent e5dca54 commit a45c67a
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions packages/components/src/button/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@
cursor: pointer;
-webkit-appearance: none;
background: none;
transition: box-shadow 0.1s linear;
@include reduce-motion("transition");

@media not (prefers-reduced-motion) {
transition: box-shadow 0.1s linear;
}

height: $button-size;
align-items: center;
box-sizing: border-box;
Expand Down Expand Up @@ -245,10 +248,13 @@
text-align: left;
color: $components-color-accent;
text-decoration: underline;
transition-property: border, background, color;
transition-duration: 0.05s;
transition-timing-function: ease-in-out;
@include reduce-motion("transition");

@media not (prefers-reduced-motion) {
transition-property: border, background, color;
transition-duration: 0.05s;
transition-timing-function: ease-in-out;
}

height: auto;

&:focus {
Expand Down

0 comments on commit a45c67a

Please sign in to comment.