react-toolbox/components/autocomplete/theme.scss

77 lines
1.6 KiB
SCSS
Raw Normal View History

2016-06-04 23:06:59 +03:00
@import "../colors";
@import "../globals";
@import "../mixins";
@import "./config";
2015-11-08 18:49:00 +03:00
@import "../input/config";
2016-05-21 20:48:53 +03:00
.autocomplete {
2015-10-02 20:10:42 +03:00
position: relative;
2015-11-08 18:49:00 +03:00
padding: $unit 0;
&.focus {
.suggestions {
2015-10-20 22:38:33 +03:00
max-height: $autocomplete-overflow-max-height;
visibility: visible;
box-shadow: $zdepth-shadow-1;
}
}
2015-10-02 20:10:42 +03:00
}
.values {
flex-direction: row;
flex-wrap: wrap;
2015-11-08 18:49:00 +03:00
padding-bottom: $unit / 2;
}
2015-10-02 20:10:42 +03:00
.value {
margin: $autocomplete-value-margin;
2015-10-02 20:10:42 +03:00
}
.suggestions {
@include no-webkit-scrollbar;
2015-10-02 20:10:42 +03:00
position: absolute;
z-index: $z-index-high;
2015-11-08 18:49:00 +03:00
width: 100%;
max-height: 0;
2015-10-02 20:10:42 +03:00
overflow-x: hidden;
overflow-y: auto;
visibility: hidden;
background-color: $autocomplete-suggestions-background;
2015-10-02 20:10:42 +03:00
transition-timing-function: $animation-curve-default;
transition-duration: $animation-duration;
transition-property: max-height, box-shadow;
&:not(.up) {
2015-12-20 19:39:10 +03:00
margin-top: - $input-padding;
}
&.up {
bottom: 0;
2015-10-08 11:14:47 +03:00
}
2015-10-02 20:10:42 +03:00
}
.suggestion {
padding: $autocomplete-suggestion-padding;
font-size: $input-field-font-size;
2015-10-02 20:10:42 +03:00
cursor: pointer;
2015-10-08 11:14:47 +03:00
&.active {
background-color: $autocomplete-suggestion-active-background;
2015-10-08 11:14:47 +03:00
}
2015-10-02 20:10:42 +03:00
}
2015-10-09 20:48:30 +03:00
.input {
2015-12-20 19:39:10 +03:00
position: relative;
&:after {
$size: ($input-field-height / 7);
$border: $size solid transparent;
position: absolute;
top: 50%;
right: $input-chevron-offset;
width: 0;
height: 0;
2016-04-10 20:15:29 +03:00
pointer-events: none;
2015-12-20 19:39:10 +03:00
content: "";
border-top: $size solid $input-text-bottom-border-color;
border-right: $border;
border-left: $border;
transition: transform $animation-duration $animation-curve-default;
}
2015-10-09 20:48:30 +03:00
}