uikit-rails 0.0.2 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (177) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +9 -3
  3. data/Gemfile +2 -1
  4. data/LICENSE.txt +21 -0
  5. data/README.md +65 -0
  6. data/Rakefile +0 -1
  7. data/assets/fonts/FontAwesome.otf +0 -0
  8. data/assets/fonts/fontawesome-webfont.ttf +0 -0
  9. data/assets/fonts/fontawesome-webfont.woff +0 -0
  10. data/assets/fonts/fontawesome-webfont.woff2 +0 -0
  11. data/assets/javascripts/components/accordion.js +174 -0
  12. data/assets/javascripts/components/accordion.min.js +2 -0
  13. data/assets/javascripts/components/autocomplete.js +334 -0
  14. data/assets/javascripts/components/autocomplete.min.js +2 -0
  15. data/assets/javascripts/components/datepicker.js +3166 -0
  16. data/assets/javascripts/components/datepicker.min.js +3 -0
  17. data/assets/javascripts/components/form-password.js +67 -0
  18. data/assets/javascripts/components/form-password.min.js +2 -0
  19. data/assets/javascripts/components/form-select.js +70 -0
  20. data/assets/javascripts/components/form-select.min.js +2 -0
  21. data/assets/javascripts/components/grid.js +527 -0
  22. data/assets/javascripts/components/grid.min.js +2 -0
  23. data/assets/javascripts/components/htmleditor.js +623 -0
  24. data/assets/javascripts/components/htmleditor.min.js +2 -0
  25. data/assets/javascripts/components/lightbox.js +555 -0
  26. data/assets/javascripts/components/lightbox.min.js +2 -0
  27. data/assets/javascripts/components/nestable.js +638 -0
  28. data/assets/javascripts/components/nestable.min.js +2 -0
  29. data/assets/javascripts/components/notify.js +189 -0
  30. data/assets/javascripts/components/notify.min.js +2 -0
  31. data/assets/javascripts/components/pagination.js +147 -0
  32. data/assets/javascripts/components/pagination.min.js +2 -0
  33. data/assets/javascripts/components/parallax.js +435 -0
  34. data/assets/javascripts/components/parallax.min.js +2 -0
  35. data/assets/javascripts/components/search.js +92 -0
  36. data/assets/javascripts/components/search.min.js +2 -0
  37. data/assets/javascripts/components/slider.js +531 -0
  38. data/assets/javascripts/components/slider.min.js +2 -0
  39. data/assets/javascripts/components/slideset.js +506 -0
  40. data/assets/javascripts/components/slideset.min.js +2 -0
  41. data/assets/javascripts/components/slideshow-fx.js +375 -0
  42. data/assets/javascripts/components/slideshow-fx.min.js +2 -0
  43. data/assets/javascripts/components/slideshow.js +562 -0
  44. data/assets/javascripts/components/slideshow.min.js +2 -0
  45. data/assets/javascripts/components/sortable.js +688 -0
  46. data/assets/javascripts/components/sortable.min.js +2 -0
  47. data/assets/javascripts/components/sticky.js +359 -0
  48. data/assets/javascripts/components/sticky.min.js +2 -0
  49. data/assets/javascripts/components/timepicker.js +192 -0
  50. data/assets/javascripts/components/timepicker.min.js +2 -0
  51. data/assets/javascripts/components/tooltip.js +234 -0
  52. data/assets/javascripts/components/tooltip.min.js +2 -0
  53. data/assets/javascripts/components/upload.js +260 -0
  54. data/assets/javascripts/components/upload.min.js +2 -0
  55. data/assets/javascripts/core/alert.js +66 -0
  56. data/assets/javascripts/core/alert.min.js +2 -0
  57. data/assets/javascripts/core/button.js +157 -0
  58. data/assets/javascripts/core/button.min.js +2 -0
  59. data/assets/javascripts/core/core.js +730 -0
  60. data/assets/javascripts/core/core.min.js +2 -0
  61. data/assets/javascripts/core/cover.js +95 -0
  62. data/assets/javascripts/core/cover.min.js +2 -0
  63. data/assets/javascripts/core/dropdown.js +514 -0
  64. data/assets/javascripts/core/dropdown.min.js +2 -0
  65. data/assets/javascripts/core/grid.js +114 -0
  66. data/assets/javascripts/core/grid.min.js +2 -0
  67. data/assets/javascripts/core/modal.js +384 -0
  68. data/assets/javascripts/core/modal.min.js +2 -0
  69. data/assets/javascripts/core/nav.js +136 -0
  70. data/assets/javascripts/core/nav.min.js +2 -0
  71. data/assets/javascripts/core/offcanvas.js +180 -0
  72. data/assets/javascripts/core/offcanvas.min.js +2 -0
  73. data/assets/javascripts/core/scrollspy.js +208 -0
  74. data/assets/javascripts/core/scrollspy.min.js +2 -0
  75. data/assets/javascripts/core/smooth-scroll.js +62 -0
  76. data/assets/javascripts/core/smooth-scroll.min.js +2 -0
  77. data/assets/javascripts/core/switcher.js +309 -0
  78. data/assets/javascripts/core/switcher.min.js +2 -0
  79. data/assets/javascripts/core/tab.js +167 -0
  80. data/assets/javascripts/core/tab.min.js +2 -0
  81. data/assets/javascripts/core/toggle.js +120 -0
  82. data/assets/javascripts/core/toggle.min.js +2 -0
  83. data/assets/javascripts/core/touch.js +175 -0
  84. data/assets/javascripts/core/touch.min.js +2 -0
  85. data/assets/javascripts/core/utility.js +289 -0
  86. data/assets/javascripts/core/utility.min.js +2 -0
  87. data/assets/javascripts/uikit-components.js +23 -0
  88. data/assets/javascripts/uikit.js +3706 -0
  89. data/assets/javascripts/uikit.min.js +3 -0
  90. data/assets/stylesheets/components/accordion.scss +94 -0
  91. data/assets/stylesheets/components/autocomplete.scss +102 -0
  92. data/assets/stylesheets/components/datepicker.scss +197 -0
  93. data/assets/stylesheets/components/dotnav.scss +212 -0
  94. data/assets/stylesheets/components/form-advanced.scss +128 -0
  95. data/assets/stylesheets/components/form-file.scss +63 -0
  96. data/assets/stylesheets/components/form-password.scss +74 -0
  97. data/assets/stylesheets/components/form-select.scss +66 -0
  98. data/assets/stylesheets/components/htmleditor.scss +269 -0
  99. data/assets/stylesheets/components/nestable.scss +229 -0
  100. data/assets/stylesheets/components/notify.scss +190 -0
  101. data/assets/stylesheets/components/placeholder.scss +66 -0
  102. data/assets/stylesheets/components/progress.scss +173 -0
  103. data/assets/stylesheets/components/search.scss +309 -0
  104. data/assets/stylesheets/components/slidenav.scss +183 -0
  105. data/assets/stylesheets/components/slider.scss +131 -0
  106. data/assets/stylesheets/components/slideshow.scss +208 -0
  107. data/assets/stylesheets/components/sortable.scss +122 -0
  108. data/assets/stylesheets/components/sticky.scss +64 -0
  109. data/assets/stylesheets/components/tooltip.scss +177 -0
  110. data/assets/stylesheets/components/upload.scss +34 -0
  111. data/assets/stylesheets/core/alert.scss +141 -0
  112. data/assets/stylesheets/core/animation.scss +599 -0
  113. data/assets/stylesheets/core/article.scss +139 -0
  114. data/assets/stylesheets/core/badge.scss +110 -0
  115. data/assets/stylesheets/core/base-noconflict.scss +397 -0
  116. data/assets/stylesheets/core/base.scss +541 -0
  117. data/assets/stylesheets/core/block.scss +153 -0
  118. data/assets/stylesheets/core/breadcrumb.scss +86 -0
  119. data/assets/stylesheets/core/button.scss +406 -0
  120. data/assets/stylesheets/core/close.scss +132 -0
  121. data/assets/stylesheets/core/column.scss +209 -0
  122. data/assets/stylesheets/core/comment.scss +172 -0
  123. data/assets/stylesheets/core/contrast.scss +493 -0
  124. data/assets/stylesheets/core/cover.scss +70 -0
  125. data/assets/stylesheets/core/description-list.scss +71 -0
  126. data/assets/stylesheets/core/dropdown.scss +280 -0
  127. data/assets/stylesheets/core/flex.scss +320 -0
  128. data/assets/stylesheets/core/form.scss +627 -0
  129. data/assets/stylesheets/core/grid.scss +688 -0
  130. data/assets/stylesheets/core/icon.scss +897 -0
  131. data/assets/stylesheets/core/list.scss +102 -0
  132. data/assets/stylesheets/core/modal.scss +341 -0
  133. data/assets/stylesheets/core/nav.scss +468 -0
  134. data/assets/stylesheets/core/navbar.scss +325 -0
  135. data/assets/stylesheets/core/offcanvas.scss +168 -0
  136. data/assets/stylesheets/core/overlay.scss +534 -0
  137. data/assets/stylesheets/core/pagination.scss +197 -0
  138. data/assets/stylesheets/core/panel.scss +332 -0
  139. data/assets/stylesheets/core/print.scss +59 -0
  140. data/assets/stylesheets/core/subnav.scss +213 -0
  141. data/assets/stylesheets/core/switcher.scss +38 -0
  142. data/assets/stylesheets/core/tab.scss +368 -0
  143. data/assets/stylesheets/core/table.scss +147 -0
  144. data/assets/stylesheets/core/text.scss +128 -0
  145. data/assets/stylesheets/core/thumbnail.scss +122 -0
  146. data/assets/stylesheets/core/thumbnav.scss +122 -0
  147. data/assets/stylesheets/core/utility.scss +606 -0
  148. data/assets/stylesheets/core/variables.scss +23 -0
  149. data/assets/stylesheets/uikit-components.scss +22 -0
  150. data/assets/stylesheets/uikit-mixins.scss +327 -0
  151. data/assets/stylesheets/uikit-variables.scss +817 -0
  152. data/assets/stylesheets/uikit.scss +56 -0
  153. data/lib/uikit-rails.rb +2 -2
  154. data/lib/uikit-rails/engine.rb +11 -1
  155. data/lib/uikit-rails/version.rb +1 -3
  156. data/uikit-rails.gemspec +15 -16
  157. metadata +169 -44
  158. data/README.rb +0 -1
  159. data/vendor/assets/javascripts/ui.card.js +0 -115
  160. data/vendor/assets/javascripts/ui.color-picker.js +0 -351
  161. data/vendor/assets/javascripts/ui.confirmation.js +0 -133
  162. data/vendor/assets/javascripts/ui.dialog.js +0 -252
  163. data/vendor/assets/javascripts/ui.emitter.js +0 -99
  164. data/vendor/assets/javascripts/ui.js +0 -1641
  165. data/vendor/assets/javascripts/ui.menu.js +0 -238
  166. data/vendor/assets/javascripts/ui.notification.js +0 -240
  167. data/vendor/assets/javascripts/ui.overlay.js +0 -79
  168. data/vendor/assets/javascripts/ui.split-button.js +0 -108
  169. data/vendor/assets/stylesheets/ui.card.css +0 -55
  170. data/vendor/assets/stylesheets/ui.color-picker.css +0 -6
  171. data/vendor/assets/stylesheets/ui.confirmation.css +0 -7
  172. data/vendor/assets/stylesheets/ui.css +0 -337
  173. data/vendor/assets/stylesheets/ui.dialog.css +0 -92
  174. data/vendor/assets/stylesheets/ui.menu.css +0 -32
  175. data/vendor/assets/stylesheets/ui.notification.css +0 -107
  176. data/vendor/assets/stylesheets/ui.overlay.css +0 -16
  177. data/vendor/assets/stylesheets/ui.split-button.css +0 -27
@@ -0,0 +1,627 @@
1
+ // Name: Form
2
+ // Description: Defines styles for forms
3
+ //
4
+ // Component: `uk-form`
5
+ //
6
+ // Sub-objects: `uk-form-row`
7
+ // `uk-form-help-inline`
8
+ // `uk-form-help-block`
9
+ // `uk-form-label`
10
+ // `uk-form-controls`
11
+ // `uk-form-controls-condensed`
12
+ // `uk-form-icon`
13
+ //
14
+ // Modifiers: `uk-form-stacked`
15
+ // `uk-form-horizontal`
16
+ //
17
+ // Sub-modifiers: `uk-form-danger`
18
+ // `uk-form-success`
19
+ // `uk-form-small`
20
+ // `uk-form-large`
21
+ // `uk-form-blank`
22
+ // `uk-form-width-mini`
23
+ // `uk-form-width-small`
24
+ // `uk-form-width-medium`
25
+ // `uk-form-width-large`
26
+ // `uk-form-controls-text`
27
+ //
28
+ // Markup:
29
+ //
30
+ // <!-- uk-form -->
31
+ // <form class="uk-form">
32
+ // <div class="uk-form-row">
33
+ // <label class="uk-form-label" for="form-input-1"></label>
34
+ // <div class="uk-form-controls">
35
+ // <input type="text" id="form-input-1" placeholder="Text">
36
+ // </div>
37
+ // </div>
38
+ // </form>
39
+ //
40
+ // ========================================================================
41
+
42
+
43
+ // Variables
44
+ // ========================================================================
45
+
46
+ $form-height: 30px !default;
47
+ $form-padding: 4px 6px !default;
48
+ $form-border: #ddd !default;
49
+ $form-border-width: 1px !default;
50
+ $form-background: #fff !default;
51
+ $form-color: #444 !default;
52
+
53
+ $form-focus-border: #99baca !default;
54
+ $form-focus-background: #f5fbfe !default;
55
+ $form-focus-color: #444 !default;
56
+
57
+ $form-disabled-border: #ddd !default;
58
+ $form-disabled-background: #f5f5f5 !default;
59
+ $form-disabled-color: #999 !default;
60
+
61
+ $form-placeholder-color: #999 !default;
62
+
63
+ $form-gutter: 15px !default;
64
+
65
+ $form-legend-border: #ddd !default;
66
+ $form-legend-border-width: 1px !default;
67
+ $form-legend-font-size: 18px !default;
68
+ $form-legend-line-height: 30px !default;
69
+
70
+ $form-small-height: 25px !default;
71
+ $form-large-height: 40px !default;
72
+ $form-small-padding: 3px 3px !default;
73
+ $form-large-padding: 8px 6px !default;
74
+ $form-small-font-size: 12px !default;
75
+ $form-large-font-size: 16px !default;
76
+
77
+ $form-danger-border: #dc8d99 !default;
78
+ $form-danger-background: #fff7f8 !default;
79
+ $form-danger-color: #d85030 !default;
80
+
81
+ $form-success-border: #8ec73b !default;
82
+ $form-success-background: #fafff2 !default;
83
+ $form-success-color: #659f13 !default;
84
+
85
+ $form-blank-border: #ddd !default;
86
+ $form-blank-border-style: dashed !default;
87
+
88
+ $form-mini-width: 40px !default;
89
+ $form-small-width: 130px !default;
90
+ $form-medium-width: 200px !default;
91
+ $form-large-width: 500px !default;
92
+
93
+ $form-help-inline-margin-left: 10px !default;
94
+ $form-help-block-margin-top: 5px !default;
95
+
96
+ $form-controls-condensed-margin-vertical: 5px !default;
97
+
98
+ $form-stacked-margin-bottom: 5px !default;
99
+ $form-stacked-font-weight: bold !default;
100
+
101
+ $form-horizontal-label-width: 200px !default;
102
+ $form-horizontal-label-margin-top: 5px !default;
103
+ $form-horizontal-controls-margin-left: 215px !default;
104
+ $form-horizontal-controls-text-padding-top: 5px !default;
105
+
106
+ $form-icon-width: 30px !default;
107
+ $form-icon-font-size: 14px !default;
108
+ $form-icon-color: #999 !default;
109
+
110
+
111
+ /* ========================================================================
112
+ Component: Form
113
+ ========================================================================== */
114
+
115
+ /*
116
+ * 1. Define consistent box sizing.
117
+ * Default is `content-box` with following exceptions set to `border-box`
118
+ * `button`, `select`, `input[type="checkbox"]` and `input[type="radio"]`
119
+ * `input[type="search"]` in Chrome, Safari and Opera
120
+ * `input[type="color"]` in Firefox
121
+ * 2. Address margins set differently in Firefox/IE and Chrome/Safari/Opera.
122
+ * 3. Remove `border-radius` in iOS.
123
+ * 4. Correct `font` properties and `color` not being inherited.
124
+ */
125
+
126
+ .uk-form input,
127
+ .uk-form select,
128
+ .uk-form textarea {
129
+ /* 1 */
130
+ box-sizing: border-box;
131
+ /* 2 */
132
+ margin: 0;
133
+ /* 3 */
134
+ border-radius: 0;
135
+ /* 4 */
136
+ font: inherit;
137
+ color: inherit;
138
+ }
139
+
140
+ /*
141
+ * Address inconsistent `text-transform` inheritance which is only inherit in Firefox
142
+ */
143
+
144
+ .uk-form select { text-transform: none; }
145
+
146
+ /*
147
+ * 1. Correct `font` properties not being inherited.
148
+ * 2. Don't inherit the `font-weight` and use `bold` instead.
149
+ * NOTE: Both declarations don't work in Chrome, Safari and Opera.
150
+ */
151
+
152
+ .uk-form optgroup {
153
+ /* 1 */
154
+ font: inherit;
155
+ /* 2 */
156
+ font-weight: bold;
157
+ }
158
+
159
+ /*
160
+ * Removes inner padding and border in Firefox 4+.
161
+ */
162
+
163
+ .uk-form input::-moz-focus-inner {
164
+ border: 0;
165
+ padding: 0;
166
+ }
167
+
168
+ /*
169
+ * Removes excess padding in IE 8/9/10.
170
+ */
171
+
172
+ .uk-form input[type="checkbox"],
173
+ .uk-form input[type="radio"] { padding: 0; }
174
+
175
+ /*
176
+ * Improves consistency of cursor style for clickable elements
177
+ */
178
+
179
+ .uk-form input[type="checkbox"]:not(:disabled),
180
+ .uk-form input[type="radio"]:not(:disabled) { cursor: pointer; }
181
+
182
+ /*
183
+ * Remove default style in iOS.
184
+ */
185
+
186
+ .uk-form textarea,
187
+ .uk-form input:not([type]),
188
+ .uk-form input[type="text"],
189
+ .uk-form input[type="password"],
190
+ .uk-form input[type="email"],
191
+ .uk-form input[type="url"],
192
+ .uk-form input[type="search"],
193
+ .uk-form input[type="tel"],
194
+ .uk-form input[type="number"],
195
+ .uk-form input[type="datetime"] { -webkit-appearance: none; }
196
+
197
+ /*
198
+ * Remove inner padding and search cancel button in Chrome, Safari and Opera on OS X.
199
+ */
200
+
201
+ .uk-form input[type="search"]::-webkit-search-cancel-button,
202
+ .uk-form input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }
203
+
204
+ /*
205
+ * Fix the cursor style for Chrome's increment/decrement buttons. For certain
206
+ * `font-size` values of the `input`, it causes the cursor style of the
207
+ * decrement button to change from `default` to `text`.
208
+ */
209
+
210
+ .uk-form input[type="number"]::-webkit-inner-spin-button,
211
+ .uk-form input[type="number"]::-webkit-outer-spin-button { height: auto; }
212
+
213
+ /*
214
+ * Define consistent border, margin, and padding.
215
+ */
216
+
217
+ .uk-form fieldset {
218
+ border: none;
219
+ margin: 0;
220
+ padding: 0;
221
+ }
222
+
223
+ /*
224
+ * 1. Remove default vertical scrollbar in IE 8/9/10/11.
225
+ * 2. Improve readability and alignment in all browsers.
226
+ */
227
+
228
+ .uk-form textarea {
229
+ /* 1 */
230
+ overflow: auto;
231
+ /* 2 */
232
+ vertical-align: top;
233
+ }
234
+
235
+ /*
236
+ * Removes placeholder transparency in Firefox.
237
+ */
238
+
239
+ .uk-form ::-moz-placeholder { opacity: 1; }
240
+
241
+ /*
242
+ * Removes `box-shadow` for invalid controls in Firefox.
243
+ */
244
+
245
+ .uk-form :invalid { box-shadow: none; }
246
+
247
+ /*
248
+ * Vertical alignment
249
+ */
250
+
251
+ .uk-form input:not([type="radio"]):not([type="checkbox"]),
252
+ .uk-form select { vertical-align: middle; }
253
+
254
+
255
+ /* Style
256
+ ========================================================================== */
257
+
258
+ /*
259
+ * Remove margin from the last-child
260
+ */
261
+
262
+ .uk-form > :last-child { margin-bottom: 0; }
263
+
264
+ /*
265
+ * Controls
266
+ * Except for `range`, `radio`, `checkbox`, `file`, `submit`, `reset`, `button` and `image`
267
+ * 1. Must be `height` because `min-height` is not working in OSX
268
+ * 2. Responsiveness: Sets a maximum width relative to the parent to scale on narrower viewports
269
+ * 3. Vertical `padding` needed for `select` elements in Firefox
270
+ * 4. Style
271
+ */
272
+
273
+ .uk-form select,
274
+ .uk-form textarea,
275
+ .uk-form input:not([type]),
276
+ .uk-form input[type="text"],
277
+ .uk-form input[type="password"],
278
+ .uk-form input[type="datetime"],
279
+ .uk-form input[type="datetime-local"],
280
+ .uk-form input[type="date"],
281
+ .uk-form input[type="month"],
282
+ .uk-form input[type="time"],
283
+ .uk-form input[type="week"],
284
+ .uk-form input[type="number"],
285
+ .uk-form input[type="email"],
286
+ .uk-form input[type="url"],
287
+ .uk-form input[type="search"],
288
+ .uk-form input[type="tel"],
289
+ .uk-form input[type="color"] {
290
+ /* 1 */
291
+ height: $form-height;
292
+ /* 2 */
293
+ max-width: 100%;
294
+ /* 3 */
295
+ padding: $form-padding;
296
+ /* 4 */
297
+ border: $form-border-width solid $form-border;
298
+ background: $form-background;
299
+ color: $form-color;
300
+ -webkit-transition: all linear 0.2s;
301
+ transition: all linear 0.2s;
302
+ @include hook-form();
303
+
304
+ // Focus state
305
+ &:focus {
306
+ border-color: $form-focus-border;
307
+ outline: 0;
308
+ background: $form-focus-background;
309
+ color: $form-focus-color;
310
+ @include hook-form-focus();
311
+ }
312
+
313
+ // Disabled state
314
+ &:disabled {
315
+ border-color: $form-disabled-border;
316
+ background-color: $form-disabled-background;
317
+ color: $form-disabled-color;
318
+ @include hook-form-disabled();
319
+ }
320
+ }
321
+
322
+ /*
323
+ * Placeholder
324
+ */
325
+
326
+ .uk-form :-ms-input-placeholder { color: $form-placeholder-color !important; }
327
+ .uk-form ::-moz-placeholder { color: $form-placeholder-color; }
328
+ .uk-form ::-webkit-input-placeholder { color: $form-placeholder-color; }
329
+
330
+ .uk-form :disabled:-ms-input-placeholder { color: $form-disabled-color !important; }
331
+ .uk-form :disabled::-moz-placeholder { color: $form-disabled-color; }
332
+ .uk-form :disabled::-webkit-input-placeholder { color: $form-disabled-color; }
333
+
334
+ /*
335
+ * Legend
336
+ * 1. Behave like block element
337
+ * 2. Correct `color` not being inherited in IE 8/9/10/11.
338
+ * 3. Remove padding
339
+ * 4. `margin-bottom` is not working in Safari and Opera.
340
+ * Using `padding` and :after instead to create the border
341
+ * 5. Style
342
+ */
343
+
344
+ .uk-form legend {
345
+ /* 1 */
346
+ width: 100%;
347
+ /* 2 */
348
+ border: 0;
349
+ /* 3 */
350
+ padding: 0;
351
+ /* 4 */
352
+ padding-bottom: $form-gutter;
353
+ /* 5 */
354
+ font-size: $form-legend-font-size;
355
+ line-height: $form-legend-line-height;
356
+ @include hook-form-legend();
357
+ }
358
+
359
+ /*
360
+ * 1. Fixes IE9
361
+ */
362
+
363
+ .uk-form legend:after {
364
+ content: "";
365
+ display: block;
366
+ border-bottom: $form-legend-border-width solid $form-legend-border;
367
+ /* 1 */
368
+ width: 100%;
369
+ }
370
+
371
+
372
+ /* Size modifiers
373
+ * Higher specificity needed to override defaults
374
+ ========================================================================== */
375
+
376
+ select.uk-form-small,
377
+ textarea.uk-form-small,
378
+ input[type].uk-form-small,
379
+ input:not([type]).uk-form-small {
380
+ height: $form-small-height;
381
+ padding: $form-small-padding;
382
+ font-size: $form-small-font-size;
383
+ }
384
+
385
+ select.uk-form-large,
386
+ textarea.uk-form-large,
387
+ input[type].uk-form-large,
388
+ input:not([type]).uk-form-large {
389
+ height: $form-large-height;
390
+ padding: $form-large-padding;
391
+ font-size: $form-large-font-size;
392
+ }
393
+
394
+
395
+ /* Reset height
396
+ * Must be after size modifiers
397
+ ========================================================================== */
398
+
399
+ .uk-form textarea,
400
+ .uk-form select[multiple],
401
+ .uk-form select[size] { height: auto; }
402
+
403
+
404
+ /* Validation states
405
+ * Using !important to keep the selector simple
406
+ ========================================================================== */
407
+
408
+ /*
409
+ * Error state
410
+ */
411
+
412
+ .uk-form-danger {
413
+ border-color: $form-danger-border !important;
414
+ background: $form-danger-background !important;
415
+ color: $form-danger-color !important;
416
+ @include hook-form-danger();
417
+ }
418
+
419
+ /*
420
+ * Success state
421
+ */
422
+
423
+ .uk-form-success {
424
+ border-color: $form-success-border !important;
425
+ background: $form-success-background !important;
426
+ color: $form-success-color !important;
427
+ @include hook-form-success();
428
+ }
429
+
430
+
431
+ /* Style modifiers
432
+ * Using !important to keep the selector simple
433
+ ========================================================================== */
434
+
435
+ /*
436
+ * Blank form
437
+ */
438
+
439
+ .uk-form-blank {
440
+ border-color: transparent !important;
441
+ border-style: $form-blank-border-style !important;
442
+ background: none !important;
443
+ @include hook-form-blank();
444
+ }
445
+
446
+ .uk-form-blank:focus {
447
+ border-color: $form-blank-border !important;
448
+ @include hook-form-blank-focus();
449
+ }
450
+
451
+
452
+ /* Size sub-modifiers
453
+ ========================================================================== */
454
+
455
+ /*
456
+ * Fixed widths
457
+ * Different widths for mini sized `input` and `select` elements
458
+ */
459
+
460
+ input.uk-form-width-mini { width: $form-mini-width; }
461
+ select.uk-form-width-mini { width: ($form-mini-width + 25px); }
462
+ .uk-form-width-small { width: $form-small-width; }
463
+ .uk-form-width-medium { width: $form-medium-width; }
464
+ .uk-form-width-large { width: $form-large-width; }
465
+
466
+
467
+ /* Sub-objects: `uk-form-row`
468
+ * Groups labels and controls in rows
469
+ ========================================================================== */
470
+
471
+ /*
472
+ * Micro clearfix
473
+ * Needed for `uk-form-horizontal` modifier
474
+ */
475
+
476
+ .uk-form-row:before,
477
+ .uk-form-row:after {
478
+ content: "";
479
+ display: table;
480
+ }
481
+
482
+ .uk-form-row:after { clear: both; }
483
+
484
+ /*
485
+ * Vertical gutter
486
+ */
487
+
488
+ .uk-form-row + .uk-form-row { margin-top: $form-gutter; }
489
+
490
+
491
+ /* Help text
492
+ * Sub-object: `uk-form-help-inline`, `uk-form-help-block`
493
+ ========================================================================== */
494
+
495
+ .uk-form-help-inline {
496
+ display: inline-block;
497
+ margin: 0 0 0 $form-help-inline-margin-left;
498
+ }
499
+
500
+ .uk-form-help-block { margin: $form-help-block-margin-top 0 0 0; }
501
+
502
+
503
+ /* Controls content
504
+ * Sub-object: `uk-form-controls`, `uk-form-controls-condensed`
505
+ ========================================================================== */
506
+
507
+ /*
508
+ * Remove margins
509
+ */
510
+
511
+ .uk-form-controls > :first-child { margin-top: 0; }
512
+ .uk-form-controls > :last-child { margin-bottom: 0; }
513
+
514
+ /*
515
+ * Group controls and text into blocks with a small spacing between blocks
516
+ */
517
+
518
+ .uk-form-controls-condensed { margin: $form-controls-condensed-margin-vertical 0; }
519
+
520
+
521
+ /* Modifier: `uk-form-stacked`
522
+ * Requires sub-object: `uk-form-label`
523
+ ========================================================================== */
524
+
525
+ .uk-form-stacked .uk-form-label {
526
+ display: block;
527
+ margin-bottom: $form-stacked-margin-bottom;
528
+ font-weight: $form-stacked-font-weight;
529
+ @include hook-form-stacked-label();
530
+ }
531
+
532
+
533
+ /* Modifier: `uk-form-horizontal`
534
+ * Requires sub-objects: `uk-form-label`, `uk-form-controls`
535
+ ========================================================================== */
536
+
537
+ /* Tablet portrait and smaller */
538
+ @media (max-width: $breakpoint-medium-max) {
539
+
540
+ /* Behave like `uk-form-stacked` */
541
+ .uk-form-horizontal .uk-form-label {
542
+ display: block;
543
+ margin-bottom: $form-stacked-margin-bottom;
544
+ font-weight: $form-stacked-font-weight;
545
+ @include hook-form-stacked-label();
546
+ }
547
+
548
+ }
549
+
550
+ /* Desktop and bigger */
551
+ @media (min-width: $breakpoint-large) {
552
+
553
+ .uk-form-horizontal .uk-form-label {
554
+ width: $form-horizontal-label-width;
555
+ margin-top: $form-horizontal-label-margin-top;
556
+ float: left;
557
+ @include hook-form-horizontal-label();
558
+ }
559
+
560
+ .uk-form-horizontal .uk-form-controls { margin-left: $form-horizontal-controls-margin-left; }
561
+
562
+ /* Better vertical alignment if controls are checkboxes and radio buttons with text */
563
+ .uk-form-horizontal .uk-form-controls-text { padding-top: $form-horizontal-controls-text-padding-top; }
564
+
565
+ }
566
+
567
+
568
+ /* Sub-object: `uk-form-icon`
569
+ ========================================================================== */
570
+
571
+ /*
572
+ * 1. Container width fits its content
573
+ * 2. Create position context
574
+ * 3. Prevent `inline-block` consequences
575
+ */
576
+
577
+ .uk-form-icon {
578
+ /* 1 */
579
+ display: inline-block;
580
+ /* 2 */
581
+ position: relative;
582
+ /* 3 */
583
+ max-width: 100%;
584
+ }
585
+
586
+ /*
587
+ * 1. Make form element clickable through icon
588
+ */
589
+
590
+ .uk-form-icon > [class*='uk-icon-'] {
591
+ position: absolute;
592
+ top: 50%;
593
+ width: $form-icon-width;
594
+ margin-top: round($form-icon-font-size / -2);
595
+ font-size: $form-icon-font-size;
596
+ color: $form-icon-color;
597
+ text-align: center;
598
+ /* 1 */
599
+ pointer-events: none;
600
+ }
601
+
602
+ .uk-form-icon:not(.uk-form-icon-flip) > input { padding-left: $form-icon-width !important; }
603
+
604
+ /*
605
+ * Sub-modifier: `uk-form-icon-flip`
606
+ */
607
+
608
+ .uk-form-icon-flip > [class*='uk-icon-'] { right: 0; }
609
+ .uk-form-icon-flip > input { padding-right: $form-icon-width !important; }
610
+
611
+
612
+ // Hooks
613
+ // ========================================================================
614
+
615
+ @include hook-form-misc();
616
+
617
+ // @mixin hook-form(){}
618
+ // @mixin hook-form-focus(){}
619
+ // @mixin hook-form-disabled(){}
620
+ // @mixin hook-form-legend(){}
621
+ // @mixin hook-form-danger(){}
622
+ // @mixin hook-form-success(){}
623
+ // @mixin hook-form-blank(){}
624
+ // @mixin hook-form-blank-focus(){}
625
+ // @mixin hook-form-stacked-label(){}
626
+ // @mixin hook-form-horizontal-label(){}
627
+ // @mixin hook-form-misc(){}