|
| 1 | +div.fancy-select { |
| 2 | + position: relative; |
| 3 | + color: #eeeeee; |
| 4 | +} |
| 5 | + |
| 6 | +div.fancy-select.disabled { |
| 7 | + opacity: 0.5; |
| 8 | +} |
| 9 | + |
| 10 | +div.fancy-select select:focus + div.trigger { |
| 11 | + box-shadow: 0 0 0 2px #4B5468; |
| 12 | +} |
| 13 | + |
| 14 | +div.fancy-select select:focus + div.trigger.open { |
| 15 | + box-shadow: none; |
| 16 | +} |
| 17 | + |
| 18 | +div.fancy-select div.trigger { |
| 19 | + border-radius: 4px; |
| 20 | + cursor: pointer; |
| 21 | + padding: 10px 24px 9px 9px; |
| 22 | + white-space: nowrap; |
| 23 | + overflow: hidden; |
| 24 | + text-overflow: ellipsis; |
| 25 | + position: relative; |
| 26 | + background: #99A5BE; |
| 27 | + border: 1px solid #99A5BE; |
| 28 | + border-top-color: #A5B2CB; |
| 29 | + color: #4B5468; |
| 30 | + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); |
| 31 | + |
| 32 | + transition: all 240ms ease-out; |
| 33 | + -webkit-transition: all 240ms ease-out; |
| 34 | + -moz-transition: all 240ms ease-out; |
| 35 | + -ms-transition: all 240ms ease-out; |
| 36 | + -o-transition: all 240ms ease-out; |
| 37 | +} |
| 38 | + |
| 39 | +div.fancy-select div.trigger:after { |
| 40 | + content: ""; |
| 41 | + display: block; |
| 42 | + position: absolute; |
| 43 | + width: 0; |
| 44 | + height: 0; |
| 45 | + top: 20px; |
| 46 | + right: 9px; |
| 47 | +} |
| 48 | + |
| 49 | +div.fancy-select div.trigger.open { |
| 50 | +} |
| 51 | + |
| 52 | +div.fancy-select ul.options { |
| 53 | + list-style: none; |
| 54 | + margin: 0; |
| 55 | + position: absolute; |
| 56 | + top: 40px; |
| 57 | + left: 0; |
| 58 | + visibility: hidden; |
| 59 | + opacity: 0; |
| 60 | + z-index: 50; |
| 61 | + max-height: 200px; |
| 62 | + overflow: auto; |
| 63 | + background: #FFFFFF; |
| 64 | + border-radius: 4px; |
| 65 | + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); |
| 66 | + min-width: 100%; |
| 67 | + |
| 68 | + transition: opacity 300ms ease-out, top 300ms ease-out, visibility 300ms ease-out; |
| 69 | + -webkit-transition: opacity 300ms ease-out, top 300ms ease-out, visibility 300ms ease-out; |
| 70 | + -moz-transition: opacity 300ms ease-out, top 300ms ease-out, visibility 300ms ease-out; |
| 71 | + -ms-transition: opacity 300ms ease-out, top 300ms ease-out, visibility 300ms ease-out; |
| 72 | + -o-transition: opacity 300ms ease-out, top 300ms ease-out, visibility 300ms ease-out; |
| 73 | +} |
| 74 | + |
| 75 | +div.fancy-select ul.options.open { |
| 76 | + visibility: visible; |
| 77 | + top: 33px; |
| 78 | + opacity: 1; |
| 79 | + |
| 80 | + /* have to use a non-visibility transition to prevent this iOS issue (bug?): */ |
| 81 | + /*http://stackoverflow.com/questions/10736478/css-animation-visibility-visible-works-on-chrome-and-safari-but-not-on-ios*/ |
| 82 | + transition: opacity 300ms ease-out, top 300ms ease-out; |
| 83 | + -webkit-transition: opacity 300ms ease-out, top 300ms ease-out; |
| 84 | + -moz-transition: opacity 300ms ease-out, top 300ms ease-out; |
| 85 | + -ms-transition: opacity 300ms ease-out, top 300ms ease-out; |
| 86 | + -o-transition: opacity 300ms ease-out, top 300ms ease-out; |
| 87 | +} |
| 88 | + |
| 89 | +div.fancy-select ul.options.overflowing { |
| 90 | + top: auto; |
| 91 | + bottom: 40px; |
| 92 | + |
| 93 | + transition: opacity 300ms ease-out, bottom 300ms ease-out, visibility 300ms ease-out; |
| 94 | + -webkit-transition: opacity 300ms ease-out, bottom 300ms ease-out, visibility 300ms ease-out; |
| 95 | + -moz-transition: opacity 300ms ease-out, bottom 300ms ease-out, visibility 300ms ease-out; |
| 96 | + -ms-transition: opacity 300ms ease-out, bottom 300ms ease-out, visibility 300ms ease-out; |
| 97 | + -o-transition: opacity 300ms ease-out, bottom 300ms ease-out, visibility 300ms ease-out; |
| 98 | +} |
| 99 | + |
| 100 | +div.fancy-select ul.options.overflowing.open { |
| 101 | + top: auto; |
| 102 | + bottom: 50px; |
| 103 | + |
| 104 | + transition: opacity 300ms ease-out, bottom 300ms ease-out; |
| 105 | + -webkit-transition: opacity 300ms ease-out, bottom 300ms ease-out; |
| 106 | + -moz-transition: opacity 300ms ease-out, bottom 300ms ease-out; |
| 107 | + -ms-transition: opacity 300ms ease-out, bottom 300ms ease-out; |
| 108 | + -o-transition: opacity 300ms ease-out, bottom 300ms ease-out; |
| 109 | +} |
| 110 | + |
| 111 | +div.fancy-select ul.options li { |
| 112 | + padding: 8px 12px; |
| 113 | + color: #000000; |
| 114 | + cursor: pointer; |
| 115 | + white-space: nowrap; |
| 116 | + |
| 117 | + transition: all 150ms ease-out; |
| 118 | + -webkit-transition: all 150ms ease-out; |
| 119 | + -moz-transition: all 150ms ease-out; |
| 120 | + -ms-transition: all 150ms ease-out; |
| 121 | + -o-transition: all 150ms ease-out; |
| 122 | +} |
| 123 | + |
| 124 | +div.fancy-select ul.options li.selected { |
| 125 | + background-color: #dc5308; |
| 126 | + color: #FFFFFF; |
| 127 | +} |
| 128 | + |
| 129 | +div.fancy-select ul.options li.hover { |
| 130 | + |
| 131 | +} |
0 commit comments