jquery_uniform-rails 0.0.1 → 2.1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/lib/jquery_uniform/rails/version.rb +1 -1
  3. data/vendor/assets/images/jquery.uniform/bg-input-agent.png +0 -0
  4. data/vendor/assets/images/jquery.uniform/bg-input-aristo.png +0 -0
  5. data/vendor/assets/images/jquery.uniform/bg-input-focus-agent.png +0 -0
  6. data/vendor/assets/images/jquery.uniform/bg-input-focus-aristo.png +0 -0
  7. data/vendor/assets/images/jquery.uniform/bg-input-focus-jeans.png +0 -0
  8. data/vendor/assets/images/jquery.uniform/bg-input-focus-retina-jeans.png +0 -0
  9. data/vendor/assets/images/jquery.uniform/bg-input-focus.png +0 -0
  10. data/vendor/assets/images/jquery.uniform/bg-input-jeans.png +0 -0
  11. data/vendor/assets/images/jquery.uniform/bg-input-retina-jeans.png +0 -0
  12. data/vendor/assets/images/jquery.uniform/bg-input.png +0 -0
  13. data/vendor/assets/images/jquery.uniform/sprite-agent.png +0 -0
  14. data/vendor/assets/images/jquery.uniform/sprite-aristo.png +0 -0
  15. data/vendor/assets/images/jquery.uniform/sprite-jeans.png +0 -0
  16. data/vendor/assets/images/jquery.uniform/sprite-retina-jeans.png +0 -0
  17. data/vendor/assets/images/jquery.uniform/sprite.png +0 -0
  18. data/vendor/assets/javascripts/jquery.uniform.js +1068 -0
  19. data/vendor/assets/javascripts/jquery.uniform.min.js +1 -0
  20. data/vendor/assets/stylesheets/jquery.uniform/uniform._base.scss +567 -0
  21. data/vendor/assets/stylesheets/jquery.uniform/uniform.agent.scss +145 -0
  22. data/vendor/assets/stylesheets/jquery.uniform/uniform.aristo.scss +151 -0
  23. data/vendor/assets/stylesheets/jquery.uniform/uniform.default.scss +150 -0
  24. data/vendor/assets/stylesheets/jquery.uniform/uniform.jeans.scss +162 -0
  25. metadata +39 -13
  26. data/.gitignore +0 -17
  27. data/.idea/.name +0 -1
  28. data/.idea/encodings.xml +0 -6
  29. data/.idea/jquery_uniform-rails.iml +0 -21
  30. data/.idea/misc.xml +0 -56
  31. data/.idea/modules.xml +0 -8
  32. data/.idea/workspace.xml +0 -430
  33. data/Gemfile +0 -4
  34. data/Rakefile +0 -1
  35. data/jquery_uniform-rails.gemspec +0 -23
@@ -0,0 +1 @@
1
+ !function(e,t,n){"use strict";function s(e){var t=Array.prototype.slice.call(arguments,1);return e.prop?e.prop.apply(e,t):e.attr.apply(e,t)}function a(e,t,n){var s,a;for(s in n)n.hasOwnProperty(s)&&(a=s.replace(/ |$/g,t.eventNamespace),e.bind(a,n[s]))}function r(e,t,n){a(e,n,{focus:function(){t.addClass(n.focusClass)},blur:function(){t.removeClass(n.focusClass),t.removeClass(n.activeClass)},mouseenter:function(){t.addClass(n.hoverClass)},mouseleave:function(){t.removeClass(n.hoverClass),t.removeClass(n.activeClass)},"mousedown touchbegin":function(){e.is(":disabled")||t.addClass(n.activeClass)},"mouseup touchend":function(){t.removeClass(n.activeClass)}})}function i(e,t){e.removeClass(t.hoverClass+" "+t.focusClass+" "+t.activeClass)}function l(e,t,n){n?e.addClass(t):e.removeClass(t)}function u(e,t,n){var s="checked",a=t.is(":"+s);t.prop?t.prop(s,a):a?t.attr(s,s):t.removeAttr(s),l(e,n.checkedClass,a)}function o(e,t,n){l(e,n.disabledClass,t.is(":disabled"))}function c(e,t,n){switch(n){case"after":return e.after(t),e.next();case"before":return e.before(t),e.prev();case"wrap":return e.wrap(t),e.parent()}return null}function d(e,n,a){var r,i,l;return a||(a={}),a=t.extend({bind:{},divClass:null,divWrap:"wrap",spanClass:null,spanHtml:null,spanWrap:"wrap"},a),r=t("<div />"),i=t("<span />"),n.autoHide&&e.is(":hidden")&&"none"===e.css("display")&&r.hide(),a.divClass&&r.addClass(a.divClass),n.wrapperClass&&r.addClass(n.wrapperClass),a.spanClass&&i.addClass(a.spanClass),l=s(e,"id"),n.useID&&l&&s(r,"id",n.idPrefix+"-"+l),a.spanHtml&&i.html(a.spanHtml),r=c(e,r,a.divWrap),i=c(e,i,a.spanWrap),o(r,e,n),{div:r,span:i}}function f(e,n){var s;return n.wrapperClass?(s=t("<span />").addClass(n.wrapperClass),s=c(e,s,"wrap")):null}function p(){var n,s,a,r;return r="rgb(120,2,153)",s=t('<div style="width:0;height:0;color:'+r+'">'),t("body").append(s),a=s.get(0),n=e.getComputedStyle?e.getComputedStyle(a,"").color:(a.currentStyle||a.style||{}).color,s.remove(),n.replace(/ /g,"")!==r}function m(e){return e?t("<span />").text(e).html():""}function v(){return navigator.cpuClass&&!navigator.product}function h(){return void 0!==e.XMLHttpRequest?!0:!1}function C(e){var t;return e[0].multiple?!0:(t=s(e,"size"),!t||1>=t?!1:!0)}function b(){return!1}function y(e,t){var n="none";a(e,t,{"selectstart dragstart mousedown":b}),e.css({MozUserSelect:n,msUserSelect:n,webkitUserSelect:n,userSelect:n})}function w(e,t,n){var s=e.val();""===s?s=n.fileDefaultHtml:(s=s.split(/[\/\\]+/),s=s[s.length-1]),t.text(s)}function g(e,t,n){var s,a;for(s=[],e.each(function(){var e;for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&(s.push({el:this,name:e,old:this.style[e]}),this.style[e]=t[e])}),n();s.length;)a=s.pop(),a.el.style[a.name]=a.old}function k(e,t){var n;n=e.parents(),n.push(e[0]),n=n.not(":visible"),g(n,{visibility:"hidden",display:"block",position:"absolute"},t)}function H(e,t){return function(){e.unwrap().unwrap().unbind(t.eventNamespace)}}var x=!0,A=!1,W=[{match:function(e){return e.is("a, button, :submit, :reset, input[type='button']")},apply:function(t,n){var l,u,c,f,p;return u=n.submitDefaultHtml,t.is(":reset")&&(u=n.resetDefaultHtml),f=t.is("a, button")?function(){return t.html()||u}:function(){return m(s(t,"value"))||u},c=d(t,n,{divClass:n.buttonClass,spanHtml:f()}),l=c.div,r(t,l,n),p=!1,a(l,n,{"click touchend":function(){var n,a,r,i;p||t.is(":disabled")||(p=!0,t[0].dispatchEvent?(n=document.createEvent("MouseEvents"),n.initEvent("click",!0,!0),a=t[0].dispatchEvent(n),t.is("a")&&a&&(r=s(t,"target"),i=s(t,"href"),r&&"_self"!==r?e.open(i,r):document.location.href=i)):t.click(),p=!1)}}),y(l,n),{remove:function(){return l.after(t),l.remove(),t.unbind(n.eventNamespace),t},update:function(){i(l,n),o(l,t,n),t.detach(),c.span.html(f()).append(t)}}}},{match:function(e){return e.is(":checkbox")},apply:function(e,t){var n,s,l;return n=d(e,t,{divClass:t.checkboxClass}),s=n.div,l=n.span,r(e,s,t),a(e,t,{"click touchend":function(){u(l,e,t)}}),u(l,e,t),{remove:H(e,t),update:function(){i(s,t),l.removeClass(t.checkedClass),u(l,e,t),o(s,e,t)}}}},{match:function(e){return e.is(":file")},apply:function(e,n){function l(){w(e,p,n)}var u,f,p,m;return u=d(e,n,{divClass:n.fileClass,spanClass:n.fileButtonClass,spanHtml:n.fileButtonHtml,spanWrap:"after"}),f=u.div,m=u.span,p=t("<span />").html(n.fileDefaultHtml),p.addClass(n.filenameClass),p=c(e,p,"after"),s(e,"size")||s(e,"size",f.width()/10),r(e,f,n),l(),v()?a(e,n,{click:function(){e.trigger("change"),setTimeout(l,0)}}):a(e,n,{change:l}),y(p,n),y(m,n),{remove:function(){return p.remove(),m.remove(),e.unwrap().unbind(n.eventNamespace)},update:function(){i(f,n),w(e,p,n),o(f,e,n)}}}},{match:function(e){if(e.is("input")){var t=(" "+s(e,"type")+" ").toLowerCase(),n=" color date datetime datetime-local email month number password search tel text time url week ";return n.indexOf(t)>=0}return!1},apply:function(e,t){var n,a;return n=s(e,"type"),e.addClass(t.inputClass),a=f(e,t),r(e,e,t),t.inputAddTypeAsClass&&e.addClass(n),{remove:function(){e.removeClass(t.inputClass),t.inputAddTypeAsClass&&e.removeClass(n),a&&e.unwrap()},update:b}}},{match:function(e){return e.is(":radio")},apply:function(e,n){var l,c,f;return l=d(e,n,{divClass:n.radioClass}),c=l.div,f=l.span,r(e,c,n),a(e,n,{"click touchend":function(){t.uniform.update(t(':radio[name="'+s(e,"name")+'"]'))}}),u(f,e,n),{remove:H(e,n),update:function(){i(c,n),u(f,e,n),o(c,e,n)}}}},{match:function(e){return e.is("select")&&!C(e)?!0:!1},apply:function(e,n){var s,l,u,c;return n.selectAutoWidth&&k(e,function(){c=e.width()}),s=d(e,n,{divClass:n.selectClass,spanHtml:(e.find(":selected:first")||e.find("option:first")).html(),spanWrap:"before"}),l=s.div,u=s.span,n.selectAutoWidth?k(e,function(){g(t([u[0],l[0]]),{display:"block"},function(){var e;e=u.outerWidth()-u.width(),l.width(c+e),u.width(c)})}):l.addClass("fixedWidth"),r(e,l,n),a(e,n,{change:function(){u.html(e.find(":selected").html()),l.removeClass(n.activeClass)},"click touchend":function(){var t=e.find(":selected").html();u.html()!==t&&e.trigger("change")},keyup:function(){u.html(e.find(":selected").html())}}),y(u,n),{remove:function(){return u.remove(),e.unwrap().unbind(n.eventNamespace),e},update:function(){n.selectAutoWidth?(t.uniform.restore(e),e.uniform(n)):(i(l,n),u.html(e.find(":selected").html()),o(l,e,n))}}}},{match:function(e){return e.is("select")&&C(e)?!0:!1},apply:function(e,t){var n;return e.addClass(t.selectMultiClass),n=f(e,t),r(e,e,t),{remove:function(){e.removeClass(t.selectMultiClass),n&&e.unwrap()},update:b}}},{match:function(e){return e.is("textarea")},apply:function(e,t){var n;return e.addClass(t.textareaClass),n=f(e,t),r(e,e,t),{remove:function(){e.removeClass(t.textareaClass),n&&e.unwrap()},update:b}}}];v()&&!h()&&(x=!1),t.uniform={defaults:{activeClass:"active",autoHide:!0,buttonClass:"button",checkboxClass:"checker",checkedClass:"checked",disabledClass:"disabled",eventNamespace:".uniform",fileButtonClass:"action",fileButtonHtml:"Choose File",fileClass:"uploader",fileDefaultHtml:"No file selected",filenameClass:"filename",focusClass:"focus",hoverClass:"hover",idPrefix:"uniform",inputAddTypeAsClass:!0,inputClass:"uniform-input",radioClass:"radio",resetDefaultHtml:"Reset",resetSelector:!1,selectAutoWidth:!0,selectClass:"selector",selectMultiClass:"uniform-multiselect",submitDefaultHtml:"Submit",textareaClass:"uniform",useID:!0,wrapperClass:null},elements:[]},t.fn.uniform=function(n){var s=this;return n=t.extend({},t.uniform.defaults,n),A||(A=!0,p()&&(x=!1)),x?(n.resetSelector&&t(n.resetSelector).mouseup(function(){e.setTimeout(function(){t.uniform.update(s)},10)}),this.each(function(){var e,s,a,r=t(this);if(r.data("uniformed"))return t.uniform.update(r),void 0;for(e=0;e<W.length;e+=1)if(s=W[e],s.match(r,n))return a=s.apply(r,n),r.data("uniformed",a),t.uniform.elements.push(r.get(0)),void 0})):this},t.uniform.restore=t.fn.uniform.restore=function(e){e===n&&(e=t.uniform.elements),t(e).each(function(){var e,n,s=t(this);n=s.data("uniformed"),n&&(n.remove(),e=t.inArray(this,t.uniform.elements),e>=0&&t.uniform.elements.splice(e,1),s.removeData("uniformed"))})},t.uniform.update=t.fn.uniform.update=function(e){e===n&&(e=t.uniform.elements),t(e).each(function(){var e,n=t(this);e=n.data("uniformed"),e&&e.update(n,e.options)})}}(this,jQuery);
@@ -0,0 +1,567 @@
1
+ @mixin opacity($opacity) {
2
+ opacity: $opacity;
3
+ filter: unquote("alpha(opacity=#{round($opacity * 100)})");
4
+ -moz-opacity: $opacity;
5
+ }
6
+
7
+ @mixin hideYetClickable() {
8
+ @include opacity(0);
9
+ border: none;
10
+ background: none;
11
+ }
12
+
13
+ @mixin inline-block() {
14
+ display: -moz-inline-box;
15
+ display: inline-block;
16
+ *display: inline;
17
+ zoom: 1;
18
+ }
19
+
20
+ @mixin ellipsis() {
21
+ text-overflow: ellipsis;
22
+ display: block;
23
+ overflow: hidden;
24
+ white-space: nowrap;
25
+ }
26
+
27
+ @mixin border-radius($radius) {
28
+ -webkit-border-radius: $radius;
29
+ -moz-border-radius: $radius;
30
+ border-radius: $radius;
31
+ }
32
+
33
+ @mixin box-shadow($def) {
34
+ -webkit-box-shadow: $def;
35
+ -moz-box-shadow: $def;
36
+ box-shadow: $def;
37
+ }
38
+
39
+ @mixin retina() {
40
+ @media only screen {
41
+ @media (min-resolution: 124dpi), (-webkit-min-device-pixel-ratio: 1.3), (min--moz-device-pixel-ratio: 1.3), (-o-min-device-pixel-ratio: 4/3), (min-device-pixel-ratio: 1.3), (min-resolution: 1.3dppx) {
42
+ @include use-backgrounds(url($sprite-retina), $sprite-size, url($input-background-retina), url($input-background-focus-retina), $input-background-size);
43
+ }
44
+ }
45
+ }
46
+
47
+ @mixin use-backgrounds($sprite, $sprite-size, $input, $input-focus, $input-size) {
48
+ div#{$class-wrapper} {
49
+ &#{$class-select},
50
+ &#{$class-select} span,
51
+ &#{$class-checkbox} span,
52
+ &#{$class-radio} span,
53
+ &#{$class-upload},
54
+ &#{$class-upload} span#{$class-action},
55
+ &#{$class-button},
56
+ &#{$class-button} span {
57
+ background-image: url($sprite);
58
+
59
+ @if $sprite-size > 0 {
60
+ background-size: $sprite-size;
61
+ }
62
+ }
63
+ }
64
+
65
+ #{$class-wrapper-element}#{$class-wrapper} input#{$class-input},
66
+ #{$class-wrapper-element}#{$class-wrapper} select#{$class-multiselect},
67
+ #{$class-wrapper-element}#{$class-wrapper} textarea#{$class-textarea} {
68
+ background-image: url($input);
69
+
70
+ @if $sprite-size > 0 {
71
+ background-size: $input-size;
72
+ }
73
+
74
+ @include whenActive {
75
+ background-image: url($input-focus);
76
+ }
77
+ }
78
+ }
79
+
80
+ @mixin whenActive {
81
+ &#{$class-active} {
82
+ @content
83
+ }
84
+ }
85
+
86
+ @mixin whenHover {
87
+ &#{$class-hover}, &#{$class-focus} {
88
+ @content
89
+ }
90
+ }
91
+
92
+ @mixin whenDisabled {
93
+ &#{$class-disabled}, &#{$class-disabled}#{$class-active} {
94
+ @content
95
+ }
96
+ }
97
+
98
+ @mixin whenChecked {
99
+ &#{$class-checked} {
100
+ @content
101
+ }
102
+ }
103
+
104
+
105
+ $sprite: image-path("jquery.uniform/sprite.png") !default;
106
+ $sprite-retina: image-path("jquery.uniform/sprite-retina.png") !default;
107
+ $sprite-size: 493px !default;
108
+ $button-height: 30px !default;
109
+ $button-margin-left: 13px !default;
110
+ $button-padding: 0 !default;
111
+ $button-span-height: $button-height !default;
112
+ $checkbox-height: 19px !default;
113
+ $checkbox-width: 19px !default;
114
+ $input-padding: 3px !default;
115
+ $input-background: image-path("jquery.uniform/bg-input.png") !default;
116
+ $input-background-retina: image-path("jquery.uniform/bg-input-retina.png") !default;
117
+ $input-background-focus: image-path("jquery.uniform/bg-input-focus.png") !default;
118
+ $input-background-focus-retina: image-path("jquery.uniform/bg-input-focus-retina.png") !default;
119
+ $input-background-size: 1px !default;
120
+ $radio-height: 18px !default;
121
+ $radio-width: 18px !default;
122
+ $select-fixed-width: 190px !default;
123
+ $select-height: 26px !default;
124
+ $select-margin-left: 10px !default;
125
+ $select-margin-right: 25px !default;
126
+ $select-select-height: 22px !default;
127
+ $select-select-top: 2px !default;
128
+ $upload-action-width: 85px !default;
129
+ $upload-filename-margin-top: 2px !default;
130
+ $upload-filename-margin-bottom: 2px !default;
131
+ $upload-filename-margin-left: 2px !default;
132
+ $upload-filename-width: 82px !default;
133
+ $upload-filename-padding: 0 10px !default;
134
+ $upload-height: 28px !default;
135
+ $upload-width: 190px !default;
136
+
137
+ $checkbox-voffset: (-10 * $select-height);
138
+ $radio-voffset: ($checkbox-voffset - $checkbox-height);
139
+ $upload-voffset: ($radio-voffset - $radio-height);
140
+ $button-voffset: ($upload-voffset - (8 * $upload-height));
141
+
142
+ $class-action: ".action" !default;
143
+ $class-active: ".active" !default;
144
+ $class-button: ".button" !default;
145
+ $class-checkbox: ".checker" !default;
146
+ $class-checked: ".checked" !default;
147
+ $class-disabled: ".disabled" !default;
148
+ $class-input: ".uniform-input" !default;
149
+ $class-filename: ".filename" !default;
150
+ $class-focus: ".focus" !default;
151
+ $class-hover: ".hover" !default;
152
+ $class-multiselect: ".uniform-multiselect" !default;
153
+ $class-radio: ".radio" !default;
154
+ $class-select: ".selector" !default;
155
+ $class-upload: ".uploader" !default;
156
+ $class-textarea: ".uniform" !default;
157
+ $class-wrapper: "" !default;
158
+
159
+ $class-wrapper-element: "";
160
+ @if $class-wrapper != "" {
161
+ $class-wrapper-element: "span"
162
+ }
163
+
164
+ /* General settings */
165
+
166
+ div#{$class-wrapper} {
167
+ &#{$class-select},
168
+ &#{$class-select} span,
169
+ &#{$class-checkbox} span,
170
+ &#{$class-radio} span,
171
+ &#{$class-upload},
172
+ &#{$class-upload} span#{$class-action},
173
+ &#{$class-button},
174
+ &#{$class-button} span {
175
+ background-image: url($sprite);
176
+ background-repeat: no-repeat;
177
+ -webkit-font-smoothing: antialiased;
178
+ }
179
+
180
+ &#{$class-select},
181
+ &#{$class-checkbox},
182
+ &#{$class-button},
183
+ &#{$class-radio},
184
+ &#{$class-upload} {
185
+ @include inline-block();
186
+ vertical-align: middle;
187
+
188
+ /* Keeping this as :focus to remove browser styles */
189
+ &:focus {
190
+ outline: 0;
191
+ }
192
+ }
193
+
194
+ &#{$class-select},
195
+ &#{$class-radio},
196
+ &#{$class-checkbox},
197
+ &#{$class-upload},
198
+ &#{$class-button} {
199
+ &, & * {
200
+ margin: 0;
201
+ padding: 0;
202
+ }
203
+ }
204
+ }
205
+
206
+ .highContrastDetect {
207
+ background: url($input-background) repeat-x 0 0;
208
+ width: 0px;
209
+ height: 0px;
210
+ }
211
+
212
+ /* Input & Textarea */
213
+
214
+ #{$class-wrapper-element}#{$class-wrapper} input#{$class-input},
215
+ #{$class-wrapper-element}#{$class-wrapper} select#{$class-multiselect},
216
+ #{$class-wrapper-element}#{$class-wrapper} textarea#{$class-textarea} {
217
+ padding: $input-padding;
218
+ background: url($input-background) repeat-x 0 0;
219
+ outline: 0;
220
+
221
+ @include whenActive {
222
+ background: url($input-background-focus) repeat-x 0 0;
223
+ }
224
+ }
225
+
226
+ /* Remove default webkit and possible mozilla .search styles.
227
+ * Keeping this as :active to remove browser styles */
228
+ div#{$class-wrapper}#{$class-checkbox} input,
229
+ input[type="search"],
230
+ input[type="search"]:active {
231
+ -moz-appearance: none;
232
+ -webkit-appearance: none;
233
+ }
234
+
235
+ /* Select */
236
+
237
+ div#{$class-wrapper}#{$class-select} {
238
+ background-position: 0 (-5 * $select-height);
239
+ line-height: $select-height;
240
+ height: $select-height;
241
+ padding: 0 0 0 $select-margin-left;
242
+ position: relative;
243
+ overflow: hidden;
244
+
245
+ span {
246
+ @include ellipsis();
247
+ background-position: right 0;
248
+ height: $select-height;
249
+ line-height: $select-height;
250
+ padding-right: $select-margin-right;
251
+ cursor: pointer;
252
+ width: 100%;
253
+ display: block;
254
+ }
255
+
256
+ &.fixedWidth{
257
+ width: $select-fixed-width;
258
+
259
+ span {
260
+ width: ($select-fixed-width - $select-margin-left - $select-margin-right);
261
+ }
262
+ }
263
+
264
+ select {
265
+ @include hideYetClickable();
266
+ position: absolute;
267
+ height: $select-select-height;
268
+ top: $select-select-top;
269
+ left: 0px;
270
+ width: 100%;
271
+ }
272
+
273
+ @include whenActive {
274
+ background-position: 0 (-6 * $select-height);
275
+
276
+ span {
277
+ background-position: right (-1 * $select-height);
278
+ }
279
+ }
280
+
281
+ @include whenHover {
282
+ background-position: 0 (-7 * $select-height);
283
+
284
+ span {
285
+ background-position: right (-2 * $select-height);
286
+ }
287
+
288
+ @include whenActive {
289
+ background-position: 0 (-8 * $select-height);
290
+
291
+ span {
292
+ background-position: right (-3 * $select-height);
293
+ }
294
+ }
295
+ }
296
+
297
+ @include whenDisabled {
298
+ background-position: 0 (-9 * $select-height);
299
+
300
+ span {
301
+ background-position: right (-4 * $select-height);
302
+ }
303
+ }
304
+ }
305
+
306
+
307
+ /* Checkbox */
308
+
309
+ div#{$class-wrapper}#{$class-checkbox} {
310
+ position: relative;
311
+
312
+ &, span, input {
313
+ width: $checkbox-width;
314
+ height: $checkbox-height;
315
+ }
316
+
317
+ span {
318
+ @include inline-block();
319
+ text-align: center;
320
+ background-position: 0 $checkbox-voffset;
321
+
322
+ @include whenChecked {
323
+ background-position: (-4 * $checkbox-width) $checkbox-voffset;
324
+ }
325
+ }
326
+
327
+ input {
328
+ @include hideYetClickable();
329
+ @include inline-block();
330
+ }
331
+
332
+ @include whenActive {
333
+ span {
334
+ background-position: (-1 * $checkbox-width) $checkbox-voffset;
335
+
336
+ @include whenChecked {
337
+ background-position: (-5 * $checkbox-width) $checkbox-voffset;
338
+ }
339
+ }
340
+ }
341
+
342
+ @include whenHover {
343
+ span {
344
+ background-position: (-2 * $checkbox-width) $checkbox-voffset;
345
+
346
+ @include whenChecked {
347
+ background-position: (-6 * $checkbox-width) $checkbox-voffset;
348
+ }
349
+ }
350
+
351
+ @include whenActive {
352
+ span {
353
+ background-position: (-3 * $checkbox-width) $checkbox-voffset;
354
+
355
+ @include whenChecked {
356
+ background-position: (-7 * $checkbox-width) $checkbox-voffset;
357
+ }
358
+ }
359
+ }
360
+ }
361
+
362
+ @include whenDisabled {
363
+ background-position: (-8 * $checkbox-width) $checkbox-voffset;
364
+
365
+ span {
366
+ @include whenChecked {
367
+ background-position: (-9 * $checkbox-width) $checkbox-voffset;
368
+ }
369
+ }
370
+ }
371
+ }
372
+
373
+ /* Radio */
374
+
375
+ div#{$class-wrapper}#{$class-radio} {
376
+ position: relative;
377
+
378
+ &, span, input {
379
+ width: $radio-width;
380
+ height: $radio-height;
381
+ }
382
+
383
+ span {
384
+ @include inline-block();
385
+ text-align: center;
386
+ background-position: 0 $radio-voffset;
387
+
388
+ @include whenChecked {
389
+ background-position: (-4 * $radio-width) $radio-voffset;
390
+ }
391
+ }
392
+
393
+ input {
394
+ @include hideYetClickable();
395
+ @include inline-block();
396
+ text-align: center;
397
+ }
398
+
399
+ @include whenActive {
400
+ span {
401
+ background-position: (-1 * $radio-width) $radio-voffset;
402
+
403
+ @include whenChecked {
404
+ background-position: (-5 * $radio-width) $radio-voffset;
405
+ }
406
+ }
407
+ }
408
+
409
+ @include whenHover {
410
+ span {
411
+ background-position: (-2 * $radio-width) $radio-voffset;
412
+
413
+ @include whenChecked {
414
+ background-position: (-6 * $radio-width) $radio-voffset;
415
+ }
416
+ }
417
+
418
+ @include whenActive {
419
+ span {
420
+ background-position: (-3 * $radio-width) $radio-voffset;
421
+
422
+ @include whenChecked {
423
+ background-position: (-7 * $radio-width) $radio-voffset;
424
+ }
425
+ }
426
+ }
427
+ }
428
+
429
+ @include whenDisabled {
430
+ span {
431
+ background-position: (-8 * $radio-width) $radio-voffset;
432
+
433
+ @include whenChecked {
434
+ background-position: (-9 * $radio-width) $radio-voffset;
435
+ }
436
+ }
437
+ }
438
+ }
439
+
440
+ /* Uploader */
441
+
442
+ div#{$class-wrapper}#{$class-upload} {
443
+ background-position: 0 $upload-voffset;
444
+ height: $upload-height;
445
+ width: $upload-width;
446
+ cursor: pointer;
447
+ position: relative;
448
+ overflow: hidden;
449
+
450
+ span#{$class-action} {
451
+ background-position: right ($upload-voffset + (-4 * $upload-height));
452
+ height: $upload-height;
453
+ line-height: $upload-height;
454
+ width: $upload-action-width;
455
+ text-align: center;
456
+ float: left;
457
+ display: inline;
458
+ overflow: hidden;
459
+ cursor: pointer;
460
+ }
461
+
462
+ span#{$class-filename} {
463
+ @include ellipsis();
464
+ float: left;
465
+ cursor: default;
466
+ height: ($upload-height - $upload-filename-margin-top - $upload-filename-margin-bottom);
467
+ margin: $upload-filename-margin-top 0 $upload-filename-margin-bottom $upload-filename-margin-left;
468
+ line-height: ($upload-height - $upload-filename-margin-top - $upload-filename-margin-bottom);
469
+ width: $upload-filename-width;
470
+ padding: $upload-filename-padding;
471
+ }
472
+
473
+ input {
474
+ @include hideYetClickable();
475
+ position: absolute;
476
+ top: 0;
477
+ right: 0;
478
+ float: right;
479
+ cursor: default;
480
+ width: 100%;
481
+ height: 100%;
482
+ }
483
+
484
+ @include whenActive {
485
+ span#{$class-action} {
486
+ background-position: right ($upload-voffset + (-6 * $upload-height));
487
+ }
488
+ }
489
+
490
+ @include whenHover {
491
+ background-position: 0 ($upload-voffset + (-2 * $upload-height));
492
+
493
+ span#{$class-action} {
494
+ background-position: right ($upload-voffset + (-5 * $upload-height));
495
+ }
496
+
497
+ @include whenActive {
498
+ span#{$class-action} {
499
+ background-position: right ($upload-voffset + (-7 * $upload-height));
500
+ }
501
+ }
502
+ }
503
+
504
+ @include whenDisabled {
505
+ background-position: 0 ($upload-voffset + (-1 * $upload-height));
506
+
507
+ span#{$class-action} {
508
+ background-position: right ($upload-voffset + (-3 * $upload-height));
509
+ }
510
+ }
511
+ }
512
+
513
+ /* Buttons */
514
+
515
+ div#{$class-wrapper}#{$class-button} {
516
+ background-position: 0 ($button-voffset + (-4 * $button-height));
517
+ height: $button-height;
518
+ cursor: pointer;
519
+ position: relative;
520
+
521
+ /* Keep buttons barely visible so they can get focus */
522
+ a, button, input {
523
+ @include opacity(0.01);
524
+ display: block;
525
+ top: 0;
526
+ left: 0;
527
+ right: 0;
528
+ bottom: 0;
529
+ position: absolute;
530
+ }
531
+
532
+ span {
533
+ @include inline-block();
534
+ line-height: $button-span-height;
535
+ text-align: center;
536
+ background-position: right $button-voffset;
537
+ height: $button-span-height;
538
+ margin-left: $button-margin-left;
539
+ padding: $button-padding;
540
+ }
541
+
542
+ @include whenActive {
543
+ background-position: 0 ($button-voffset + (-5 * $button-height));
544
+
545
+ span {
546
+ background-position: right ($button-voffset + (-1 * $button-height));
547
+ cursor: default;
548
+ }
549
+ }
550
+
551
+ @include whenHover {
552
+ background-position: 0 ($button-voffset + (-6 * $button-height));
553
+
554
+ span {
555
+ background-position: right ($button-voffset + (-2 * $button-height));
556
+ }
557
+ }
558
+
559
+ @include whenDisabled {
560
+ background-position: 0 ($button-voffset + (-7 * $button-height));
561
+
562
+ span {
563
+ background-position: right ($button-voffset + (-3 * $button-height));
564
+ cursor: default;
565
+ }
566
+ }
567
+ }