-
-
Save virtualstaticvoid/3024935 to your computer and use it in GitHub Desktop.
overwrite chosen styling to look like bootstrap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* add this to your own css file, | |
* to overwrite the _chosen_ styling, to look more like bootstrap! | |
* | |
* note: for the error part to work, an .error class-name must be added | |
* to a wrapping DIV, to display the bootstrap error styling. I have | |
* just use the wrapping .control-group DIV | |
* | |
* credit: Rasmus Burkal, @rabu81 | |
*/ | |
ul.chzn-choices { | |
-webkit-transition: border linear 0.2s, box-shadow linear 0.2s; | |
-moz-transition: border linear 0.2s, box-shadow linear 0.2s; | |
-ms-transition: border linear 0.2s, box-shadow linear 0.2s; | |
-o-transition: border linear 0.2s, box-shadow linear 0.2s; | |
transition: border linear 0.2s, box-shadow linear 0.2s; | |
} | |
div.error div.controls div.chzn-container ul.chzn-choices { | |
border-color: #B94A48; | |
} | |
div.error div.controls div.chzn-container-active ul.chzn-choices { | |
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(185, 74, 72, 0.6); | |
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(185, 74, 72, 0.6); | |
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(185, 74, 72, 0.6); | |
} | |
div.controls ul.chzn-choices { | |
border-color: #ccc; | |
-webkit-border-radius: 3px; | |
-moz-border-radius: 3px; | |
border-radius: 3px; | |
} | |
div.chzn-container-active ul.chzn-choices { | |
border-color: rgba(82, 168, 236, 0.8); | |
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); | |
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); | |
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment