lbry-desktop/src/ui/scss/component/_wunderbar.scss

115 lines
2.1 KiB
SCSS
Raw Normal View History

.wunderbar {
min-width: 175px;
height: 100%;
cursor: text;
display: flex;
2019-06-11 20:10:58 +02:00
align-items: center;
flex: 1;
position: relative;
z-index: 1;
2019-06-17 22:32:38 +02:00
margin-right: calc(var(--spacing-large));
2019-06-11 20:10:58 +02:00
@media (max-width: 600px) {
margin-right: 0;
}
> .icon {
top: 0;
2019-06-11 20:10:58 +02:00
left: var(--spacing-small);
height: 100%;
position: absolute;
z-index: 1;
}
}
.wunderbar__active-suggestion {
background-color: $lbry-blue-2;
color: $lbry-black;
2019-02-13 17:27:20 +01:00
html[data-mode='dark'] & {
background-color: $lbry-blue-4;
color: inherit;
}
}
.wunderbar__input {
width: 100%;
2019-06-11 20:10:58 +02:00
height: var(--button-height);
border-radius: var(--button-radius);
background-color: $lbry-gray-1;
align-items: center;
2019-06-11 20:10:58 +02:00
border: none;
2019-06-17 22:32:38 +02:00
min-width: 0;
padding-right: var(--spacing-small);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
2019-06-11 20:10:58 +02:00
padding-left: 2.5rem;
transition: all 0.2s;
&:focus {
border-radius: var(--input-border-radius);
}
&::placeholder {
color: $lbry-black;
opacity: 0.9;
}
2019-02-13 17:27:20 +01:00
html[data-mode='dark'] & {
color: $lbry-white;
2019-06-11 20:10:58 +02:00
background-color: darken($lbry-gray-5, 20%);
2019-06-11 20:10:58 +02:00
&::placeholder {
color: $lbry-gray-1;
}
}
}
.wunderbar__menu {
background-color: $lbry-white;
box-shadow: 0 1px 5px rgba($lbry-black, 0.15);
min-width: 100%;
overflow: hidden;
2019-02-13 17:27:20 +01:00
html[data-mode='dark'] & {
background-color: $lbry-gray-5;
color: $lbry-white;
}
}
.wunderbar__suggestion {
align-items: center;
cursor: pointer;
display: flex;
flex-direction: row;
justify-items: flex-start;
2019-06-11 20:10:58 +02:00
padding: var(--spacing-small) var(--spacing-medium);
&:not(:first-of-type) {
border-top: 1px solid transparent;
}
.icon {
flex-shrink: 0;
}
}
.wunderbar__suggestion-label {
overflow: hidden;
2019-06-11 20:10:58 +02:00
padding-left: var(--spacing-large);
text-overflow: ellipsis;
white-space: nowrap;
}
.wunderbar__suggestion-label--action {
font-size: 1rem;
font-weight: 600;
line-height: 0.1; // to vertically align because the font size is smaller
2019-06-11 20:10:58 +02:00
margin-left: var(--spacing-small);
opacity: 0.7;
text-transform: uppercase;
white-space: nowrap;
}