Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions css/nice-select.css
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@
.nice-select.small .option {
line-height: 34px;
min-height: 34px; }
.nice-select span.current {
display: block;
overflow: hidden; }
.nice-select .list {
background-color: #fff;
border-radius: 5px;
Expand Down
3 changes: 3 additions & 0 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@
.nice-select.small .option {
line-height: 34px;
min-height: 34px; }
.nice-select span.current {
display: block;
overflow: hidden; }
.nice-select .list {
background-color: #fff;
border-radius: 5px;
Expand Down
37 changes: 21 additions & 16 deletions scss/_nice-select-prefixed.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ $arrow_color: $gray !default;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
background-color: #fff;
border-radius: $input_border_radius;
border: solid 1px $gray_light;
border: solid 1px $gray_light;
box-sizing: border-box;
clear: both;
cursor: pointer;
Expand Down Expand Up @@ -51,19 +51,19 @@ $arrow_color: $gray !default;
border-color: $primary_light;
}
// Arrow
&:after {
&:after {
border-bottom: 2px solid $arrow_color;
border-right: 2px solid $arrow_color;
content: '';
display: block;
display: block;
height: 5px;
margin-top: -4px;
pointer-events: none;
position: absolute;
right: 12px;
top: 50%;
-webkit-transform-origin: 66% 66%;
-ms-transform-origin: 66% 66%;
position: absolute;
right: 12px;
top: 50%;
-webkit-transform-origin: 66% 66%;
-ms-transform-origin: 66% 66%;
transform-origin: 66% 66%;
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
Expand All @@ -73,7 +73,7 @@ $arrow_color: $gray !default;
transition: all 0.15s ease-in-out;
width: 5px;
}

&.open {
@extend :active;
&:after {
Expand All @@ -93,11 +93,11 @@ $arrow_color: $gray !default;
border-color: lighten($gray_light, 2%);
color: $gray;
pointer-events: none;
&:after {
&:after {
border-color: lighten($arrow_color, 20%);
}
}

// Modifiers
&.wide {
width: 100%;
Expand All @@ -117,7 +117,7 @@ $arrow_color: $gray !default;
font-size: $font_size_small;
height: $input_height_small;
line-height: $input_height_small - 2;
&:after {
&:after {
height: 4px;
width: 4px;
}
Expand All @@ -126,7 +126,12 @@ $arrow_color: $gray !default;
min-height: $input_height_small - 2;
}
}


span.current {
display: block;
overflow: hidden;
}

// List and options
.list {
background-color: #fff;
Expand Down Expand Up @@ -167,10 +172,10 @@ $arrow_color: $gray !default;
-webkit-transition
: all 0.2s;
transition: all 0.2s;
&:hover, &.focus, &.selected.focus {
&:hover, &.focus, &.selected.focus {
background-color: $gray_lighter;
}
&.selected {
&.selected {
font-weight: bold;
}
&.disabled {
Expand All @@ -191,4 +196,4 @@ $arrow_color: $gray !default;
display: block;
}
}
}
}
33 changes: 19 additions & 14 deletions scss/nice-select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ $arrow_color: $gray !default;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
background-color: #fff;
border-radius: $input_border_radius;
border: solid 1px $gray_light;
border: solid 1px $gray_light;
box-sizing: border-box;
clear: both;
cursor: pointer;
Expand All @@ -46,23 +46,23 @@ $arrow_color: $gray !default;
border-color: $primary_light;
}
// Arrow
&:after {
&:after {
border-bottom: 2px solid $arrow_color;
border-right: 2px solid $arrow_color;
content: '';
display: block;
display: block;
height: 5px;
margin-top: -4px;
pointer-events: none;
position: absolute;
right: 12px;
top: 50%;
position: absolute;
right: 12px;
top: 50%;
transform-origin: 66% 66%;
transform: rotate(45deg);
transition: all 0.15s ease-in-out;
width: 5px;
}

&.open {
@extend :active;
&:after {
Expand All @@ -78,11 +78,11 @@ $arrow_color: $gray !default;
border-color: lighten($gray_light, 2%);
color: $gray;
pointer-events: none;
&:after {
&:after {
border-color: lighten($arrow_color, 20%);
}
}

// Modifiers
&.wide {
width: 100%;
Expand All @@ -102,7 +102,7 @@ $arrow_color: $gray !default;
font-size: $font_size_small;
height: $input_height_small;
line-height: $input_height_small - 2;
&:after {
&:after {
height: 4px;
width: 4px;
}
Expand All @@ -111,7 +111,12 @@ $arrow_color: $gray !default;
min-height: $input_height_small - 2;
}
}


span.current {
display: block;
overflow: hidden;
}

// List and options
.list {
background-color: #fff;
Expand Down Expand Up @@ -144,10 +149,10 @@ $arrow_color: $gray !default;
padding-right: $dropdown_padding + 11;
text-align: left;
transition: all 0.2s;
&:hover, &.focus, &.selected.focus {
&:hover, &.focus, &.selected.focus {
background-color: $gray_lighter;
}
&.selected {
&.selected {
font-weight: bold;
}
&.disabled {
Expand All @@ -168,4 +173,4 @@ $arrow_color: $gray !default;
display: block;
}
}
}
}