Skip to content

Commit

Permalink
RangeControl: animate thumb and track only when using marks (WordPres…
Browse files Browse the repository at this point in the history
…s#67836)

Co-authored-by: ciampo <[email protected]>
Co-authored-by: jameskoster <[email protected]>
Co-authored-by: youknowriad <[email protected]>
Co-authored-by: mirka <[email protected]>
Co-authored-by: tyxla <[email protected]>
  • Loading branch information
6 people authored and yogeshbhutkar committed Dec 18, 2024
1 parent 809c7c9 commit 8813ef5
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,10 @@ export const Track = styled.span`
margin-top: ${ ( rangeHeightValue - railHeight ) / 2 }px;
top: 0;
@media not ( prefers-reduced-motion ) {
transition: width ease 0.1s;
.is-marked & {
@media not ( prefers-reduced-motion ) {
transition: width ease 0.1s;
}
}
${ trackBackgroundColor };
Expand Down Expand Up @@ -203,8 +205,10 @@ export const ThumbWrapper = styled.span`
border-radius: ${ CONFIG.radiusRound };
z-index: 3;
@media not ( prefers-reduced-motion ) {
transition: left ease 0.1s;
.is-marked & {
@media not ( prefers-reduced-motion ) {
transition: left ease 0.1s;
}
}
${ thumbColor };
Expand Down

0 comments on commit 8813ef5

Please sign in to comment.