##// END OF EJS Templates
select2: use wider search field, better UI.
marcink -
r2971:8d754972 default
parent child Browse files
Show More
@@ -1,222 +1,222 b''
1 1 // select2.less
2 2 // For use in RhodeCode application drop down select boxes;
3 3 // see style guide documentation for guidelines.
4 4
5 5
6 6 // SELECT2 DROPDOWN MENUS
7 7
8 8 //Select2 Dropdown
9 9 .select2-results{
10 10 .box-sizing(border-box);
11 11 overflow-y: scroll;
12 12 }
13 13
14 14 .select2-container{margin: 0; position: relative; display: inline-block; zoom: 1;}
15 15 .select2-container,
16 16 .select2-drop,
17 17 .select2-search,
18 18 .select2-search input {.box-sizing(border-box);}
19 19 .select2-container .select2-choice{display:block; line-height:1em; -webkit-touch-callout:none;-moz-user-select:none;-ms-user-select:none;user-select:none; }
20 20 .main .select2-container .select2-choice { background-color: white; }
21 21 .select2-container .select2-choice abbr { display: none; width: 12px; height: 12px; position: absolute; right: 24px; top: 8px; font-size: 1px; text-decoration: none; border: 0; background: url('../images/select2.png') right top no-repeat; cursor: pointer; outline: 0; }
22 22 .select2-container.select2-allowclear .select2-choice abbr {display: inline-block;}
23 23 .select2-container .select2-choice abbr:hover { background-position: right -11px; cursor: pointer; }
24 24 .select2-drop-mask { border: 0; margin: 0; padding: 0; position: fixed; left: 0; top: 0; min-height: 100%; min-width: 100%; height: auto; width: auto; opacity: 0; z-index: 998; background-color: #fff; filter: alpha(opacity=0); }
25 25 .select2-drop { width: 100%; margin-top: -1px; position: absolute; z-index: 999; top: 100%; background: #fff; color: #000; border: @border-thickness solid @rcblue; border-top: 0; border-radius: 0 0 @border-radius @border-radius; }
26 26 .select2-drop.select2-drop-above { margin-top: 1px; border-top: @border-thickness solid @rclightblue; border-bottom: 0; border-radius: @border-radius @border-radius 0 0; }
27 27 .select2-drop-active { border: @border-thickness solid #5897fb; border-top: none; }
28 28 .select2-drop.select2-drop-above.select2-drop-active {border-top: @border-thickness solid #5897fb;}
29 29 .select2-drop-auto-width { border-top: @border-thickness solid #aaa; width: auto; }
30 30 .select2-drop-auto-width .select2-search {padding-top: 4px;}
31 31 html[dir="rtl"] .select2-container .select2-choice .select2-arrow { left: 0; right: auto; border-left: none; border-right: @border-thickness solid @grey5; border-radius: @border-radius 0 0 @border-radius; }
32 32 html[dir="rtl"] .select2-container .select2-choice .select2-arrow b {background-position: 2px 1px;}
33 33 .select2-search { display: inline-block; width: 100%; min-height: 26px; margin: 0; padding-left: 4px; padding-right: 4px; position: relative; z-index: 1000; white-space: nowrap; }
34 34 .select2-search input { width: 100%; height: auto !important; min-height: 26px; padding: 4px 20px 4px 5px; margin: 0; outline: 0; }
35 35 html[dir="rtl"] .select2-search input { padding: 4px 5px 4px 20px; background: #fff url('../images/select2.png') no-repeat -37px -22px; }
36 36 .select2-drop.select2-drop-above .select2-search input {margin-top: 4px;}
37 37 .select2-dropdown-open .select2-choice .select2-arrow { background: transparent; border-left: none; filter: none; }
38 38 html[dir="rtl"] .select2-dropdown-open .select2-choice .select2-arrow {border-right: none;}
39 39 .select2-hidden-accessible { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
40 40 /* results */
41 41 .select2-results { max-height: 200px; padding: 0 0 0 4px; margin: 4px 4px 4px 0; position: relative; overflow-x: hidden; overflow-y: auto; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); }
42 42 html[dir="rtl"] .select2-results { padding: 0 4px 0 0; margin: 4px 0 4px 4px; }
43 43 .select2-results .select2-disabled{background:@grey6;display:list-item;cursor:default}
44 44 .select2-results .select2-selected{display:none}
45 45 .select2-more-results.select2-active{background:#f4f4f4 url('../images/select2-spinner.gif') no-repeat 100%}
46 46 .select2-container.select2-container-disabled .select2-choice abbr{display:none}
47 47 .select2-container.select2-container-disabled {background:@grey6;cursor:default}
48 48 .select2-container.select2-container-disabled .select2-choice {background:@grey6;cursor:default}
49 49 .select2-container-multi .select2-choices li{float:left;list-style:none}
50 50 .select2-container-multi .select2-choices .select2-search-field{margin:0;padding:0;white-space:nowrap}
51 51 .select2-container-multi .select2-choices .select2-search-choice .select2-chosen{cursor:default}
52 52 .select2-search-choice-close{display:block;width:12px;height:13px;position:absolute;right:3px;top:4px;font-size:1px;outline:none;background:url('../images/select2.png') right top no-repeat}
53 53 .select2-container-multi .select2-search-choice-close{left:3px}
54 54 .select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:hover{background-position:right -11px}
55 55 .select2-container-multi .select2-choices .select2-search-choice-focus .select2-search-choice-close{background-position:right -11px}
56 56 .select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice .select2-search-choice-close{display:none;background:none}
57 57 .select2-offscreen,.select2-offscreen:focus{clip:rect(0 0 0 0) !important;width:1px !important;height:1px !important;
58 58 border:0 !important;margin:0 !important;padding:0 !important;overflow:hidden !important;
59 59 position: absolute !important;outline:0 !important;left:0 !important;top:0 !important}
60 60 .select2-display-none,
61 61 .select2-search-hidden {display:none}
62 62 .select2-search input { border-color: @rclightblue; }
63 63
64 64 .select2-measure-scrollbar{position:absolute;top:-10000px;left:-10000px;width:100px;height:100px;overflow:scroll}
65 65 @media only screen and (-webkit-min-device-pixel-ratio:1.5),
66 66 only screen and (min-resolution:144dpi){
67 67 .select2-search input,
68 68 .select2-search-choice-close,
69 69 .select2-container .select2-choice abbr,
70 70 .select2-container .select2-choice .select2-arrow b{background-image:url('../images/select2x2.png');background-repeat:no-repeat;background-size:60px 40px;}
71 71 .select2-search input{background-position:100% -21px}
72 72 }
73 73 [class^="input-"] [class^="select2-choice"]>div{display:none}
74 74 [class^="input-"] .select2-offscreen{position:absolute}
75 75 select.select2{height:28px;visibility:hidden}
76 76 .autocomplete-suggestions{overflow:auto}
77 77 .autocomplete-suggestion{white-space:nowrap;overflow:hidden}
78 78
79 79 /* Retina-ize icons */
80 80 @media only screen and (-webkit-min-device-pixel-ratio:1.5),
81 81 only screen and (min-resolution:144dpi){
82 82 .select2-search input,
83 83 .select2-search-choice-close,
84 84 .select2-container .select2-choice abbr,
85 85 .select2-container .select2-choice .select2-arrow b{background-image:url('../images/select2x2.png');background-repeat:no-repeat;background-size:60px 40px;}
86 86 .select2-search input{background-position:100% -21px}
87 87 }
88 88
89 89 //Internal Select2 Dropdown Menus
90 90
91 91 .drop-menu-core {
92 92 min-width: 160px;
93 93 margin: 0 @padding 0 0;
94 94 padding: 0;
95 95 border: @border-thickness solid @rcblue;
96 96 border-radius: @border-radius;
97 97 color: @rcblue;
98 98 background-color: white;
99 99 }
100 100
101 101 .drop-menu-dropdown {
102 102 .drop-menu-core;
103 103
104 104 .flag_status {
105 105 margin-top: 0;
106 106 }
107 107 }
108 108
109 109 .drop-menu-base {
110 110 .drop-menu-core;
111 111 position: relative;
112 112 display: inline-block;
113 113 line-height: 1em;
114 114 z-index: 2;
115 115 cursor: pointer;
116 116
117 117 .flag_status {
118 118 margin-top: 0;
119 119 }
120 120
121 121 a {
122 122 display:block;
123 123 padding: .9em;
124 124 padding-right: 2em;
125 125 position: relative;
126 126
127 127 &:after {
128 128 position: absolute;
129 129 content: "\00A0\25BE";
130 130 right: .6em;
131 131 line-height: 1em;
132 132 top: 0.9em;
133 133 width: 1em;
134 134 font-size: 1em;
135 135 }
136 136 }
137 137 }
138 138
139 139 .drop-menu {
140 140 .drop-menu-base;
141 141 width: auto !important;
142 142 }
143 143
144 144 .drop-menu-no-width {
145 145 .drop-menu-base;
146 146 width: auto;
147 147 }
148 148
149 149 .field-sm .drop-menu {
150 150 padding: 1px 0 0 0;
151 151 a {
152 152 padding: 6px;
153 153 };
154 154 }
155 155
156 156 .select2-search input {
157 width: auto !important;
158 margin: .5em;
157 width: 100%;
158 margin: .5em 0;
159 159 padding: .5em;
160 160 }
161 161
162 162 .select2-no-results {
163 163 padding: .5em;
164 164 }
165 165
166 166 .drop-menu-dropdown ul {
167 167 width: auto;
168 168 margin: 0;
169 169 padding: 0;
170 170 z-index: 50;
171 171
172 172 li {
173 173 margin: 0;
174 174 line-height: 1em;
175 175 list-style-type: none;
176 176
177 177 &:before { content: none; }
178 178
179 179 &:hover,
180 180 &.select2-highlighted {
181 181 background-color: @rclightblue;
182 182 }
183 183
184 184 &.select2-result-with-children {
185 185 &:hover {
186 186 background-color: white;
187 187 }
188 188 }
189 189
190 190 .select2-result-label {
191 191 display:block;
192 192 padding: 8px;
193 193 font-family: @text-regular;
194 194 border-bottom: @border-thickness solid @rclightblue;
195 195 color: @rcblue;
196 196 cursor: pointer;
197 197 }
198 198 &.select2-result-with-children {
199 199
200 200 .select2-result-label {
201 201 font-family: @text-semibold;
202 202 color: @rcdarkblue;
203 203 cursor: default;
204 204 }
205 205
206 206 ul.select2-result-sub li .select2-result-label {
207 207 padding-left: 16px;
208 208 font-family: @text-regular;
209 209 color: @rcblue;
210 210 cursor: pointer;
211 211 }
212 212 }
213 213 }
214 214 }
215 215
216 216 .side-by-side-selector {
217 217 .left-group,
218 218 .middle-group,
219 219 .right-group {
220 220 margin-bottom: @padding;
221 221 }
222 222 }
General Comments 0
You need to be logged in to leave comments. Login now