Created
April 27, 2015 22:13
-
-
Save besimhu/ae874f2ea0a5bbc6fadb to your computer and use it in GitHub Desktop.
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
//================================= | |
// FORMSTONE - SELECTER | |
//================================= | |
.selecter { | |
display: block; | |
margin-right: 6px; | |
position: relative; | |
width: 100%; | |
float: left; | |
z-index: 1; | |
&:focus { | |
outline: none; | |
} | |
.page-contact & { | |
@include mq(medium) { | |
width: 74.60317%; | |
} | |
} | |
&.open .selecter-selected:after { | |
@include icon-font(tri-up); | |
} | |
.selecter-element { | |
*left: -999999px; | |
height: 100%; | |
left: 0; | |
position: absolute; | |
opacity: 0; | |
width: 100%; | |
z-index: -1; | |
} | |
.selecter-element, | |
.selecter-element:focus { | |
outline: none; | |
-webkit-tap-highlight-color: rgba(255, 255, 255, 0); | |
-webkit-tap-highlight-color: transparent; | |
} | |
.selecter-selected { | |
position: relative; | |
display: block; | |
background: #FFF; | |
color: #949494; | |
border: 1px solid #8d8d8d; | |
border-radius: 4px; | |
cursor: pointer; | |
@include font(proxima, 400); | |
font-size: 16px; | |
line-height: 1.3em; | |
padding: 14px 35px 12px 15px; | |
margin: 0; | |
overflow: hidden; | |
text-overflow: ellipsis; | |
white-space: nowrap; | |
z-index: 49; | |
outline: none; | |
@include font-smoothing; | |
transition: all 350ms $cubic; | |
&:hover { | |
border-color: $color-green; | |
color: $color-blue; | |
} | |
&:after { | |
@include icon-font(tri-down); | |
color: $color-green; | |
display: block; | |
width: 35px !important; | |
height: 46px !important; | |
background: #FFF; | |
position: absolute; | |
top: -2px; | |
right: 0; | |
font-size: em(20) !important; | |
line-height: 52px !important; | |
} | |
} | |
.selecter-options { | |
background-color: #fefefe; | |
display: none; | |
left: 0; | |
margin: 0; | |
max-height: 260px; | |
overflow: auto; | |
overflow-x: hidden; | |
padding: 0; | |
position: absolute; | |
top: 100%; | |
width: 100%; | |
*width: auto; | |
z-index: 50; | |
border: 1px solid rgba($color-grey, .6); | |
border-radius: 0 0 3px 3px; | |
box-shadow: none; | |
@include font(proxima, 400); | |
} | |
.selecter-group { | |
background: #F9F9F9; | |
border-bottom: 1px solid #e3e3e3; | |
color: $color-grey; | |
display: block; | |
font-size: 13px; | |
font-weight: 700; | |
padding: 5px 14px; | |
text-transform: uppercase; | |
} | |
.selecter-item { | |
background: #FFF; | |
color: $color-grey; | |
cursor: pointer; | |
display: block; | |
font-size: 14px; | |
margin: 0; | |
overflow: hidden; | |
padding: 8px 14px; | |
text-overflow: ellipsis; | |
width: 100%; | |
@include font-smoothing; | |
border-bottom: 1px solid rgba(204, 204, 204, 0.39); | |
line-height: 1.3em; | |
&.selected { | |
background: #EDEDED; | |
color: $color-blue; | |
&:hover { | |
background: #E0E0E0 !important; | |
} | |
} | |
&.disabled { | |
color: #999; | |
cursor: default; | |
} | |
&:first-child { | |
border-radius: 0; | |
} | |
&:last-child { | |
border-radius: 0 0 2px 2px; | |
border-bottom: 0; | |
} | |
} | |
} | |
@media screen and (min-width: 980px) { | |
.selecter .selecter-item:hover, | |
.selecter .selecter-item.selected:hover { | |
background-color: #f3f3f3; | |
} | |
.selecter .selecter-item.disabled:hover { | |
background-color: #fff; | |
} | |
.selecter:hover .selecter-selected { | |
background-color: #fff; | |
} | |
.selecter.disabled .selecter-item:hover { | |
background: #fff; | |
} | |
} | |
//-------------------------------- | |
// Open | |
//-------------------------------- | |
.selecter.open { | |
z-index: 3; | |
} | |
.selecter.open .selecter-selected { | |
border-color: $color-green; | |
color: $color-blue; | |
border-radius: 3px 3px 0 0; | |
z-index: 51; | |
} | |
.selecter.open .selecter-options { | |
border-top: 0; | |
border-color: $color-green; | |
} | |
.selecter.open .selecter-selected, | |
.selecter.focus .selecter-selected { | |
background-color: #fff; | |
} | |
//-------------------------------- | |
// 'Cover' Positioning | |
//-------------------------------- | |
.selecter.cover .selecter-options { | |
border-radius: 3px; | |
border-width: 1px; | |
top: 0; | |
} | |
.selecter.cover .selecter-options .selecter-item.first { | |
border-radius: 3px 3px 0 0; | |
} | |
.selecter.cover.open .selecter-selected { | |
border-radius: 3px 3px 0 0; | |
z-index: 49; | |
} | |
//-------------------------------- | |
// 'Bottom' Positioning | |
//-------------------------------- | |
.selecter.bottom .selecter-options { | |
border-width: 1px 1px 0; | |
bottom: 100%; | |
top: auto; | |
} | |
.selecter.bottom .selecter-item:last-child { | |
border: none; | |
} | |
.selecter.bottom.open .selecter-selected { | |
border-radius: 0 0 3px 3px; | |
} | |
.selecter.bottom.open .selecter-options { | |
border-radius: 3px 3px 0 0; | |
} | |
//-------------------------------- | |
// 'Bottom' + 'Cover' Positioning | |
//-------------------------------- | |
.selecter.bottom.cover .selecter-options { | |
bottom: 0; | |
top: auto; | |
} | |
.selecter.bottom.cover.open .selecter-selected { | |
border-radius: 3px; | |
} | |
.selecter.bottom.cover.open .selecter-options { | |
border-radius: 3px; | |
} | |
//-------------------------------- | |
// Multiple Selects | |
//-------------------------------- | |
.selecter.multiple .selecter-options { | |
border-radius: 3px; | |
border-width: 1px; | |
box-shadow: none; | |
display: block; | |
position: static; | |
width: 100%; | |
height: em(141); | |
} | |
//-------------------------------- | |
// 'Disabled' State | |
//-------------------------------- | |
.selecter.disabled .selecter-selected { | |
background: #fff; | |
border-color: #eee; | |
color: #ccc; | |
cursor: default; | |
} | |
.selecter.disabled .selecter-options { | |
background: #fff; | |
border-color: #eee; | |
} | |
.selecter.disabled .selecter-group, | |
.selecter.disabled .selecter-item { | |
border-color: #eee; | |
color: #ccc; | |
cursor: default; | |
} | |
.selecter.disabled .selecter-item.selected { | |
background: #fafafa; | |
} | |
//-------------------------------- | |
// Scroller Support | |
//-------------------------------- | |
.selecter .selecter-options.scroller { | |
overflow: hidden; | |
} | |
.selecter .selecter-options.scroller .scroller-content { | |
max-height: 260px; | |
padding: 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment