Yuki Takei 5 лет назад
Родитель
Сommit
6aaad85386

+ 2 - 5
src/client/styles/scss/_on-edit.scss

@@ -36,15 +36,12 @@ body.on-edit {
   }
 
   // calculate margin
-  $editor-margin-top: 95px //              .grw-subnav height
-    + $grw-navbar-border-width;
+  $editor-margin-top: $grw-navbar-border-width + $grw-subnav-max-height-on-edit;
   @include expand-editor($editor-margin-top);
 
   @include media-breakpoint-up(md) {
     // calculate margin
-    $editor-margin-top: 115px //              .grw-subnav height
-      + $grw-navbar-border-width;
-
+    $editor-margin-top: $grw-navbar-border-width + $grw-subnav-max-height-md-on-edit;
     @include expand-editor($editor-margin-top);
   }
 

+ 2 - 1
src/client/styles/scss/_subnav.scss

@@ -1,8 +1,9 @@
 .grw-subnav {
+  min-height: $grw-subnav-min-height;
   padding: 8px 15px;
 
   @include media-breakpoint-up(md) {
-    min-height: 115px;
+    min-height: $grw-subnav-min-height-md;
   }
 
   &:hover {

+ 5 - 0
src/client/styles/scss/_variables.scss

@@ -9,6 +9,11 @@ $font-family-monospace-not-strictly: Monaco, Menlo, Consolas, 'Courier New', Mei
 $grw-navbar-height: 52px;
 $grw-navbar-border-width: 3.3333px;
 
+$grw-subnav-min-height: 95px;
+$grw-subnav-min-height-md: 115px;
+$grw-subnav-max-height-on-edit: 95px;
+$grw-subnav-max-height-md-on-edit: 115px;
+
 $grw-navbar-bottom-height: 48px;
 $grw-editor-navbar-bottom-height: 48px;