Currently, if the user doesn't import the stylesheet, the select is rendered unusable.
I think that the very bare minimum styling should be provided inline - just enough to render it usable with no provided css. It would remain flexible enough to be styled anyway the user wants, bringing some advantages:
I know other people already suggested moving the whole sass/less styling inline - but that's a matter of personal preference (and not what I'm proposing).
If the mantainers agrees (@JedWatson ), I can work on a pull request with this change.
Could You explain why inline is better than external? IMO it's better to be able to control Your component, and with inline styles You are obligated to use !important in your style files
Suppose I want to change the border of the select box based on the error or success. I want to implement dynamic styling which can be done easily using inline styles in general. Please tell if it can be implemented using plain CSS as well
@adred8 Yes, you can change className of your component between error-class and success-class, and style them both in CSS file
That can be done if the component is created by me and I have control over it but I could not find how react-select is supporting this way of passing different class names. I actually want to change the outline of the autosuggest field when an error occurs to something in red
@adred8 there is attribute className you can pass to Select component, also there's classNamePrefix if you'd like to prefix all the classnames that reselect is using
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 limited efforts to maintain the latest 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!