lbry-desktop/ui/scss/component/_wunderbar.scss
2020-12-03 12:39:12 -05:00

186 lines
3.5 KiB
SCSS

.wunderbar__wrapper {
flex: 1;
max-width: 30rem;
margin-left: var(--spacing-s);
margin-right: var(--spacing-s);
}
.wunderbar {
cursor: text;
display: flex;
align-items: center;
position: relative;
z-index: 1;
font-size: var(--font-small);
height: var(--height-input);
@media (max-width: $breakpoint-small) {
max-width: none;
margin: 0;
}
> .icon {
top: 0;
left: var(--spacing-s);
height: 100%;
position: absolute;
z-index: 1;
stroke: var(--color-input-placeholder);
}
}
.wunderbar--inline {
@extend .wunderbar;
flex: 0;
margin-right: 0;
fieldset-section {
width: 15rem;
}
@media (max-width: $breakpoint-small) {
margin: var(--spacing-xxs) 0;
}
}
.wunderbar__input {
width: 100%;
align-items: center;
min-width: 0;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
height: var(--height-input);
border-radius: var(--height-input);
background-color: var(--color-input-bg);
color: var(--color-input);
border: none;
padding-right: var(--spacing-s);
padding-left: 2.5rem;
transition: all 0.2s;
-webkit-app-region: no-drag;
&:focus {
border-radius: var(--border-radius);
}
}
.wunderbar__input--inline {
@extend .wunderbar__input;
@media (max-width: $breakpoint-small) {
position: absolute;
top: 0;
}
}
.wunderbar__results {
margin-left: var(--spacing-xs);
}
.wunderbar__suggestions {
z-index: 3;
position: absolute;
left: 0;
right: 0;
top: calc(var(--header-height) - (var(--height-input)) + 3px);
@extend .card;
box-shadow: var(--card-box-shadow);
border-top-right-radius: 0;
border-top-left-radius: 0;
border-top: none;
padding: var(--spacing-xs);
margin: 0 var(--spacing-s);
}
.wunderbar__top-claim {
margin-bottom: var(--spacing-m);
}
.wunderbar__label {
margin-bottom: var(--spacing-xs);
}
.wunderbar__label--results {
@extend .wunderbar__label;
margin-left: var(--spacing-xs);
}
.wunderbar__top-separator {
margin: var(--spacing-s) 0;
width: 120%;
transform: translateX(-10%);
}
.wunderbar__suggestion {
display: flex;
align-items: center;
height: 3rem;
.media__thumb {
flex-shrink: 0;
$width: 3rem;
@include handleClaimListGifThumbnail($width);
width: $width;
height: calc(#{$width} * (9 / 16));
margin-right: var(--spacing-s);
@media (min-width: $breakpoint-small) {
$width: 5rem;
@include handleClaimListGifThumbnail($width);
width: $width;
height: calc(#{$width} * (9 / 16));
margin-right: var(--spacing-xs);
}
}
}
.wunderbar__suggestion--channel {
.channel-thumbnail {
@include handleChannelGif(calc(5rem * 9 / 16));
margin-right: var(--spacing-xs);
@media (min-width: $breakpoint-small) {
@include handleChannelGif(calc(5rem * 9 / 16));
margin-right: var(--spacing-s);
}
}
}
.wunderbar__suggestion-label {
font-size: var(--font-small);
min-width: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.wunderbar__suggestion-name {
@extend .help;
margin-top: 0;
}
.wunderbar__more-results {
margin-top: var(--spacing-xs);
}
[data-reach-combobox-option] {
border-radius: var(--border-radius);
&:hover {
background-color: var(--color-menu-background--active);
}
}
[data-reach-combobox-option][data-highlighted] {
background-color: var(--color-menu-background--active);
}
[data-reach-combobox-option][aria-selected='true'] {
&:hover {
background-color: var(--color-menu-background--active);
}
}
[data-reach-combobox-option] {
padding: var(--spacing-xs);
}