Bug 1379099 - Replace the Style Editor spinner with a top down animation r=miker draft
authorTim Nguyen <ntim.bugs@gmail.com>
Sat, 26 Aug 2017 14:56:57 +0200
changeset 653610 00ba98020640c3a1046028a8449154b6d348d845
parent 652158 2c7925461d5d103cb85c77307f0a6e0425b9a29e
child 728375 08d37b070c8fb89194907e573e110c4bd207d420
push id76367
push userbmo:ntim.bugs@gmail.com
push dateSat, 26 Aug 2017 12:57:54 +0000
reviewersmiker
bugs1379099
milestone57.0a1
Bug 1379099 - Replace the Style Editor spinner with a top down animation r=miker MozReview-Commit-ID: 93LBp3t9bKb
devtools/client/styleeditor/styleeditor.xul
devtools/client/themes/splitview.css
devtools/client/themes/variables.css
--- a/devtools/client/styleeditor/styleeditor.xul
+++ b/devtools/client/styleeditor/styleeditor.xul
@@ -105,17 +105,16 @@
             <xul:toolbarbutton id="style-editor-options"
                         class="devtools-toolbarbutton devtools-option-toolbarbutton"
                         tooltiptext="&optionsButton.tooltip;"
                         popup="style-editor-options-popup"/>
           </xul:toolbar>
         </xul:box>
         <xul:box id="splitview-resizer-target" class="theme-sidebar splitview-nav-container"
                 persist="height">
-          <div class="devtools-throbber"></div>
           <ol class="splitview-nav" tabindex="0"></ol>
           <div class="splitview-nav placeholder empty">
             <p><strong>&noStyleSheet.label;</strong></p>
             <p>&noStyleSheet-tip-start.label;
               <a href="#"
                 class="style-editor-newButton">&noStyleSheet-tip-action.label;</a>
               &noStyleSheet-tip-end.label;</p>
           </div>
--- a/devtools/client/themes/splitview.css
+++ b/devtools/client/themes/splitview.css
@@ -7,38 +7,41 @@
   --sidemenu-selected-arrow: url(images/item-arrow-dark-ltr.svg);
   --sidemenu-selected-arrow-rtl: url(images/item-arrow-dark-rtl.svg);
 }
 .theme-light {
   --sidemenu-selected-arrow: url(images/item-arrow-ltr.svg);
   --sidemenu-selected-arrow-rtl: url(images/item-arrow-rtl.svg);
 }
 
-.splitview-nav-container .devtools-throbber {
-  display: none;
-  text-align: center;
-}
-
-.loading .splitview-nav-container .devtools-throbber {
-  display: block;
+/* Loading animation */
+@keyframes item-load {
+  0% {
+    transform: scaleY(0) translateY(-100%);
+  }
+  100% {
+    transform: none;
+  }
 }
 
 .splitview-nav {
   list-style: none;
   padding: 0;
   margin: 0;
   background-color: var(--theme-sidebar-background);
 }
 
 .splitview-nav > li {
+  animation: item-load .5s var(--animation-curve);
   padding-inline-end: 8px;
   -moz-box-align: center;
   outline: 0;
   vertical-align: bottom;
   border-bottom: 1px solid rgba(128,128,128,0.15);
+  background: inherit;
 }
 
 .placeholder {
   -moz-box-flex: 1;
   text-align: center;
 }
 
 .splitview-nav > li.splitview-active {
--- a/devtools/client/themes/variables.css
+++ b/devtools/client/themes/variables.css
@@ -238,16 +238,19 @@
   --toolbarbutton-background: rgba(110,120,130,0.1);
   --toolbarbutton-border-color: transparent;
   --toolbarbutton-hover-background: rgba(110,120,130,0.2);
   --toolbarbutton-hover-border-color: var(--toolbarbutton-border-color);
   --toolbarbutton-checked-background: var(--theme-selection-background);
   --toolbarbutton-checked-color: var(--theme-selection-color);
   --toolbarbutton-checked-border-color: var(--toolbarbutton-border-color);
 
+  /* The photon animation curve */
+  --animation-curve: cubic-bezier(.07,.95,0,1);
+
   /* Firefox Colors CSS Variables v1.0.3
    * Colors are taken from: https://github.com/FirefoxUX/design-tokens */
   --magenta-65: #dd00a9;
 
   --blue-50: #0a84ff;
   --blue-55: #0074e8;
   --blue-60: #0060df;
   --blue-70: #003eaa;