]> BookStack Code Mirror - bookstack/blobdiff - resources/sass/_header.scss
Applied StyleCI changes, added php/larastan to attribution
[bookstack] / resources / sass / _header.scss
index 687ddd8d2259c83dcf0cb94530e7b34b7d5e9b9d..1a7015078e3891f44fa3511e0b88985073ce7f96 100644 (file)
@@ -3,7 +3,7 @@
  */
 
 header .grid {
-  grid-template-columns: auto min-content auto;
+  grid-template-columns: minmax(max-content, 2fr) 1fr minmax(max-content, 2fr);
 }
 
 @include smaller-than($l) {
@@ -18,11 +18,14 @@ header {
   display: block;
   z-index: 11;
   top: 0;
-  color: #fff;
-  fill: #fff;
+  color: rgb(250, 250, 250);
   border-bottom: 1px solid #DDD;
   box-shadow: $bs-card;
   padding: $-xxs 0;
+  @include lightDark(border-bottom-color, #DDD, #000);
+  @include whenDark {
+    filter: saturate(0.8) brightness(0.8);
+  }
   .links {
     display: inline-block;
     vertical-align: top;
@@ -31,11 +34,10 @@ header {
     display: inline-block;
     padding: $-m;
     color: #FFF;
-    fill: #FFF;
   }
   .dropdown-container {
-    padding-left: $-m;
-    padding-right: 0;
+    padding-inline-start: $-m;
+    padding-inline-end: 0;
   }
   .avatar, .user-name {
     display: inline-block;
@@ -53,7 +55,7 @@ header {
       vertical-align: top;
     }
     > span {
-      padding-left: $-xs;
+      padding-inline-start: $-xs;
       display: inline-block;
       padding-top: $-xxs;
     }
@@ -62,7 +64,7 @@ header {
       font-size: 18px;
     }
     @include between($l, $xl) {
-      padding-left: $-xs;
+      padding-inline-start: $-xs;
       .name {
         display: none;
       }
@@ -75,9 +77,6 @@ header {
 }
 
 
-.header-search {
-  display: inline-block;
-}
 header .search-box {
   display: inline-block;
   margin-top: 10px;
@@ -87,18 +86,22 @@ header .search-box {
     border-radius: 40px;
     color: #EEE;
     z-index: 2;
-    padding-left: 40px;
+    padding-inline-start: 40px;
     &:focus {
       outline: none;
       border: 1px solid rgba(255, 255, 255, 0.6);
     }
   }
   button {
-    fill: #EEE;
     z-index: 1;
     left: 16px;
+    @include lightDark(color, rgba(255, 255, 255, 0.8), #AAA);
+    @include rtl {
+      left: auto;
+      right: 16px;
+    }
     svg {
-      margin-right: 0;
+      margin-block-end: 0;
     }
   }
   ::-webkit-input-placeholder { /* Chrome/Opera/Safari */
@@ -124,12 +127,12 @@ header .search-box {
   font-size: 1.8em;
   color: #fff;
   font-weight: 400;
-  padding: 14px $-l 14px 0;
+  @include padding(14px, $-l, 14px, 0);
   vertical-align: top;
   line-height: 1;
 }
 .logo-image {
-  margin: $-xs $-s $-xs 0;
+  @include margin($-xs, $-s, $-xs, 0);
   vertical-align: top;
   height: 43px;
 }
@@ -151,12 +154,18 @@ header .search-box {
     margin: 0;
     bottom: -2px;
   }
+  @include rtl() {
+    left: $-m;
+    right: auto;
+  }
 }
 
+
+
 @include smaller-than($l) {
   header .header-links {
+    @include lightDark(background-color, #fff, #333);
     display: none;
-    background-color: #FFF;
     z-index: 10;
     right: $-m;
     border-radius: 4px;
@@ -168,25 +177,29 @@ header .search-box {
       display: block;
     }
   }
-  header .links a, header .dropdown-container ul li a {
-    text-align: left;
+  header .links a, header .dropdown-container ul li a, header .dropdown-container ul li button {
+    text-align: start;
     display: block;
     padding: $-s $-m;
     color: $text-dark;
-    fill: $text-dark;
+    @include lightDark(color, $text-dark, #eee);
     svg {
-      margin-right: $-s;
+      margin-inline-end: $-s;
     }
     &:hover {
-      background-color: #EEE;
-      color: #444;
-      fill: #444;
+      @include lightDark(background-color, #eee, #333);
+      @include lightDark(color, #000, #fff);
       text-decoration: none;
     }
+    &:focus {
+      @include lightDark(background-color, #eee, #333);
+      outline-color: var(--color-primary);
+      color: var(--color-primary);
+    }
   }
   header .dropdown-container {
     display: block;
-    padding-left: 0;
+    padding-inline-start: 0;
   }
   header .links {
     display: block;
@@ -208,17 +221,22 @@ header .search-box {
   z-index: 5;
   background-color: #FFF;
   border-bottom: 1px solid #DDD;
+  @include lightDark(border-bottom-color, #DDD, #333);
   box-shadow: $bs-card;
 }
 .tri-layout-mobile-tab {
   text-align: center;
   border-bottom: 3px solid #BBB;
   cursor: pointer;
+  margin: 0;
+  @include lightDark(background-color, #FFF, #222);
+  @include lightDark(border-bottom-color, #BBB, #333);
   &:first-child {
-    border-right: 1px solid #DDD;
+    border-inline-end: 1px solid #DDD;
+    @include lightDark(border-inline-end-color, #DDD, #000);
   }
-  &.active {
-    border-bottom-color: currentColor;
+  &[aria-selected="true"] {
+    border-bottom-color: currentColor !important;
   }
 }
 
@@ -253,15 +271,15 @@ header .search-box {
       display: none;
     }
     > span:first-child {
-      margin-right: 0;
+      margin-inline-end: 0;
     }
   }
 }
 
-.breadcrumb-listing {
+.dropdown-search {
   position: relative;
-  .breadcrumb-listing-toggle {
-    padding: 6px;
+  .dropdown-search-toggle {
+    padding: $-xs;
     border: 1px solid transparent;
     border-radius: 4px;
     &:hover {
@@ -269,47 +287,15 @@ header .search-box {
     }
   }
   .svg-icon {
-    margin-right: 0;
+    margin-inline-end: 0;
   }
 }
 
-.breadcrumb-listing-dropdown {
-  box-shadow: $bs-med;
-  overflow: hidden;
-  min-height: 100px;
-  width: 240px;
-  display: none;
-  position: absolute;
-  z-index: 80;
-  right: -$-m;
-  .breadcrumb-listing-search .svg-icon {
-    position: absolute;
-    left: $-s;
-    top: 11px;
-    fill: #888;
-    pointer-events: none;
-  }
-  .breadcrumb-listing-entity-list {
-    max-height: 400px;
-    overflow-y: scroll;
-    text-align: left;
-  }
-  input {
-    padding-left: $-xl;
-    border-radius: 0;
-    border: 0;
-    border-bottom: 1px solid #DDD;
-  }
-}
-
-@include smaller-than($m) {
-  .breadcrumb-listing-dropdown {
-    position: fixed;
-    right: auto;
-    left: $-m;
-  }
-  .breadcrumb-listing-dropdown .breadcrumb-listing-entity-list {
-    max-height: 240px;
+.dropdown-search-toggle.compact {
+  padding: $-xxs $-xs;
+  .avatar {
+    height: 22px;
+    width: 22px;
   }
 }
 
@@ -337,25 +323,25 @@ header .search-box {
   display: inline-block;
   padding: $-xs $-s;
   &:last-child {
-    padding-right: 0;
+    padding-inline-end: 0;
   }
   &:first-child {
-    padding-left: 0;
+    padding-inline-start: 0;
   }
 }
 
 
 .action-buttons .dropdown-container:last-child a {
-  padding-right: 0;
-  padding-left: $-s;
+  padding-inline-end: 0;
+  padding-inline-start: $-s;
 }
 .action-buttons {
-  text-align: right;
+  text-align: end;
   &.text-left {
-    text-align: left;
+    text-align: start;
     .text-button {
-      padding-right: $-m;
-      padding-left: 0;
+      padding-inline-end: $-m;
+      padding-inline-start: 0;
     }
   }
   &.text-center {
@@ -368,6 +354,6 @@ header .search-box {
     padding: $-xs $-xs;
   }
   .action-buttons .dropdown-container:last-child a {
-    padding-left: $-xs;
+    padding-inline-start: $-xs;
   }
 }
\ No newline at end of file