X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fheader%2Fsearch-typeahead.component.scss;h=d6ce6eca4b568b2d78f27a35dacdcec7bed96381;hb=fa12eacc014aae8094d108634371640f2695bf9f;hp=a55e78326694e666ced390d422bb04ac2a0e5101;hpb=1d17d86349fd2b3a9bc85145d02383ba4aea4dc0;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/header/search-typeahead.component.scss b/client/src/app/header/search-typeahead.component.scss index a55e78326..d6ce6eca4 100644 --- a/client/src/app/header/search-typeahead.component.scss +++ b/client/src/app/header/search-typeahead.component.scss @@ -1,48 +1,55 @@ -@import '_mixins'; -@import '_variables'; -@import '_bootstrap-variables'; -@import '~bootstrap/scss/mixins/_breakpoints'; +@use '_mixins'; +@use '_variables'; #search-video { @include peertube-input-text($search-input-width); - padding-left: 10px; - padding-right: 40px; // For the search icon + + @include padding-left(10px); + @include padding-right(40px); // For the search icon + font-size: 14px; &::placeholder { - color: var(--inputPlaceholderColor); + color: pvar(--inputPlaceholderColor); } } -.icon.icon-search { +.icon-search { @include icon(25px); - height: 21px; + @include margin-left(-35px); - background-color: var(--mainForegroundColor); - mask: url('../../assets/images/header/search.svg') no-repeat 50% 50%; + height: 18px; // yolo position: absolute; - margin-left: -35px; - margin-top: 5px; + 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, @@ -58,8 +65,9 @@ my-suggestions ::ng-deep ul { margin-bottom: .5rem; em { + @include margin-right(0.2rem); + font-weight: 600; - margin-right: 0.2rem; font-style: normal; } } @@ -67,21 +75,21 @@ my-suggestions ::ng-deep ul { #typeahead-container { input { - border: 1px solid var(--mainBackgroundColor) !important; - box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 20px 0px; + border: 1px solid pvar(--mainBackgroundColor) !important; + box-shadow: rgba(0, 0, 0, 0.1) 0 1px 20px 0; flex-grow: 1; transition: box-shadow .3s ease, width .2s ease; } @media screen and (min-width: $mobile-view) { - margin-left: 10px; + @include margin-left(10px); } @media screen and (max-width: $small-view) { flex: 1; input { - width: unset; + width: 70px; } } @@ -89,28 +97,28 @@ my-suggestions ::ng-deep ul { right: 10px; } - & > div:last-child { - // we have to switch the display and not the opacity, + > div:last-child { + // we have to switch the display and not the opacity, // to avoid clashing with the rest of the interface. display: none; } &:focus, ::ng-deep &:focus-within { - & > div:last-child { + > div:last-child { @media screen and (min-width: $mobile-view) { display: initial !important; } - + #typeahead-help, #typeahead-instructions, - my-suggestions ::ng-deep ul { - box-shadow: rgba(0, 0, 0, 0.2) 0px 10px 20px -5px; + li.suggestion { + box-shadow: rgba(0, 0, 0, 0.2) 0 10px 20px -5px; } } ::ng-deep input { - box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 20px 0px; + box-shadow: rgba(0, 0, 0, 0.2) 0 1px 20px 0; border-end-start-radius: 0; border-end-end-radius: 0;