vue-languages-dropdown
Version:
Vue Languages dropdown component with search functionality
184 lines (173 loc) • 3.25 kB
CSS
.languages-dropdown-container
{
font-family: 'Arial';
font-size: 14px;
font-weight:600px;
text-transform: uppercase;
}
.dropdown
{
position: relative;
display: inline-block;
}
.dropbtn
{
background-color: #ff6863;
color: white;
padding: 10px 10px;
border: none;
cursor: pointer;
display: block;
width: 100%;
min-width: 232px;
background-image: url(../images/down.png);
background-size: 16px 16px;
background-position: 92% 10px;
background-repeat: no-repeat;
}
.dropbtn:hover, .dropbtn:focus
{
background-color:#ed4c46;
}
.search-input
{
text-transform: none;
border-box: box-sizing;
background-image: url(../images/searchicon.png);
background-size: 16px 16px;
background-position: 5px 9px;
background-repeat: no-repeat;
background-size: 16px 16px;
padding: 9px 10px 9px 30px;
border: 1px solid #ddd;
display: none;
min-width: 232px;
transition: all 0.3s ease-in-out 0s, visibility 0s linear 0.3s, z-index 0s linear 0.01s;
}
.search-input:focus
{
outline: 3px solid #ddd;
}
.dropdown-content
{
transition: all 0.2s;
display: none;
position: absolute;
background-color: #fff;
min-width: 230px;
overflow: auto;
border: 1px solid #ddd;
z-index: 1;
max-height: 250px;
transition: all 0.3s ease-in-out 0s, visibility 0s linear 0.3s, z-index 0s linear 0.01s;
}
.dropdown-content a
{
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
border-bottom: 1px solid #ddd;
cursor: pointer;
width: 100%
}
.lang-item
{
width: 125px;
white-space: nowrap;
overflow: hidden;
padding-left: 3px;
text-overflow: ellipsis;
text-align: left;
}
.dropdown a:hover
{
background-color: #ddd;
}
.selected-lang-text
{
width: 85%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.show
{
display: block;
}
.hide
{
display: none;
}
.dropdown:hover .dropdown-content, .dropdown:hover .search-input
{
display: block;
transition-delay: 0s, 0s, 0.3s;
}
/* CUSTOM SCROLLBAR */
::-webkit-scrollbar {
width:10px;
background-color: #F5F5F5;
}
::-webkit-scrollbar-thumb {
background-color: #AAA;
border-radius: 10px;
min-height: 30px;
background-image: -webkit-linear-gradient(90deg,
rgba(0, 0, 0, .4) 0.5%,
transparent 25%,
transparent 0%,
rgba(0, 0, 0, .2) 50%,
rgba(0, 0, 0, .2) 75%,
transparent 5%,
transparent)
}
::-webkit-scrollbar-thumb:hover {
background: #AAA;
}
/*FOR FLAGS*/
.wrapper {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.wrapper-box {
width: 42px;
overflow: hidden;
white-space: nowrap;
display: inline-block;
}
.scroll-btn
{
width: 16px;
float: left;
margin-right: 6px;
text-align: center;
cursor: pointer;
display: inline-block;
color: black;
}
.scroll-btn:hover
{
background: #4f4b4b;
border-radius: 50%;
}
.float-left
{
float: left;
}
.float-right
{
float: right;
}
.right-container
{
width: 87px;
float: right;
margin-left: 5px;
}
.mr-5
{
margin-right: 5px;
}