Skip to content

Commit

Permalink
FormTokenField: 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 386c259 commit 2c421b0
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions packages/components/src/form-token-field/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,10 @@
height: auto;
background: $gray-300;
min-width: unset;
transition: all 0.2s cubic-bezier(0.4, 1, 0.4, 1);
@include reduce-motion;

@media not (prefers-reduced-motion) {
transition: all 0.2s cubic-bezier(0.4, 1, 0.4, 1);
}
}

.components-form-token-field__token-text {
Expand Down Expand Up @@ -154,8 +156,11 @@
min-width: 100%;
max-height: $grid-unit-80 * 2;
overflow-y: auto;
transition: all 0.15s ease-in-out;
@include reduce-motion("transition");

@media not (prefers-reduced-motion) {
transition: all 0.15s ease-in-out;
}

list-style: none;
box-shadow: inset 0 $border-width 0 0 $gray-600; // Matches the border color of the input.
margin: 0;
Expand Down

0 comments on commit 2c421b0

Please sign in to comment.