open-nomad/ui/app/styles/components/global-search-container.scss
Buck Doyle bf7ed82def
Improve global search UX (#8249)
This updates the look of the search control, adds a hint about the slash
shortcut, adds highlighting of fuzzy search results, and addresses a few
edge case UX failures. It moves to using a fork of Ember Power Select
to handle an edge case where pressing escape would put the control
in an undesirable active-but-not-open state.
2020-06-25 08:51:52 -05:00

69 lines
1.2 KiB
SCSS

.global-search-container {
position: absolute;
width: 100%;
left: 0;
top: 0;
bottom: 0;
display: flex;
justify-content: center;
align-items: center;
.global-search {
width: 30em;
@media #{$mq-hidden-gutter} {
width: 20em;
}
.ember-power-select-trigger {
background: $nomad-green-darker;
border: 0;
.icon {
margin-top: 1px;
margin-left: 2px;
fill: white;
opacity: 0.7;
}
.placeholder {
opacity: 0.7;
display: inline-block;
padding-left: 2px;
transform: translateY(-1px);
font-weight: $weight-semibold;
}
.shortcut {
position: absolute;
right: 5px;
top: 5px;
bottom: 5px;
width: 1.4rem;
padding-top: 3px;
text-align: center;
opacity: 0.7;
background: $nomad-green-dark;
font-weight: $weight-semibold;
}
&.ember-power-select-trigger--active {
background: white;
border-color: white;
.icon {
fill: black;
opacity: 1;
}
}
}
.ember-basic-dropdown-content-wormhole-origin {
position: absolute;
top: 0;
width: 100%;
}
}
}