trln-chosen-rails 1.8.7 → 1.20.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 799c2b94b78b9cebcc6dd504ce0203405ef03e2e75e806f316b74e627f79c355
4
- data.tar.gz: 3eff2a510a4dc00b1bc04a8ef083e36efc414898c3e19a802ad4b371ca4dce61
3
+ metadata.gz: dbccaeb6966ee1b87283dad24e1d155ef183effe27d1eb5f1413e937e5be5268
4
+ data.tar.gz: 6493be48d571118e87d180f971d5e5ecb32c6fc3f644631303e3c394a8f8c2de
5
5
  SHA512:
6
- metadata.gz: 4b4eca6cadd8ccd4fb62842632d3286a432314e816a61ea20f8cdeb7e1ad435c12b84bb01c7475ededc8d2a517859203fa44ccecdf596dbfb4272c648e4bd6aa
7
- data.tar.gz: e40d0b62872704a7035b33fd64dae00740befd81b4aab0aa9e26ef35b089caeec97bf4cf5324587869b802a52b896ec24981b60af72de258d731ad73fff0c648
6
+ metadata.gz: bde8e406a856c3bed3ed847410b9fd2a0f9273f4f8b5711a2f5a678b214cb5297cf09d41e8cb5601794962ff192356848cb1befda30769e4f26056267ed28a43
7
+ data.tar.gz: 34e5fc1822b90c471ef6b088aca9f2991885d159ccd4749f25739c81288b14e9be3089ccce944e3ddb03112e6d8f52b42b1a2bad2fd6228eb8ec4f5dc792f38f
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
- # Chosen for rails asset pipeline
1
+ # Chosen for rails asset pipeline (TRLN fork)
2
2
 
3
3
  [Chosen](https://github.com/harvesthq/chosen) is a library for making long, unwieldy select boxes more user friendly.
4
4
 
5
- The `trln-hosen-rails` gem integrates the `Chosen` with the Rails asset pipeline. This project is a fork of the original `chosen-rails` which removes the dependency on the now deprecated `sass` gem.
5
+ The `trln-chosen-rails` gem integrates the `Chosen` with the Rails asset pipeline. This project is a fork of the original `chosen-rails` which removes the dependency on the now deprecated `sass` gem.
6
6
 
7
7
  ## Usage
8
8
 
@@ -10,12 +10,16 @@ The `trln-hosen-rails` gem integrates the `Chosen` with the Rails asset pipeline
10
10
 
11
11
  Include `trln-chosen-rails` in Gemfile
12
12
 
13
- ```rb
13
+ ```
14
14
  gem 'trln-chosen-rails'
15
15
  ```
16
16
 
17
17
  Then run `bundle install`
18
18
 
19
+ ### About JQuery
20
+
21
+ You can get jquery via [jquery-rails](https://github.com/rails/jquery-rails).
22
+
19
23
  Please consider [jquery-turbolinks](https://github.com/kossnocorp/jquery.turbolinks) if you have turbolinks issues for Rails 4 +.
20
24
 
21
25
  ### Include chosen javascript assets
@@ -23,12 +27,14 @@ Please consider [jquery-turbolinks](https://github.com/kossnocorp/jquery.turboli
23
27
  Add to your `app/assets/javascripts/application.js` if use with jQuery
24
28
 
25
29
  ```coffee
30
+ //= require jquery
26
31
  //= require chosen-jquery
27
32
  ```
28
33
 
29
34
  Or with Prototype
30
35
 
31
36
  ```coffee
37
+ //= require jquery
32
38
  //= require chosen-prototype
33
39
  ```
34
40
 
@@ -42,6 +48,12 @@ Add to your `app/assets/stylesheets/application.css`
42
48
 
43
49
  ### Enable chosen javascript by specific css class
44
50
 
51
+ For rails 6, remember to add `javascript_include_tag` in `app/views/layouts/application.html.erb`, like
52
+
53
+ ```ruby
54
+ <%= javascript_include_tag 'application' %>
55
+ ```
56
+
45
57
  Add to one coffee script file, like `scaffold.js.coffee`
46
58
 
47
59
  ```coffee
data/Rakefile CHANGED
@@ -9,7 +9,6 @@ task 'update-chosen', 'repository_url', 'branch' do |task, args|
9
9
  files = SourceFile.new
10
10
  files.fetch remote, branch
11
11
  files.eject_javascript_class_from_closure
12
- files.remove_compass_lines
13
12
  files.add_depend_on_asset
14
13
  files.change_url_to_image_url
15
14
  files.cleanup
@@ -1,9 +1,10 @@
1
1
  module Chosen
2
2
  module Rails
3
3
  class Engine < ::Rails::Engine
4
- config.assets.precompile += %w(
5
- chosen-sprite*.png
6
- )
4
+
5
+ initializer "chosen-rails.assets.precompile" do |app|
6
+ app.config.assets.precompile += %w( chosen-sprite*.png )
7
+ end
7
8
 
8
9
  rake_tasks do
9
10
  load 'chosen-rails/tasks.rake'
@@ -38,18 +38,18 @@ module Chosen
38
38
  id = "##{id}" unless from.start_with?('#')
39
39
  id = "#{id}_chosen" unless from.end_with?('_chosen')
40
40
 
41
- find(:css, id, options)
41
+ find(:css, id, **options)
42
42
  rescue Capybara::ElementNotFound
43
- label = find('label', { text: from }.merge(options))
43
+ label = find('label', **{ text: from }.merge(options))
44
44
 
45
- find(:css, "##{label[:for].underscore}_chosen", options)
45
+ find(:css, "##{label[:for].underscore}_chosen", **options)
46
46
  end
47
47
 
48
48
  def chosen_find_input(from, options)
49
49
  from = from.to_s
50
50
  from = "##{from}" unless from.start_with?('#')
51
51
 
52
- find(:css, from.underscore, options)
52
+ find(:css, from.underscore, **options)
53
53
  end
54
54
 
55
55
  def chosen_multiselect?(input)
@@ -31,14 +31,6 @@ class SourceFile < Thor
31
31
  end
32
32
  end
33
33
 
34
- desc 'remove compass lines', 'remove compass lines'
35
- def remove_compass_lines
36
- self.destination_root = 'vendor/assets'
37
- gsub_file 'stylesheets/chosen-base.scss', /^\s*\@include.*\n/, ''
38
- gsub_file 'stylesheets/chosen-base.scss', /^\@import.*\n/, ''
39
- # gsub_file 'stylesheets/chosen-base.scss', /\n(\$chosen-sprite:)/, '\1'
40
- end
41
-
42
34
  desc 'add depend_on_asset', 'add depend_on_asset'
43
35
  def add_depend_on_asset
44
36
  self.destination_root = 'vendor/assets'
@@ -1,6 +1,6 @@
1
1
  module Chosen
2
2
  module Rails
3
- VERSION = '1.8.7'
3
+ VERSION = '1.20.0'
4
4
  CHOSEN_VERSION = '1.8.7'
5
5
  end
6
6
  end
data/lib/chosen-rails.rb CHANGED
@@ -6,7 +6,7 @@ module Chosen
6
6
  end
7
7
 
8
8
  case ::Rails.version.to_s
9
- when /^(4|5)/
9
+ when /^(4|5|6|7)/
10
10
  require 'chosen-rails/engine'
11
11
  when /^3\.[12]/
12
12
  require 'chosen-rails/engine3'
@@ -18,8 +18,7 @@ Gem::Specification.new do |gem|
18
18
 
19
19
  gem.add_dependency 'railties', '>= 3.0'
20
20
  gem.add_dependency 'coffee-rails', '>= 3.2'
21
- gem.add_dependency 'sassc-rails', '>= 2.1'
22
-
21
+ gem.add_dependency 'sassc-rails', '>= 2.1.2'
23
22
  gem.add_development_dependency 'bundler', '>= 1.0'
24
23
  gem.add_development_dependency 'rails', '>= 3.0'
25
24
  gem.add_development_dependency 'thor', '>= 0.14'
@@ -1,59 +1,425 @@
1
- @import "chosen-base";
2
-
3
- //= depend_on_asset "chosen-sprite.png"
4
- //= depend_on_asset "chosen-sprite@2x.png"
5
-
6
1
  $chosen-sprite: image-url('chosen-sprite.png') !default;
7
2
  $chosen-sprite-retina: image-url('chosen-sprite@2x.png') !default;
8
3
 
4
+ /* @group Base */
9
5
  .chosen-container {
6
+ position: relative;
7
+ display: inline-block;
8
+ vertical-align: middle;
9
+ font-size: 13px;
10
10
  user-select: none;
11
11
  * {
12
12
  box-sizing: border-box;
13
13
  }
14
+ .chosen-drop {
15
+ position: absolute;
16
+ top: 100%;
17
+ z-index: 1010;
18
+ width: 100%;
19
+ border: 1px solid #aaa;
20
+ border-top: 0;
21
+ background: #fff;
22
+ box-shadow: 0 4px 5px rgba(#000,.15);
23
+ clip: rect(0,0,0,0);
24
+ clip-path: inset(100% 100%);
25
+ }
26
+ &.chosen-with-drop .chosen-drop {
27
+ clip: auto;
28
+ clip-path: none;
29
+ }
30
+ a{
31
+ cursor: pointer;
32
+ }
33
+
34
+ .search-choice, .chosen-single{
35
+ .group-name{
36
+ margin-right: 4px;
37
+ overflow: hidden;
38
+ white-space: nowrap;
39
+ text-overflow: ellipsis;
40
+ font-weight: normal;
41
+ color: #999999;
42
+ &:after {
43
+ content: ":";
44
+ padding-left: 2px;
45
+ vertical-align: top;
46
+ }
47
+ }
48
+ }
14
49
  }
50
+ /* @end */
15
51
 
16
- .chosen-container-single {
52
+ /* @group Single Chosen */
53
+ .chosen-container-single{
17
54
  .chosen-single {
55
+ position: relative;
56
+ display: block;
57
+ overflow: hidden;
58
+ padding: 0 0 0 8px;
59
+ height: 25px;
60
+ border: 1px solid #aaa;
61
+ border-radius: 5px;
62
+ background-color: #fff;
18
63
  background: linear-gradient(#fff 20%, #f6f6f6 50%, #eee 52%, #f4f4f4 100%);
64
+ background-clip: padding-box;
65
+ box-shadow: 0 0 3px #fff inset, 0 1px 1px rgba(#000,.1);
66
+ color: #444;
67
+ text-decoration: none;
68
+ white-space: nowrap;
69
+ line-height: 24px;
70
+ }
71
+ .chosen-default {
72
+ color: #999;
73
+ }
74
+ .chosen-single span {
75
+ display: block;
76
+ overflow: hidden;
77
+ margin-right: 26px;
78
+ text-overflow: ellipsis;
79
+ white-space: nowrap;
80
+ }
81
+ .chosen-single-with-deselect span {
82
+ margin-right: 38px;
83
+ }
84
+ .chosen-single abbr {
85
+ position: absolute;
86
+ top: 6px;
87
+ right: 26px;
88
+ display: block;
89
+ width: 12px;
90
+ height: 12px;
91
+ background: $chosen-sprite -42px 1px no-repeat;
92
+ font-size: 1px;
93
+ &:hover {
94
+ background-position: -42px -10px;
95
+ }
96
+ }
97
+ &.chosen-disabled .chosen-single abbr:hover {
98
+ background-position: -42px -10px;
99
+ }
100
+ .chosen-single div {
101
+ position: absolute;
102
+ top: 0;
103
+ right: 0;
104
+ display: block;
105
+ width: 18px;
106
+ height: 100%;
107
+ b {
108
+ display: block;
109
+ width: 100%;
110
+ height: 100%;
111
+ background: $chosen-sprite no-repeat 0px 2px;
112
+ }
19
113
  }
20
114
  .chosen-search {
21
- background: $chosen-sprite no-repeat 100% -20px;
115
+ position: relative;
116
+ z-index: 1010;
117
+ margin: 0;
118
+ padding: 3px 4px;
119
+ white-space: nowrap;
120
+
121
+ input[type="text"] {
122
+ margin: 1px 0;
123
+ padding: 4px 20px 4px 5px;
124
+ width: 100%;
125
+ height: auto;
126
+ outline: 0;
127
+ border: 1px solid #aaa;
128
+ background: $chosen-sprite no-repeat 100% -20px;
129
+ font-size: 1em;
130
+ font-family: sans-serif;
131
+ line-height: normal;
132
+ border-radius: 0;
133
+ }
134
+ }
135
+ .chosen-drop {
136
+ margin-top: -1px;
137
+ border-radius: 0 0 4px 4px;
138
+ background-clip: padding-box;
139
+ }
140
+ &.chosen-container-single-nosearch .chosen-search {
141
+ position: absolute;
142
+ clip: rect(0,0,0,0);
143
+ clip-path: inset(100% 100%);
22
144
  }
23
145
  }
146
+ /* @end */
24
147
 
148
+ /* @group Results */
25
149
  .chosen-container .chosen-results {
150
+ color: #444;
151
+ position: relative;
152
+ overflow-x: hidden;
153
+ overflow-y: auto;
154
+ margin: 0 4px 4px 0;
155
+ padding: 0 0 0 4px;
156
+ max-height: 240px;
157
+ -webkit-overflow-scrolling: touch;
26
158
  li {
159
+ display: none;
160
+ margin: 0;
161
+ padding: 5px 6px;
162
+ list-style: none;
163
+ line-height: 15px;
164
+ word-wrap: break-word;
165
+ -webkit-touch-callout: none;
166
+ &.active-result {
167
+ display: list-item;
168
+ cursor: pointer;
169
+ }
170
+ &.disabled-result {
171
+ display: list-item;
172
+ color: #ccc;
173
+ cursor: default;
174
+ }
27
175
  &.highlighted {
176
+ background-color: #3875d7;
28
177
  background-image: linear-gradient(#3875d7 20%, #2a62bc 90%);
178
+ color: #fff;
179
+ }
180
+ &.no-results {
181
+ color: #777;
182
+ display: list-item;
183
+ background: #f4f4f4;
184
+ }
185
+ &.group-result {
186
+ display: list-item;
187
+ font-weight: bold;
188
+ cursor: default;
189
+ }
190
+ &.group-option {
191
+ padding-left: 15px;
192
+ }
193
+ em {
194
+ font-style: normal;
195
+ text-decoration: underline;
29
196
  }
30
197
  }
31
198
  }
199
+ /* @end */
32
200
 
33
- .chosen-container-multi {
201
+ /* @group Multi Chosen */
202
+ .chosen-container-multi{
34
203
  .chosen-choices {
204
+ position: relative;
205
+ overflow: hidden;
206
+ margin: 0;
207
+ padding: 0 5px;
208
+ width: 100%;
209
+ height: auto;
210
+ border: 1px solid #aaa;
211
+ background-color: #fff;
35
212
  background-image: linear-gradient(#eee 1%, #fff 15%);
213
+ cursor: text;
36
214
  }
37
215
  .chosen-choices li {
216
+ float: left;
217
+ list-style: none;
218
+ &.search-field {
219
+ margin: 0;
220
+ padding: 0;
221
+ white-space: nowrap;
222
+ input[type="text"] {
223
+ margin: 1px 0;
224
+ padding: 0;
225
+ height: 25px;
226
+ outline: 0;
227
+ border: 0 !important;
228
+ background: transparent !important;
229
+ box-shadow: none;
230
+ color: #999;
231
+ font-size: 100%;
232
+ font-family: sans-serif;
233
+ line-height: normal;
234
+ border-radius: 0;
235
+ width: 25px;
236
+ }
237
+ }
38
238
  &.search-choice {
239
+ position: relative;
240
+ margin: 3px 5px 3px 0;
241
+ padding: 3px 20px 3px 5px;
242
+ border: 1px solid #aaa;
243
+ max-width: 100%;
244
+ border-radius: 3px;
245
+ background-color: #eeeeee;
39
246
  background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
247
+ background-size: 100% 19px;
248
+ background-repeat: repeat-x;
249
+ background-clip: padding-box;
250
+ box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(#000,.05);
251
+ color: #333;
252
+ line-height: 13px;
253
+ cursor: default;
254
+ span {
255
+ word-wrap: break-word;
256
+ }
257
+ .search-choice-close {
258
+ position: absolute;
259
+ top: 4px;
260
+ right: 3px;
261
+ display: block;
262
+ width: 12px;
263
+ height: 12px;
264
+ background: $chosen-sprite -42px 1px no-repeat;
265
+ font-size: 1px;
266
+ &:hover {
267
+ background-position: -42px -10px;
268
+ }
269
+ }
40
270
  }
41
271
  &.search-choice-disabled {
272
+ padding-right: 5px;
273
+ border: 1px solid #ccc;
274
+ background-color: #e4e4e4;
42
275
  background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
276
+ color: #666;
277
+ }
278
+ &.search-choice-focus {
279
+ background: #d4d4d4;
280
+ .search-choice-close {
281
+ background-position: -42px -10px;
282
+ }
43
283
  }
44
284
  }
285
+ .chosen-results {
286
+ margin: 0;
287
+ padding: 0;
288
+ }
289
+ .chosen-drop .result-selected {
290
+ display: list-item;
291
+ color: #ccc;
292
+ cursor: default;
293
+ }
45
294
  }
295
+ /* @end */
46
296
 
47
- .chosen-container-active {
297
+ /* @group Active */
298
+ .chosen-container-active{
299
+ .chosen-single {
300
+ border: 1px solid #5897fb;
301
+ box-shadow: 0 0 5px rgba(#000,.3);
302
+ }
48
303
  &.chosen-with-drop{
49
304
  .chosen-single {
305
+ border: 1px solid #aaa;
306
+ -moz-border-radius-bottomright: 0;
307
+ border-bottom-right-radius: 0;
308
+ -moz-border-radius-bottomleft: 0;
309
+ border-bottom-left-radius: 0;
50
310
  background-image: linear-gradient(#eee 20%, #fff 80%);
311
+ box-shadow: 0 1px 0 #fff inset;
312
+ }
313
+ .chosen-single div {
314
+ border-left: none;
315
+ background: transparent;
316
+ b {
317
+ background-position: -18px 2px;
318
+ }
319
+ }
320
+ }
321
+ .chosen-choices {
322
+ border: 1px solid #5897fb;
323
+ box-shadow: 0 0 5px rgba(#000,.3);
324
+ li.search-field input[type="text"] {
325
+ color: #222 !important;
51
326
  }
52
327
  }
53
328
  }
329
+ /* @end */
330
+
331
+ /* @group Disabled Support */
332
+ .chosen-disabled {
333
+ opacity: 0.5 !important;
334
+ cursor: default;
335
+ .chosen-single {
336
+ cursor: default;
337
+ }
338
+ .chosen-choices .search-choice .search-choice-close {
339
+ cursor: default;
340
+ }
341
+ }
342
+ /* @end */
54
343
 
344
+ /* @group Right to Left */
55
345
  .chosen-rtl {
346
+ text-align: right;
347
+ .chosen-single {
348
+ overflow: visible;
349
+ padding: 0 8px 0 0;
350
+ }
351
+ .chosen-single span {
352
+ margin-right: 0;
353
+ margin-left: 26px;
354
+ direction: rtl;
355
+ }
356
+ .chosen-single-with-deselect span {
357
+ margin-left: 38px;
358
+ }
359
+ .chosen-single div {
360
+ right: auto;
361
+ left: 3px;
362
+ }
363
+ .chosen-single abbr {
364
+ right: auto;
365
+ left: 26px;
366
+ }
367
+ .chosen-choices li {
368
+ float: right;
369
+ &.search-field input[type="text"] {
370
+ direction: rtl;
371
+ }
372
+ &.search-choice {
373
+ margin: 3px 5px 3px 0;
374
+ padding: 3px 5px 3px 19px;
375
+ .search-choice-close {
376
+ right: auto;
377
+ left: 4px;
378
+ }
379
+ }
380
+ }
381
+ &.chosen-container-single .chosen-results {
382
+ margin: 0 0 4px 4px;
383
+ padding: 0 4px 0 0;
384
+ }
385
+ .chosen-results li.group-option {
386
+ padding-right: 15px;
387
+ padding-left: 0;
388
+ }
389
+ &.chosen-container-active.chosen-with-drop .chosen-single div {
390
+ border-right: none;
391
+ }
56
392
  .chosen-search input[type="text"] {
393
+ padding: 4px 5px 4px 20px;
57
394
  background: $chosen-sprite no-repeat -30px -20px;
395
+ direction: rtl;
396
+ }
397
+ &.chosen-container-single{
398
+ .chosen-single div b {
399
+ background-position: 6px 2px;
400
+ }
401
+ &.chosen-with-drop{
402
+ .chosen-single div b {
403
+ background-position: -12px 2px;
404
+ }
405
+ }
406
+ }
407
+ }
408
+
409
+ /* @end */
410
+
411
+ /* @group Retina compatibility */
412
+ @media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 144dpi), only screen and (min-resolution: 1.5dppx) {
413
+ .chosen-rtl .chosen-search input[type="text"],
414
+ .chosen-container-single .chosen-single abbr,
415
+ .chosen-container-single .chosen-single div b,
416
+ .chosen-container-single .chosen-search input[type="text"],
417
+ .chosen-container-multi .chosen-choices .search-choice .search-choice-close,
418
+ .chosen-container .chosen-results-scroll-down span,
419
+ .chosen-container .chosen-results-scroll-up span {
420
+ background-image: $chosen-sprite-retina !important;
421
+ background-size: 52px 37px !important;
422
+ background-repeat: no-repeat !important;
58
423
  }
59
424
  }
425
+ /* @end */
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trln-chosen-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.7
4
+ version: 1.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tse-Ching Ho
8
8
  - Adam Constabaris
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-04-25 00:00:00.000000000 Z
12
+ date: 2024-01-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
@@ -45,14 +45,14 @@ dependencies:
45
45
  requirements:
46
46
  - - ">="
47
47
  - !ruby/object:Gem::Version
48
- version: '2.1'
48
+ version: 2.1.2
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - ">="
54
54
  - !ruby/object:Gem::Version
55
- version: '2.1'
55
+ version: 2.1.2
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: bundler
58
58
  requirement: !ruby/object:Gem::Requirement
@@ -127,13 +127,12 @@ files:
127
127
  - vendor/assets/javascripts/lib/abstract-chosen.coffee
128
128
  - vendor/assets/javascripts/lib/select-parser.coffee
129
129
  - vendor/assets/stylesheets/chosen-base.scss
130
- - vendor/assets/stylesheets/chosen-compass.scss
131
130
  - vendor/assets/stylesheets/chosen.scss
132
131
  homepage: https://github.com/trln/chosen-rails
133
132
  licenses:
134
133
  - MIT
135
134
  metadata: {}
136
- post_install_message:
135
+ post_install_message:
137
136
  rdoc_options: []
138
137
  require_paths:
139
138
  - lib
@@ -148,8 +147,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
148
147
  - !ruby/object:Gem::Version
149
148
  version: '0'
150
149
  requirements: []
151
- rubygems_version: 3.0.3
152
- signing_key:
150
+ rubygems_version: 3.4.10
151
+ signing_key:
153
152
  specification_version: 4
154
153
  summary: Integrate Chosen javascript library with Rails asset pipeline
155
154
  test_files: []
@@ -1,63 +0,0 @@
1
- @import "chosen-base";
2
-
3
- @import "compass/css3/box-sizing";
4
- @import "compass/css3/images";
5
- @import "compass/css3/user-interface";
6
-
7
- //= depend_on_asset "chosen-sprite.png"
8
- //= depend_on_asset "chosen-sprite@2x.png"
9
-
10
- $chosen-sprite: image-url('chosen-sprite.png') !default;
11
- $chosen-sprite-retina: image-url('chosen-sprite@2x.png') !default;
12
-
13
- .chosen-container {
14
- @include user-select(none);
15
- * {
16
- @include box-sizing(border-box);
17
- }
18
- }
19
-
20
- .chosen-container-single{
21
- .chosen-single {
22
- @include background(linear-gradient(#fff 20%, #f6f6f6 50%, #eee 52%, #f4f4f4 100%));
23
- }
24
- .chosen-search {
25
- @include background($chosen-sprite no-repeat 100% -20px);
26
- }
27
- }
28
-
29
- .chosen-container .chosen-results {
30
- li {
31
- &.highlighted {
32
- @include background-image(linear-gradient(#3875d7 20%, #2a62bc 90%));
33
- }
34
- }
35
- }
36
-
37
- .chosen-container-multi{
38
- .chosen-choices {
39
- @include background-image(linear-gradient(#eee 1%, #fff 15%));
40
- }
41
- .chosen-choices li {
42
- &.search-choice {
43
- @include background-image(linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%));
44
- }
45
- &.search-choice-disabled {
46
- @include background-image(linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%));
47
- }
48
- }
49
- }
50
-
51
- .chosen-container-active{
52
- &.chosen-with-drop{
53
- .chosen-single {
54
- @include background-image(linear-gradient(#eee 20%, #fff 80%));
55
- }
56
- }
57
- }
58
-
59
- .chosen-rtl {
60
- .chosen-search input[type="text"] {
61
- @include background($chosen-sprite no-repeat -30px -20px);
62
- }
63
- }