Created
August 23, 2018 06:08
-
-
Save tienhieuD/a6674643dfc5a56b5e8e08ace663310c to your computer and use it in GitHub Desktop.
Select2 Custom CSS LESS
This file contains hidden or 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
// Select2 Custom | |
.select2-container--default .select2-selection--single { | |
height: 48px; | |
text-align: left; | |
} | |
.select2-container--default .select2-selection--single .select2-selection__rendered { | |
padding: 10px; | |
} | |
.select2-container--default .select2-selection--single .select2-selection__arrow { | |
top: 50%; | |
height: unset; | |
margin-top: -2px; | |
right: 8px; | |
} | |
.select2-container--default .select2-selection--single .select2-selection__arrow b { | |
border: none; | |
background-image: url(../img/home/[email protected]); | |
width: 12px; | |
height: 10px; | |
background-size: contain; | |
background-repeat: no-repeat; | |
} | |
.select2-dropdown.select2-dropdown--below { | |
width: 320px !important; | |
overflow: hidden; | |
border-radius: 4px; | |
border-color: #ddd; | |
@media @mobile { | |
width: 240px !important; | |
} | |
} | |
.select2-container--default .select2-search--dropdown .select2-search__field { | |
width: 90%; | |
height: 32px; | |
border-radius: 100px; | |
background-color: #f3f4f6; | |
outline: none; | |
border: none; | |
margin: 6px 12px; | |
background-image: url(../img/home/search-icon.png); | |
background-position: 10px center; | |
background-repeat: no-repeat; | |
font-size: 15px; | |
line-height: 1.6; | |
color: #8e9098; | |
padding: 4px 0 4px 40px; | |
} | |
.select2-container--default .select2-results__group { | |
background-color: #f3f4f6; | |
font-size: 14px; | |
font-weight: bold; | |
line-height: 1.57; | |
text-align: left; | |
color: #464850; | |
} | |
.select2-container--default .select2-results__option .select2-results__option { | |
font-size: 15px; | |
font-weight: normal; | |
font-style: normal; | |
font-stretch: normal; | |
line-height: 1.6; | |
letter-spacing: normal; | |
text-align: left; | |
color: #333333; | |
background-image: url(../img/4/locati2.png); | |
background-position: 16px center; | |
background-repeat: no-repeat; | |
padding: 12px; | |
padding-left: 56px; | |
} | |
.select2-container--default .select2-results__option--highlighted[aria-selected] { | |
color: #fff; | |
background-color: #3083ff; | |
background-color: linear-gradient(to right, #3083ff, #1566df); | |
} | |
.select2-container--default .select2-results>.select2-results__options { | |
&::-webkit-scrollbar { | |
width: 6px; | |
} | |
&::-webkit-scrollbar-track { | |
background: #FFF; | |
} | |
&::-webkit-scrollbar-thumb { | |
background: #ddd; | |
} | |
&::-webkit-scrollbar-thumb:hover { | |
background: #999; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment