I was there taking a look at jsFiddle and I could see where this style is applied.
To change the color of background
green for another color, just apply this piece of CSS code:
/* Muda a cor verde para preto */
.select2-drop .select2-highlighted>.select2-result-label {
color: #fff;
background: #000;
}
However by posting here my answer using the Code-Snippet
I noticed that this CSS is not being applied, probably because of the order of styles. Then we will have to use a !important
for compel that this works in any of the situations:
/* Muda a cor verde para preto */
.select2-drop .select2-highlighted>.select2-result-label {
color: #fff;
background: #000 !important;
}
/* Necessário por causa do !important adicionado anteriormente */
.select2-result-selectable .select2-result-label:hover,
.select2-drop .select2-result-selectable .select2-result-label:active {
background-color: #e1e4e7 !important;
}
Here’s an example below and you also have one example in jsFiddle if you prefer.
/* Muda a cor verde para preto */
.select2-drop .select2-highlighted>.select2-result-label {
color: #fff;
background: #000 !important;
}
/* Necessário por causa do !important adicionado anteriormente */
.select2-result-selectable .select2-result-label:hover,
.select2-drop .select2-result-selectable .select2-result-label:active {
background-color: #e1e4e7 !important;
}
.select-exemploa .select2-choice {
color: #fff;
background-color: #E87E04;
}
.select-exemploa .select2-choice:hover,
.select-exemploa .select2-choice.hover,
.select-exemploa .select2-choice:focus,
.select-exemploa .select2-choice:active {
color: #fff;
background-color: #F4B350;
border-color: #d35400;
}
.select-exemploa .select2-choice:active {
background: #F9690E;
border-color: #d35400;
}
.select2-container-disabled.select-exemploa .select2-choice,
.select2-container-disabled.select-exemploa .select2-choice:hover,
.select2-container-disabled.select-exemploa .select2-choice:focus,
.select2-container-disabled.select-exemploa .select2-choice:active {
background-color: #F9690E;
border-color: #d35400;
}
.select-exemploa .select2-choice .select2-arrow {
border-top-color: #fff;
}
.select-exemploa {
margin-top: 32px;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="http://designmodo.github.io/Flat-UI/dist/css/flat-ui.min.css">
<link rel="stylesheet" type="text/css" href="http://designmodo.github.io/Flat-UI/dist/css/vendor/bootstrap.min.css">
<script type="text/javascript" src="http://designmodo.github.io/Flat-UI/dist/js/flat-ui.min.js"></script>
<script type="text/javascript" src="http://designmodo.github.io/Flat-UI/docs/assets/js/application.js"></script>
<select class="form-control select select-exemploa" data-toggle="select">
<option value="0">Choose hero</option>
<option value="1">Spider Man</option>
<option value="2">Wolverine</option>
<option value="3">Captain America</option>
<option value="4" selected>X-Men</option>
<option value="5">Crocodile</option>
</select>
Hello, I tried to answer, but it seems that the js do
flat-ui
creates several hidden classes and it turns out that it gets really boring to modify anything. http://jsfiddle.net/bbuxtLkk/ - Just can’t tell which class modifies theoption
.– dHEKU
Thanks for trying @dHEKU. I think there is no way anyway, just using
less
should be possible, or changing by the color pattern (swatche). Anyway, I think your comment would be valid as a response.– gustavox
I don’t quite understand... In the jsFiddle example mentioned in the question, what you are trying to change is the background color that is now gray where it says
chose hero, spider man ... etc
, the color where the orange is or is the color of the dropdown arrow?– Chun
When you open select, the
xmen
in green, and when you hover over and then take away from select, the option that was when you left select is in green tbm. That’s mostly it... The color of the transition between options doesn’t even need...– gustavox
And in the example of fiddle already changed the color that appears default (was green)... The background color of tbm options doesn’t need to change, just this really annoying green. :-)
– gustavox
Anything like this? - http://jsfiddle.net/jg6wdvjy/
– Chun
Yes! That’s right! Put it there as an answer! Thanks!
– gustavox
So @Chun, if you’re excited, I just opened a $100 reward in this question. All for a more fun Friday night! :-)
– gustavox
Hehehe, I was just leaving when I came to this question. it’s already 5:00 in the morning here in Portugal xD tomorrow I see it, now I’m going to sleep. Hugs
– Chun