Explorar o código

organize subnavbar transition

Yuki Takei %!s(int64=6) %!d(string=hai) anos
pai
achega
0d5bcc6566
Modificáronse 1 ficheiros con 17 adicións e 4 borrados
  1. 17 4
      src/client/styles/scss/_subnav.scss

+ 17 - 4
src/client/styles/scss/_subnav.scss

@@ -19,11 +19,7 @@ body:not(.admin-page) {
    * Compact Mode Switching
    */
   .grw-subnavbar {
-    transition: background-color, box-shadow 400ms linear;
-
     h1 {
-      line-height: 1.1em;
-
       // set transition-duration (compact -> normal)
       transition: font-size 0;
 
@@ -40,6 +36,19 @@ body:not(.admin-page) {
     }
   }
 
+  /*
+   * Sticky Mode Switching
+   */
+  .grw-subnavbar {
+    // set transition-duration (sticky -> init)
+    transition: background-color, box-shadow 0;
+
+    &.grw-subnavbar-sticky {
+      // set transition-duration (init -> sticky)
+      transition: background-color, box-shadow 400ms linear;
+    }
+  }
+
   /*
    * styles
    */
@@ -53,6 +62,10 @@ body:not(.admin-page) {
       }
     }
 
+    h1 {
+      line-height: 1.1em;
+    }
+
     ul.authors {
       padding-left: 1.5em;
       margin: 0;