// The svg uris need to be converted to Base64 for the asset pipeline // minification. // // original white: // "data:image/svg+xml;utf8," // // original // "data:image/svg+xml;utf8," @import "atlas_assets/_mixins"; @import "atlas_assets/_variables"; .select-select { display: none; /* For when we are on a small touch device and want to use native controls */ -webkit-pointer-events: none; -moz-pointer-events: none; pointer-events: none; position: absolute; opacity: 0; } .select-element, .select-element:after, .select-element:before, .select-element *, .select-element *:after, .select-element *:before { @include box-sizing(border-box); } .select-element { position: absolute; display: none; &.select-open { display: block; } } .select-theme-atlas, .select-theme-atlas *, .select-theme-atlas *:after, .select-theme-atlas *:before { @include box-sizing(border-box); } .select.select-theme-atlas { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none; } .select.select-theme-atlas .select-content { @include border-radius($defaultBorderRadius); -webkit-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); -moz-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); background: $white; font-family: inherit; color: inherit; overflow: auto; max-width: 18rem; max-height: 18rem; -webkit-overflow-scrolling: touch; } @media (max-width: 27rem), (max-height: 27rem) { .select.select-theme-atlas .select-content { max-width: 11.25rem; max-height: 11.25rem; } } .select.select-theme-atlas .select-options { -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-touch-callout: none; margin: 0; padding: 0; } .select.select-theme-atlas .select-options .select-option { -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-touch-callout: none; position: relative; list-style: none; margin: 0; line-height: 1.25rem; padding: 0.5rem 1em 0.5rem 2.5em; display: block; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .select.select-theme-atlas .select-options .select-option.select-option-selected:before { content: url("data:image/svg+xml;utf8;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPScxMDAlJyBoZWlnaHQ9JzEwMCUnIHZpZXdCb3g9Jy0wLjUgMCAyMCAxNSc+PHJlY3QgZmlsbD0nIzQ0NDQ0NCcgc3Ryb2tlPSdub25lJyB0cmFuc2Zvcm09J3JvdGF0ZSg0NSA0LjAwMzMgOC44NzQzNiknIGhlaWdodD0nNScgd2lkdGg9JzYuMzIzMDQnIHk9JzYuMzc0MzYnIHg9JzAuODQxNzgnPjwvcmVjdD48cmVjdCBmaWxsPScjNDQ0NDQ0JyBzdHJva2U9J25vbmUnIHRyYW5zZm9ybT0ncm90YXRlKDQ1IDExLjE3NzYgNy43MDY2KScgd2lkdGg9JzUnIGhlaWdodD0nMTYuNzk3NTYnIHk9Jy0wLjY5MjE4JyB4PSc4LjY3NzY0Jz48L3JlY3Q+PC9zdmc+"); position: absolute; left: 1em; top: 0; bottom: 0.2em; height: 1em; width: 1em; margin: auto; } .select.select-theme-atlas .select-options .select-option:hover, .select.select-theme-atlas .select-options .select-option.select-option-highlight { background: $blue; color: white; } .select.select-theme-atlas .select-options .select-option:hover.select-option-selected:before, .select.select-theme-atlas .select-options .select-option.select-option-highlight.select-option-selected:before { content: url("data:image/svg+xml;utf8;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPScxMDAlJyBoZWlnaHQ9JzEwMCUnIHZpZXdCb3g9Jy0wLjUgMCAyMCAxNSc+PHJlY3QgZmlsbD0nd2hpdGUnIHN0cm9rZT0nbm9uZScgdHJhbnNmb3JtPSdyb3RhdGUoNDUgNC4wMDMzIDguODc0MzYpJyBoZWlnaHQ9JzUnIHdpZHRoPSc2LjMyMzA0JyB5PSc2LjM3NDM2JyB4PScwLjg0MTc4Jz48L3JlY3Q+PHJlY3QgZmlsbD0nd2hpdGUnIHN0cm9rZT0nbm9uZScgdHJhbnNmb3JtPSdyb3RhdGUoNDUgMTEuMTc3NiA3LjcwNjYpJyB3aWR0aD0nNScgaGVpZ2h0PScxNi43OTc1NicgeT0nLTAuNjkyMTgnIHg9JzguNjc3NjQnPjwvcmVjdD48L3N2Zz4="); } .select.select-theme-atlas .select-options .select-option:first-child { @include border-radius($defaultBorderRadius $defaultBorderRadius 0 0); } .select.select-theme-atlas .select-options .select-option:last-child { @include border-radius(0 0 $defaultBorderRadius $defaultBorderRadius); } .select-target.select-theme-atlas { display: -moz-inline-stack; display: inline-block; vertical-align: middle; *vertical-align: auto; zoom: 1; *display: inline; @include border-radius($defaultBorderRadius); -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-touch-callout: none; position: relative; padding: 0.5rem 3em 0.5rem 1em; background: $defaultBackgroundColor; border: 1px solid #dddddd; cursor: pointer; color: #444444; text-decoration: none; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; &.select-theme-atlas:hover { border-color: #aaaaaa; color: black; } &.select-theme-atlas.select-target-focused, &.select-theme-atlas.select-target-focused:focus { border-color: $blue; outline: none; } &.select-theme-atlas b { position: absolute; right: 1em; top: 0; bottom: 0; margin: auto; height: 1.25rem; width: 2em; &:before, &:after { content: ""; display: block; position: absolute; margin: auto; right: 0; height: 0; width: 0; border: 0.263em solid transparent; } &:before { top: 0; border-bottom-color: inherit; } &:after { bottom: 0; border-top-color: inherit; } } }