Skip to content

Instantly share code, notes, and snippets.

@zolotyh
Last active August 29, 2015 14:07
Show Gist options
  • Save zolotyh/a74a93d754a743cb7584 to your computer and use it in GitHub Desktop.
Save zolotyh/a74a93d754a743cb7584 to your computer and use it in GitHub Desktop.
$module: '.select-component';
.select-component {
display: inline-block;
margin-right: 20px;
position: relative;
vertical-align: top;
&:focus {
text-decoration: none;
outline: $n-color-base auto 5px;
}
&:hover {
text-decoration: none;
}
&__title {
border-radius: 3px;
position: relative;
border: 1px solid $n-color-border;
font-size: 16px;
color: $n-color-text;
line-height: 20px;
padding: 10px 35px 10px 10px;
cursor: pointer;
font-weight: 200;
box-shadow: inset 0px 0px 0px 1px rgba(255, 255, 255, 0.50);
}
&__list {
top: 52px;
position: absolute;
font-size: 16px;
color: $n-color-text;
line-height: 20px;
font-weight: 200;
z-index: 2000;
list-style: none;
margin: 0;
padding: 0;
background: $n-color-white;
border: 1px solid #E2D8C9;
box-shadow: 0px 1px 5px 0px rgba(0, 0, 0, 0.20);
}
&__list-item {
padding: 0.5em 65px 0.5em 30px;
white-space: nowrap;
position: relative;
border: 1px solid transparent;
cursor: pointer;
&_cancel {
color: rgba($n-color-text, 0.5);
}
&_hidden {
display: none;
}
&:hover {
@include linear-gradient(-89deg, #FFFCF7 0%, #FFFAF1 100%);
border: 1px solid $n-color-bg;
}
&_active {
&:before, &:after {
position: absolute;
content: "";
display: block;
}
&:after {
box-shadow: 0 0 0 3px #fff,
0 0 0 4px $n-color-base;;
border: 1px solid $n-color-base;
background: $n-color-base;
border-radius: 50%;
background: $n-color-base;
width: 6px;
height: 6px;
top: 50%;
margin-top: -3px;
left: 9px;
}
}
}
&__list-item-count {
position: absolute;
right: 10px;
color: $n-color-border-sub;
top: 0.5em;
}
&__caret {
position: absolute;
top: 16px;
right: 9px;
font-size: 10px;
@extend .i;
@extend .i_chevron-bottom;
}
&_open {
#{$module}__caret {
@extend .i_chevron-top;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment