Bug 1386800 - Reverse the download progress bar & fix start animation in RTL locales. r=paolo draft
authorSam Foster <sfoster@mozilla.com>
Wed, 02 Aug 2017 19:14:44 -0700
changeset 641039 ef29c172a976c18b53a18c57ed10fa1b4c404cc0
parent 620494 fa1da3c0b200abbd9cfab3cab19962824314044e
child 724700 cf71751ade377365e7adf15a7dfc449b51446409
push id72411
push userbmo:sfoster@mozilla.com
push dateSat, 05 Aug 2017 00:45:19 +0000
reviewerspaolo
bugs1386800
milestone57.0a1
Bug 1386800 - Reverse the download progress bar & fix start animation in RTL locales. r=paolo MozReview-Commit-ID: 87vdP4lAsBn
browser/themes/shared/downloads/indicator.inc.css
--- a/browser/themes/shared/downloads/indicator.inc.css
+++ b/browser/themes/shared/downloads/indicator.inc.css
@@ -78,16 +78,24 @@
 }
 
 %ifndef MOZ_PHOTON_ANIMATIONS
 toolbar[brighttext] #downloads-indicator-progress-inner {
   animation-name: indicatorArrowProgressDark;
 }
 %endif
 
+%ifdef MOZ_PHOTON_ANIMATIONS
+#downloads-indicator-progress-inner:-moz-locale-dir(rtl) {
+  animation-name: indicatorArrowProgressRTL;
+  margin-left: 16px;
+  margin-right: 0;
+}
+%endif
+
 @keyframes indicatorArrowProgress {
   0% {
 %ifdef MOZ_PHOTON_ANIMATIONS
     margin-right: 14px;
 %else
     margin-top: 12px;
     filter: brightness(1.2);
 %endif
@@ -97,17 +105,26 @@ toolbar[brighttext] #downloads-indicator
     margin-right: 2px;
 %else
     margin-top: 2px;
     filter: brightness(1);
 %endif
   }
 }
 
-%ifndef MOZ_PHOTON_ANIMATIONS
+%ifdef MOZ_PHOTON_ANIMATIONS
+@keyframes indicatorArrowProgressRTL {
+  0% {
+    margin-left: 14px;
+  }
+  100% {
+    margin-left: 2px;
+  }
+}
+%else
 @keyframes indicatorArrowProgressDark {
   0% {
     margin-top: 12px;
     filter: brightness(0.7);
   }
   100% {
     margin-top: 2px;
     filter: brightness(1);
@@ -241,16 +258,18 @@ toolbar[brighttext] #downloads-indicator
 #downloads-notification-anchor {
   width: 42px;
   /* Height is equal to height of each frame in the SVG animation
      Use of min/max-height instead of height is to avoid an
      assertion for `inline-size less than zero..` (bug 1379332). */
   min-height: 98px;
   max-height: 98px;
   overflow: hidden;
+  /* animation is not directional and shouldn't be reversed in RTL */
+  direction: ltr;
 }
 %endif
 
 #downloads-indicator-notification {
   opacity: 0;
 %ifdef MOZ_PHOTON_ANIMATIONS
   min-width: 1344px;
   height: 98px; /* Height is equal to height of each frame in the SVG animation */