Skip to content

Commit 97c1ec6

Browse files
committed
Disable transitions for users who don’t want them
1 parent 534c299 commit 97c1ec6

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

css/_components.site-nav.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,21 @@ $_logo-height: 64px;
138138
contain: layout;
139139
content-visibility: hidden;
140140

141+
/**
142+
* Disable transitions when the battery is low or critical, or if the user
143+
* preferences reduced motion.
144+
*/
141145
.has-battery-low &,
142146
.has-battery-critical & {
143147
transition: none;
144148
will-change: auto;
145149
}
146150

151+
@media (prefers-reduced-motion: reduce) {
152+
transition: none;
153+
will-change: auto;
154+
}
155+
147156
@supports (backdrop-filter: blur(5px)) {
148157
background-color: rgba($color-gray, 0.8);
149158
backdrop-filter: blur(5px);

0 commit comments

Comments
 (0)