Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix select2 above styles #2412

Merged
merged 1 commit into from
Dec 20, 2017
Merged
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
39 changes: 32 additions & 7 deletions backend/app/assets/stylesheets/spree/backend/plugins/_select2.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
.select2-container {
.select2-container,
.select2-container.select2-drop-above {
.select2-choice, .select2-choices {
border: $input-btn-border-width solid $input-border-color;
@include border-radius($input-border-radius);
border-radius: $input-border-radius;
background: $input-bg;
height: $input-height;
padding: 0;
Expand All @@ -25,6 +26,20 @@
}
}

.select2-container.select2-dropdown-open {
.select2-choice,
.select2-choices {
border-radius: $input-border-radius $input-border-radius 0 0;
}

&.select2-drop-above {
.select2-choice,
.select2-choices {
border-radius: 0 0 $input-border-radius $input-border-radius;
}
}
}

.select2-container .select2-choice .select2-search-choice-close {
@extend .fa;
@extend .fa-times;
Expand All @@ -37,7 +52,9 @@
background-image: none;
}

.select2-container-active, .select2-dropdown-open {
.select2-container-active, .select2-dropdown-open,
.select2-container-active.select2-drop-above,
.select2-dropdown-open.select2-drop-above {
.select2-choices.select2-choices, /* Needs extra specificity */
.select2-choice {
box-shadow: none; /* Remove default outline */
Expand Down Expand Up @@ -71,11 +88,19 @@
.select2-drop {
/* Remove default shadow */
box-shadow: none;
}

.select2-drop-active {
border: $input-btn-border-width solid $input-focus-border-color;
border-top: 0;
&.select2-drop-active,
&.select2-drop-active.select2-drop-above {
border: $input-btn-border-width solid $input-focus-border-color;
}

&.select2-drop-active {
border-top: 0;

&.select2-drop-above {
border-bottom: 0;
}
}
}

.select2-results {
Expand Down