Skip to content

Commit

Permalink
Feat: disable transitions if prefers-reduced-motion is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
orestbida committed Apr 20, 2023
1 parent 359478b commit 8a34f86
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/scss/core/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
line-height: 1.15;
-webkit-text-size-adjust: 100%;
z-index: var(--cc-z-index);
position: fixed;

&.cc--rtl{
direction: rtl;
Expand Down Expand Up @@ -106,4 +107,11 @@ html.disable--interaction{
height: auto!important;
overflow: hidden!important;
}
}

// disable transition if prefers-reduced-motion detected
@media (prefers-reduced-motion) {
#cc-main {
--cc-modal-transition-duration: 0s;
}
}

0 comments on commit 8a34f86

Please sign in to comment.