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

Select fixes #113

Merged
merged 3 commits into from
Jan 23, 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
19 changes: 19 additions & 0 deletions src/components/Select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,22 @@
// Import and override react-select's SCSS variables to match BS4:
$select-input-border-width: 0.1rem;
$select-input-height: 2.4rem !default;

// Override react-select styles to match Saffron (TODO move to theme?)
$select-option-focused-color: #FFF;
$select-option-focused-bg: #00AFDB;

// TODO correct inner padding, colors to match BS styles

@import '~react-select/scss/default.scss';

// The default right padding for the input is 10px, which puts the cursor quite deep into the
// component. By reducing this to 5px the input looks more natural and the cursor does not
// overlap any placeholder text.
.Select-input {
padding-left: 5px;
}

.Select-input > input {
height: 100%;
}
Expand All @@ -14,4 +26,11 @@
// Allow space for the "x" and prevent text overlap
padding-right: 3rem !important;
}

.is-open .Select-arrow-zone .Select-arrow {
// This fixes a bug where the arrow would not flip when the select is opened. This can be
// removed if https://github.com/JedWatson/react-select/pull/1500 gets merged.
border-color: transparent transparent $select-arrow-color;
border-width: 0 $select-arrow-width $select-arrow-width;
}
}