Changing the color of selected items in react-select -


i want change color of selected items in react select. selected items appear blue. want change color grey

enter image description here

towards did following steps

  1. created file called mycomponent.scss

    $grey: #999; .select--multi { .select-value {     background-color: $grey;     color: $grey; }} 

and imported file component

import 'react-select/scss/default.scss'; import './mycomponent.scss'; 

my hope override default color $grey variable.

but color still blue.

changing color of requires juggling of .css there lot of elements have changed. remember 4th number of rgba represents translucence. here elements need changed:

div.select-control>.select-value {  background-color: rgba(153, 153, 153, .08); border: 1px solid rgba(153, 153, 153, 0.24); color: #999; } div.select-control>.select-value>.select-value-icon { border-right: 1px solid rgba(153, 153, 153, 0.24); } div.select-control>.select-value>.select-value-label, .select-value>a { color: #999; } 

towards changing these elements, recommend using selectors i've demonstrated, can override colors using !important after notation. generally, specific style wins if exists @ same level in .css.

two great tools exist this... first in chrome right click element , @ inspector (styles). second, rgba calculator available @ http://hex2rgba.devoth.com/.

ps... noticed you've got 1 declaration inside curlies of another; if want multiple selections use .select--multi, .select-value { not 1 value inside another's brackets .css or use > child elements.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -