Bug 1584273 - Disable the megabar animation when prefers-reduced-motion is true. r=dao
authorHarry Twyford <htwyford@mozilla.com>
Fri, 27 Sep 2019 10:58:46 +0000
changeset 495343 ff6180341e4d36db0c4d818c8cebad40da40820e
parent 495342 baef9e166b235c2812257af964234c6c8f9cad1a
child 495344 62fa0e6c45bc5bb032d18ceb70b4629a89f79c5c
push id96560
push userdgottwald@mozilla.com
push dateFri, 27 Sep 2019 11:01:11 +0000
treeherderautoland@ff6180341e4d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdao
bugs1584273
milestone71.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1584273 - Disable the megabar animation when prefers-reduced-motion is true. r=dao Differential Revision: https://phabricator.services.mozilla.com/D47348
browser/themes/shared/urlbar-searchbar.inc.css
--- a/browser/themes/shared/urlbar-searchbar.inc.css
+++ b/browser/themes/shared/urlbar-searchbar.inc.css
@@ -111,16 +111,23 @@
 }
 
 #urlbar[breakout][breakout-extend-animate],
 #urlbar[breakout][breakout-extend-animate] > #urlbar-input-container {
   transition-duration: 250ms;
   transition-timing-function: var(--animation-easing-function);
 }
 
+@media (prefers-reduced-motion: reduce) {
+  #urlbar[breakout][breakout-extend-animate],
+  #urlbar[breakout][breakout-extend-animate] > #urlbar-input-container {
+    transition-duration: 0s;
+  }
+}
+
 #urlbar[breakout][breakout-extend] {
   /* The z-index needs to be big enough to trump other positioned UI pieces
      that we want to overlay. 3 is used in the tab bar. */
   z-index: 3;
   top: -@urlbarBreakoutVerticalExtend@;
   left: -@urlbarBreakoutHorizontalExtend@;
   width: calc(100% + 2 * @urlbarBreakoutHorizontalExtend@);
   height: auto;