Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save FirstVertex/3ac54c58b5aa56fc6a9b to your computer and use it in GitHub Desktop.
Save FirstVertex/3ac54c58b5aa56fc6a9b to your computer and use it in GitHub Desktop.
Select2 with Primary selected item 4/4
/* http://www.cssportal.com/css-gradient-generator/ */
.select2-container-multi .select2-choices .select2-search-choice.select2-primary {
background-color: green;
border-color: green;
background-image: -ms-linear-gradient(top, #5CBD73 0%, #79EF70 50%, #24E23D 51%, #1F9C49 100%);
background-image: -moz-linear-gradient(top, #5CBD73 0%, #79EF70 50%, #24E23D 51%, #1F9C49 100%);
background-image: -o-linear-gradient(top, #5CBD73 0%, #79EF70 50%, #24E23D 51%, #1F9C49 100%);
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #5CBD73), color-stop(50, #79EF70), color-stop(51, #24E23D), color-stop(100, #1F9C49));
background-image: -webkit-linear-gradient(top, #5CBD73 0%, #79EF70 50%, #24E23D 51%, #1F9C49 100%);
background-image: linear-gradient(to bottom, #5CBD73 0%, #79EF70 50%, #24E23D 51%, #1F9C49 100%);
}
/* visibility is handled by JavaScript */
#TroopsPrimaryDisplay, #TroopsPrimaryDisplayNone {
display: none;
}
#TroopsPrimaryDisplayNone {
font-style: italic;
color: #888;
}
@FirstVertex
Copy link
Author

see here for all code

@FirstVertex
Copy link
Author

see here for full explanation on my Blog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment