]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/header/search-typeahead.component.scss
Merge branch 'release/3.1.0' into develop
[github/Chocobozzz/PeerTube.git] / client / src / app / header / search-typeahead.component.scss
index c410d47345b3e35ce43d50a12a703863e9f8a372..f8d68e9867565b74699bee768588df6d46de5641 100644 (file)
@@ -1,21 +1,53 @@
 @import '_mixins';
+@import '_variables';
+@import '_bootstrap-variables';
+@import '~bootstrap/scss/mixins/_breakpoints';
+
+#search-video {
+  @include peertube-input-text($search-input-width);
+  padding-left: 10px;
+  padding-right: 40px; // For the search icon
+  font-size: 14px;
+
+  &::placeholder {
+    color: pvar(--inputPlaceholderColor);
+  }
+}
+
+.icon.icon-search {
+  @include icon(25px);
+  height: 18px;
+
+  // yolo
+  position: absolute;
+  margin-left: -35px;
+  margin-top: 3.5px;
+  right: 10px;
+}
 
 .jump-to-suggestions {
   top: 100%;
   left: 0;
-  z-index: 35;
+  z-index: z('search-typeahead');
   width: 100%;
 }
 
 #typeahead-help,
 #typeahead-instructions,
-my-suggestions ::ng-deep ul {
-  border: 1px solid var(--mainBackgroundColor);
-  border-bottom-right-radius: 3px;
-  border-bottom-left-radius: 3px;
-  background: var(--mainBackgroundColor);
+li.suggestion {
+  border: 1px solid pvar(--mainBackgroundColor);
+  background: pvar(--mainBackgroundColor);
   transition: .3s ease;
   transition-property: box-shadow;
+  cursor: pointer;
+
+  // soft border-radius for the last suggestion and the link inside
+  &:last-of-type {
+    &, & ::ng-deep a {
+      border-bottom-right-radius: 3px;
+      border-bottom-left-radius: 3px;
+    }
+  }
 }
 
 #typeahead-help,
@@ -39,19 +71,31 @@ my-suggestions ::ng-deep ul {
 }
 
 #typeahead-container {
-  ::ng-deep input {
-    border: 1px solid var(--mainBackgroundColor) !important;
+  input {
+    border: 1px solid pvar(--mainBackgroundColor) !important;
     box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 20px 0px;
     flex-grow: 1;
     transition: box-shadow .3s ease, width .2s ease;
   }
 
-  ::ng-deep span {
+  @media screen and (min-width: $mobile-view) {
+    margin-left: 10px;
+  }
+
+  @media screen and (max-width: $small-view) {
+    flex: 1;
+
+    input {
+      width: unset;
+    }
+  }
+
+  span {
     right: 10px;
   }
 
   & > div:last-child {
-    // we have to switch the display and not the opacity, 
+    // we have to switch the display and not the opacity,
     // to avoid clashing with the rest of the interface.
     display: none;
   }
@@ -59,11 +103,13 @@ my-suggestions ::ng-deep ul {
   &:focus,
   ::ng-deep &:focus-within {
     & > div:last-child {
-      display: initial !important;
-      
+      @media screen and (min-width: $mobile-view) {
+        display: initial !important;
+      }
+
       #typeahead-help,
       #typeahead-instructions,
-      my-suggestions ::ng-deep ul {
+      li.suggestion {
         box-shadow: rgba(0, 0, 0, 0.2) 0px 10px 20px -5px;
       }
     }
@@ -73,7 +119,7 @@ my-suggestions ::ng-deep ul {
       border-end-start-radius: 0;
       border-end-end-radius: 0;
 
-      @media screen and (min-width: 900px) {
+      @include media-breakpoint-up(lg) {
         width: 500px;
       }
     }