React-select: On Select Faint Blue Outline (CSS Issue)

Created on 14 Oct 2017  路  8Comments  路  Source: JedWatson/react-select

After an input is selected a faint blue 2px (estimated) outline appears around the input box.
It is there on all the examples. (You have to select an input first and then it goes away on click)

The only two css properties I thought could be causing this are outline / border so I've tried the following in CSS but to no avail.

*
  outline: none !important
  border: none !important

Does anyone now how to get rid of this faint light blue background.
Thanks

Most helpful comment

<Select 
  style={{
    boxShadow: 'none'
  }}
/>

works

All 8 comments

I believe what you're seeing is the style defined here. You can override it with the selector .Select.is-focused:not(.is-open) > .Select-control, for example.

Same here. Even tried

* {
  outline: 0 !important;
  border: 0 !important;
}
* {
  outline: none !important;
  border: none !important;
}

but neither works.

See the screenshot below:
image

<Select 
  style={{
    boxShadow: 'none'
  }}
/>

works

Jeez, thank you so much @dsvgit this was driving me insane. Do you know of any way to do this within a CSS file? The below doesn't work.

```
.Select {
box-shadow: none;
}

I dont understand why would you create a library that you have hard time to style? Isnt this react-select is supposed to help you style html options?

Do the job

.Select-control {
       border: 1px solid red !important
       box-shadow: none !important;
}

I struggled with this myself. I customized the box-shadow around my control, so setting it to 'none' did not work for me. I fixed this by adding a custom :hover style to the control:

customStyles = { control: (provided) => ({ ...provided, '&:hover': { borderColor: 'red', }, }) }

Hello -

In an effort to sustain the react-select project going forward, we're closing old issues.

We understand this might be inconvenient but in the best interest of supporting the broader community we have to direct our efforts towards the current major version.

If you aren't using the latest version of react-select please consider upgrading to see if it resolves any issues you're having.

However, if you feel this issue is still relevant and you'd like us to review it - please leave a comment and we'll do our best to get back to you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Meesam picture Meesam  路  3Comments

ericj17 picture ericj17  路  3Comments

batusai513 picture batusai513  路  3Comments

geraldfullam picture geraldfullam  路  3Comments

yrabinov picture yrabinov  路  3Comments