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

Show focused border on currency selector #1813

Merged
merged 1 commit into from Apr 5, 2017

Conversation

jhawthorn
Copy link
Contributor

@jhawthorn jhawthorn commented Mar 31, 2017

Previously we were embedding the currency selector inside of a bootstrap input-group-addon and hiding its border. This required a little extra magic because we had to hide the select's border and change its height to fit within.

Having no border meant that there was no indication when the currency input was focused.

Bootstrap doesn't fully support having multiple inputs within a input-group, but we can make it work by hiding the right border on the left input.

A slight hack is needed to make focus look correct: we show the focused colour on the right input's left border when the left border is focused. This achieves the desired effect.


The focused border colour is wrong here because our current version of bootstrap's .custom-select hardcodes it. This will be fixed in #1816, so that should be merged first.

Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice hack!

Previously we were embedding the currency selector inside of a bootstrap
input-group-addon and hiding its border. This required a little extra
magic because we had to hide the select's border and change its height
to fit within.

Having no border meant that there was no indication when the currency
input was focused.

Bootstrap doesn't fully support having multiple inputs within a
input-group, but we can make it work by hiding the right border on the
left input.

A slight hack is needed to make focus look correct: we show the focused
colour on the right input's left border when the left border is focused.
This achieves the desired effect.
@jhawthorn jhawthorn merged commit 199cc9b into solidusio:master Apr 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants