modularis 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (166) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +24 -0
  3. data/.idea/scopes/scope_settings.xml +5 -0
  4. data/.rbenv-version +1 -0
  5. data/CONTRIBUTING.md +53 -0
  6. data/Gemfile +4 -0
  7. data/Gemfile.lock +19 -0
  8. data/Gruntfile.js +27 -0
  9. data/LICENSE +22 -0
  10. data/README.md +27 -0
  11. data/Rakefile +2 -0
  12. data/docs/CHANGELOG.md +260 -0
  13. data/docs/Capfile +4 -0
  14. data/docs/Gemfile +13 -0
  15. data/docs/Gemfile.lock +45 -0
  16. data/docs/Procfile +2 -0
  17. data/docs/README.md +1 -0
  18. data/docs/_sidebar-components.html.erb +115 -0
  19. data/docs/_sidebar.html.erb +115 -0
  20. data/docs/changelog.html.erb +33 -0
  21. data/docs/compile.rb +34 -0
  22. data/docs/components/alert-boxes.html.erb +204 -0
  23. data/docs/components/block-grid.html.erb +132 -0
  24. data/docs/components/breadcrumbs.html.erb +156 -0
  25. data/docs/components/button-groups.html.erb +230 -0
  26. data/docs/components/buttons.html.erb +222 -0
  27. data/docs/components/clearing.html.erb +152 -0
  28. data/docs/components/custom-forms.html.erb +309 -0
  29. data/docs/components/dropdown-buttons.html.erb +235 -0
  30. data/docs/components/dropdown.html.erb +188 -0
  31. data/docs/components/flex-video.html.erb +95 -0
  32. data/docs/components/forms.html.erb +477 -0
  33. data/docs/components/global.html.erb +92 -0
  34. data/docs/components/grid.html.erb +366 -0
  35. data/docs/components/inline-lists.html.erb +91 -0
  36. data/docs/components/joyride.html.erb +183 -0
  37. data/docs/components/keystrokes.html.erb +76 -0
  38. data/docs/components/kitchen-sink.html.erb +870 -0
  39. data/docs/components/labels.html.erb +102 -0
  40. data/docs/components/magellan.html.erb +86 -0
  41. data/docs/components/orbit.html.erb +276 -0
  42. data/docs/components/pagination.html.erb +183 -0
  43. data/docs/components/panels.html.erb +123 -0
  44. data/docs/components/pricing-tables.html.erb +156 -0
  45. data/docs/components/progress-bars.html.erb +123 -0
  46. data/docs/components/reveal.html.erb +162 -0
  47. data/docs/components/section.html.erb +496 -0
  48. data/docs/components/side-nav.html.erb +124 -0
  49. data/docs/components/split-buttons.html.erb +220 -0
  50. data/docs/components/sub-nav.html.erb +122 -0
  51. data/docs/components/switch.html.erb +290 -0
  52. data/docs/components/tables.html.erb +125 -0
  53. data/docs/components/thumbnails.html.erb +89 -0
  54. data/docs/components/tooltips.html.erb +75 -0
  55. data/docs/components/top-bar.html.erb +283 -0
  56. data/docs/components/type.html.erb +396 -0
  57. data/docs/components/visibility.html.erb +110 -0
  58. data/docs/config/deploy.rb +36 -0
  59. data/docs/config.ru +12 -0
  60. data/docs/controller.rb +53 -0
  61. data/docs/css/_coderay.scss +116 -0
  62. data/docs/css/_settings.scss +1 -0
  63. data/docs/css/docs.scss +185 -0
  64. data/docs/css/normalize.scss +396 -0
  65. data/docs/css/qunit-composite.css +13 -0
  66. data/docs/css/qunit.css +235 -0
  67. data/docs/faq.html.erb +63 -0
  68. data/docs/img/demos/demo1-th.jpg +0 -0
  69. data/docs/img/demos/demo1.jpg +0 -0
  70. data/docs/img/demos/demo2-th.jpg +0 -0
  71. data/docs/img/demos/demo2.jpg +0 -0
  72. data/docs/img/demos/demo3-th.jpg +0 -0
  73. data/docs/img/demos/demo3.jpg +0 -0
  74. data/docs/img/demos/demo4-th.jpg +0 -0
  75. data/docs/img/demos/demo4.jpg +0 -0
  76. data/docs/img/demos/demo5-th.jpg +0 -0
  77. data/docs/img/demos/demo5.jpg +0 -0
  78. data/docs/index.html.erb +285 -0
  79. data/docs/javascript.html.erb +134 -0
  80. data/docs/js/docs.js +3 -0
  81. data/docs/js/qunit-composite.js +105 -0
  82. data/docs/js/qunit.js +1977 -0
  83. data/docs/js/tests/tabs/simple_tabs.html +57 -0
  84. data/docs/js/tests/tabs/simple_tabs.js +54 -0
  85. data/docs/js/tests/tooltips/tooltips.html +39 -0
  86. data/docs/js/tests/tooltips/tooltips.js +11 -0
  87. data/docs/layout.html.erb +128 -0
  88. data/docs/media-queries.html.erb +96 -0
  89. data/docs/rails.html.erb +76 -0
  90. data/docs/rtl.html.erb +53 -0
  91. data/docs/sass.html.erb +1295 -0
  92. data/docs/support.html.erb +143 -0
  93. data/docs/test/_test-scripts.html.erb +36 -0
  94. data/docs/test/cards.html.erb +77 -0
  95. data/docs/test/flexbox-grid.html.erb +68 -0
  96. data/docs/test/flip-nav.html.erb +54 -0
  97. data/docs/test/layout.html.erb +15 -0
  98. data/docs/test/off-canvas1.html.erb +64 -0
  99. data/docs/test/off-canvas2.html.erb +75 -0
  100. data/docs/test/off-canvas3.html.erb +65 -0
  101. data/docs/test_layout.html.erb +128 -0
  102. data/js/modularis/index.js +18 -0
  103. data/js/vendor/custom.modernizr.js +4 -0
  104. data/js/vendor/jquery.js +9597 -0
  105. data/js/vendor/zepto.js +1884 -0
  106. data/lib/modularis/engine.rb +18 -0
  107. data/lib/modularis/generators/USAGE +15 -0
  108. data/lib/modularis/generators/install_generator.rb +54 -0
  109. data/lib/modularis/generators/templates/application.html.erb +46 -0
  110. data/lib/modularis/generators/templates/application.html.haml +31 -0
  111. data/lib/modularis/generators/templates/application.html.slim +28 -0
  112. data/lib/modularis/version.rb +3 -0
  113. data/lib/modularis.rb +17 -0
  114. data/modularis.gemspec +20 -0
  115. data/package.json +15 -0
  116. data/scss/compagecss/_variables.scss +1192 -0
  117. data/scss/compagecss/components/_alert-boxes.scss +106 -0
  118. data/scss/compagecss/components/_block-grid.scss +70 -0
  119. data/scss/compagecss/components/_breadcrumbs.scss +124 -0
  120. data/scss/compagecss/components/_button-groups.scss +88 -0
  121. data/scss/compagecss/components/_buttons.scss +226 -0
  122. data/scss/compagecss/components/_clearing.scss +217 -0
  123. data/scss/compagecss/components/_custom-forms.scss +246 -0
  124. data/scss/compagecss/components/_dropdown-buttons.scss +114 -0
  125. data/scss/compagecss/components/_dropdown.scss +149 -0
  126. data/scss/compagecss/components/_flex-video.scss +45 -0
  127. data/scss/compagecss/components/_flexbox-grid.scss +225 -0
  128. data/scss/compagecss/components/_flip.scss +105 -0
  129. data/scss/compagecss/components/_forms.scss +361 -0
  130. data/scss/compagecss/components/_global.scss +289 -0
  131. data/scss/compagecss/components/_grid.scss +184 -0
  132. data/scss/compagecss/components/_inline-lists.scss +52 -0
  133. data/scss/compagecss/components/_joyride.scss +210 -0
  134. data/scss/compagecss/components/_keystrokes.scss +56 -0
  135. data/scss/compagecss/components/_labels.scss +84 -0
  136. data/scss/compagecss/components/_magellan.scss +21 -0
  137. data/scss/compagecss/components/_off-canvas.scss +86 -0
  138. data/scss/compagecss/components/_orbit.scss +209 -0
  139. data/scss/compagecss/components/_pagination.scss +99 -0
  140. data/scss/compagecss/components/_panels.scss +76 -0
  141. data/scss/compagecss/components/_pricing-tables.scss +130 -0
  142. data/scss/compagecss/components/_progress-bars.scss +70 -0
  143. data/scss/compagecss/components/_reveal.scss +131 -0
  144. data/scss/compagecss/components/_section.scss +303 -0
  145. data/scss/compagecss/components/_side-nav.scss +68 -0
  146. data/scss/compagecss/components/_split-buttons.scss +166 -0
  147. data/scss/compagecss/components/_sub-nav.scss +67 -0
  148. data/scss/compagecss/components/_switch.scss +249 -0
  149. data/scss/compagecss/components/_tables.scss +80 -0
  150. data/scss/compagecss/components/_thumbs.scss +47 -0
  151. data/scss/compagecss/components/_tooltips.scss +113 -0
  152. data/scss/compagecss/components/_top-bar.scss +462 -0
  153. data/scss/compagecss/components/_type.scss +422 -0
  154. data/scss/compagecss/components/_visibility.scss +320 -0
  155. data/scss/modularis.scss +49 -0
  156. data/scss/normalize.scss +402 -0
  157. data/templates/project/.gitignore +44 -0
  158. data/templates/project/MIT-LICENSE.txt +20 -0
  159. data/templates/project/config.rb +26 -0
  160. data/templates/project/humans.txt +8 -0
  161. data/templates/project/index.html +124 -0
  162. data/templates/project/manifest.rb +44 -0
  163. data/templates/project/robots.txt +4 -0
  164. data/templates/project/scss/app.scss +48 -0
  165. data/templates/upgrade/manifest.rb +34 -0
  166. metadata +235 -0
@@ -0,0 +1,477 @@
1
+ <% @side_nav = "forms" %>
2
+
3
+ <div class="row">
4
+ <div class="large-9 push-3 columns">
5
+
6
+ <% @page_title = "Forms" %>
7
+ <div class="row">
8
+ <div class="large-12 columns">
9
+ <h2><%= @page_title %></h2>
10
+ <h4 class="subheader">With Modularis, we set out to create an easy to handle, powerful and versatile form layout system. A combination of form styles and the Modularis grid means you can do basically anything.</h4>
11
+
12
+ <form class="custom">
13
+ <fieldset>
14
+ <legend>Fieldset</legend>
15
+
16
+ <div class="row">
17
+ <div class="large-12 columns">
18
+ <label>Input Label</label>
19
+ <input type="text" placeholder="large-12.columns">
20
+ </div>
21
+ </div>
22
+
23
+ <div class="row">
24
+ <div class="large-4 columns">
25
+ <label>Input Label</label>
26
+ <input type="text" placeholder="large-4.columns">
27
+ </div>
28
+ <div class="large-4 columns">
29
+ <label>Input Label</label>
30
+ <input type="text" placeholder="large-4.columns">
31
+ </div>
32
+ <div class="large-4 columns">
33
+ <div class="row collapse">
34
+ <label>Input Label</label>
35
+ <div class="small-9 columns">
36
+ <input type="text" placeholder="small-9.columns">
37
+ </div>
38
+ <div class="small-3 columns">
39
+ <span class="postfix">.com</span>
40
+ </div>
41
+ </div>
42
+ </div>
43
+ </div>
44
+
45
+ <div class="row">
46
+ <div class="large-12 columns">
47
+ <label>Textarea Label</label>
48
+ <textarea placeholder="small-12.columns"></textarea>
49
+ </div>
50
+ </div>
51
+
52
+ </fieldset>
53
+ </form>
54
+
55
+ <hr>
56
+ </div>
57
+ </div>
58
+
59
+ <div class="row">
60
+ <div class="large-12 columns">
61
+
62
+ <h3>Building Forms with HTML</h3>
63
+ <p>OK, so you have a client that needs a form with an unhuman layout. "You can't back down because of some legal reason," he says. What are you to do? Modularis has you covered with versatile forms that looks great out of the box and are easily customizable as you need.</p>
64
+
65
+ <p>Form elements in Modularis are styled based on their type attribute rather than a class. Inputs in Modularis have another major advantage &mdash; they are full width by default. That means that inputs will run as wide as the column that contains them. However, you have two options which make these forms extremely versatile:</p>
66
+
67
+ <ul class="disc">
68
+ <li>You can size inputs using column sizes, like <code>.large-6</code>, <code>.small-6</code>.</li>
69
+ <li>You can create row elements inside your form and use columns for the form, including inputs, labels and more. Rows inside a form inherit some special padding to even up input spacing.</li>
70
+ </ul>
71
+
72
+ <p>This ultimately adds a bit of code to your forms, but it's worth the trade off! Here's what the example above looks like in HTML:</p>
73
+
74
+ <%= code_example '
75
+ <form>
76
+ <fieldset>
77
+ <legend>Fieldset</legend>
78
+
79
+ <div class="row">
80
+ <div class="large-12 columns">
81
+ <label>Input Label</label>
82
+ <input type="text" placeholder="large-12.columns">
83
+ </div>
84
+ </div>
85
+
86
+ <div class="row">
87
+ <div class="large-4 columns">
88
+ <label>Input Label</label>
89
+ <input type="text" placeholder="large-4.columns">
90
+ </div>
91
+ <div class="large-4 columns">
92
+ <label>Input Label</label>
93
+ <input type="text" placeholder="large-4.columns">
94
+ </div>
95
+ <div class="large-4 columns">
96
+ <div class="row collapse">
97
+ <label>Input Label</label>
98
+ <div class="small-9 columns">
99
+ <input type="text" placeholder="small-9.columns">
100
+ </div>
101
+ <div class="small-3 columns">
102
+ <span class="postfix">.com</span>
103
+ </div>
104
+ </div>
105
+ </div>
106
+ </div>
107
+
108
+ <div class="row">
109
+ <div class="large-12 columns">
110
+ <label>Textarea Label</label>
111
+ <textarea placeholder="small-12.columns"></textarea>
112
+ </div>
113
+ </div>
114
+
115
+ </fieldset>
116
+ </form>', :html %>
117
+
118
+ <hr>
119
+
120
+ <h4>Inline Labels</h4>
121
+ <p>Sometimes you want a form with labels to the left of your inputs. Piece of cake. You can put the label inside a different column to the left of the input. Then add a class of <code>.right</code> to the label to have it align to the right.</p>
122
+
123
+ <%= code_example '
124
+ <form>
125
+ <div class="row">
126
+ <div class="small-8">
127
+ <div class="row">
128
+ <div class="small-3 columns">
129
+ <label for="right-label" class="right">Label</label>
130
+ </div>
131
+ <div class="small-9 columns">
132
+ <input type="text" id="right-label" placeholder="Inline Text Input">
133
+ </div>
134
+ </div>
135
+ </div>
136
+ </div>
137
+ </form>
138
+ ', :html %>
139
+
140
+ <form>
141
+ <div class="row">
142
+ <div class="small-8">
143
+ <div class="row">
144
+ <div class="small-3 columns">
145
+ <label for="right-label" class="right">Label</label>
146
+ </div>
147
+ <div class="small-9 columns">
148
+ <input type="text" id="right-label" placeholder="Inline Text Input">
149
+ </div>
150
+ </div>
151
+ </div>
152
+ </div>
153
+ </form>
154
+
155
+ <p>Adding a class of <code>.inline</code> will have it vertically center against an input. You can use one or both of these classes to accomplish the look you want.</p>
156
+
157
+ <%= code_example '
158
+ <form>
159
+ <div class="row">
160
+ <div class="small-8">
161
+ <div class="row">
162
+ <div class="small-3 columns">
163
+ <label for="right-label" class="right inline">Label</label>
164
+ </div>
165
+ <div class="small-9 columns">
166
+ <input type="text" id="right-label" placeholder="Inline Text Input">
167
+ </div>
168
+ </div>
169
+ </div>
170
+ </div>
171
+ </form>
172
+ ', :html %>
173
+
174
+ <form>
175
+ <div class="row">
176
+ <div class="small-8">
177
+ <div class="row">
178
+ <div class="small-3 columns">
179
+ <label for="right-label" class="right inline">Label</label>
180
+ </div>
181
+ <div class="small-9 columns">
182
+ <input type="text" id="right-label" placeholder="Inline Text Input">
183
+ </div>
184
+ </div>
185
+ </div>
186
+ </div>
187
+ </form>
188
+
189
+ <hr>
190
+
191
+ <h4>Defining a Fieldset</h4>
192
+ <p>We don't see them too much, but one of the useful form elements included with Modularis is <code>&lt;fieldset&gt;</code>. This is used as a wrapper right inside the form element. Right after you define a fieldset, you can include a legend title by using <code>&lt;legend&gt;</code>. Here's some HTML to help make copy paste.</p>
193
+
194
+ <%= code_example '
195
+ <form>
196
+ <fieldset>
197
+ <legend>Fieldset Legend</legend>
198
+
199
+ <label>Input Label</label>
200
+ <input type="text" placeholder="Inputs and other form elements go inside...">
201
+ </fieldset>
202
+ </form>', :html %>
203
+
204
+ <form>
205
+ <fieldset>
206
+ <legend>Fieldset Legend</legend>
207
+
208
+ <label>Input Label</label>
209
+ <input type="text" placeholder="Inputs and other form elements go inside...">
210
+ </fieldset>
211
+ </form>
212
+
213
+ <hr>
214
+
215
+ <h4>Pre/Postfix Labels &amp; Actions</h4>
216
+ <p>Modularis forms support actions tied to buttons, and prefix / postfix labels, through a versatile approach using special grid properties. Essentially you can use <code>&lt;row class="collapse"&gt;</code> to create label / action / input combinations. You use the Modularis columns to define the size of the pre/postfix <code>&lt;span class="postfix"&gt;</code> or <code>&lt;span class="prefix"&gt;</code>. Here are a few examples:</p>
217
+
218
+ <%= code_example '
219
+ <form>
220
+ <div class="row collapse">
221
+ <div class="small-3 large-2 columns">
222
+ <span class="prefix">http://</span>
223
+ </div>
224
+ <div class="small-9 large-10 columns">
225
+ <input type="text" placeholder="Enter your URL...">
226
+ </div>
227
+ </div>
228
+ <div class="row">
229
+ <div class="large-6 columns">
230
+ <div class="row collapse">
231
+ <div class="small-10 columns">
232
+ <input type="text" placeholder="Hex Value">
233
+ </div>
234
+ <div class="small-2 columns">
235
+ <a href="#" class="button prefix">Action</a>
236
+ </div>
237
+ </div>
238
+ </div>
239
+ <div class="large-6 columns">
240
+ <div class="row collapse">
241
+ <div class="small-9 columns">
242
+ <input type="text" placeholder="Value">
243
+ </div>
244
+ <div class="small-3 columns">
245
+ <span class="postfix radius">Label</span>
246
+ </div>
247
+ </div>
248
+ </div>
249
+ </div>
250
+ </form>', :html %>
251
+
252
+ <form>
253
+ <div class="row collapse">
254
+ <div class="small-3 large-2 columns">
255
+ <span class="prefix">http://</span>
256
+ </div>
257
+ <div class="small-9 large-10 columns">
258
+ <input type="text" placeholder="Enter your URL...">
259
+ </div>
260
+ </div>
261
+ <div class="row">
262
+ <div class="large-6 columns">
263
+ <div class="row collapse">
264
+ <div class="small-10 columns">
265
+ <input type="text" placeholder="Hex Value">
266
+ </div>
267
+ <div class="small-2 columns">
268
+ <a href="#" class="button prefix">Action</a>
269
+ </div>
270
+ </div>
271
+ </div>
272
+ <div class="large-6 columns">
273
+ <div class="row collapse">
274
+ <div class="small-9 columns">
275
+ <input type="text" placeholder="Value">
276
+ </div>
277
+ <div class="small-3 columns">
278
+ <span class="postfix radius">Label</span>
279
+ </div>
280
+ </div>
281
+ </div>
282
+ </div>
283
+ </form>
284
+
285
+ <p>You'll notice that on the last postfix element, we've included the class of <code>radius</code>. This adds the border radius on the appropriate edge depending on whether it's a prefix or a postfix element. You can even include buttons with these styles, just apply the <code>.button</code> as well as the pre/postfix class.</p>
286
+
287
+ <hr>
288
+
289
+ <h4>Error States</h4>
290
+ <p>Modularis includes error states for labels, inputs and messaging that you can have your app generate programatically. You can attach a class of <code>.error</code> either to the individual elements (label, input, small) or to a column/div.</p>
291
+
292
+ <%= code_example '
293
+ <form>
294
+ <div class="row">
295
+ <div class="large-6 columns">
296
+ <label class="error">Error</label>
297
+ <input type="text" class="error" />
298
+ <small class="error">Invalid entry</small>
299
+ </div>
300
+ <div class="large-6 columns error">
301
+ <label>Another Error</label>
302
+ <input type="text" />
303
+ <small>Invalid entry</small>
304
+ </div>
305
+ </div>
306
+ <textarea class="error" placeholder="Message..."></textarea>
307
+ <small class="error">Invalid entry</small>
308
+ </form>', :html %>
309
+
310
+ <form>
311
+ <div class="row">
312
+ <div class="large-6 columns">
313
+ <label class="error">Error</label>
314
+ <input type="text" class="error" />
315
+ <small class="error">Invalid entry</small>
316
+ </div>
317
+
318
+ <div class="large-6 columns error">
319
+ <label>Another Error</label>
320
+ <input type="text" />
321
+ <small>Invalid entry</small>
322
+ </div>
323
+ </div>
324
+
325
+ <textarea class="error" placeholder="Message..."></textarea>
326
+ <small class="error">Invalid entry</small>
327
+ </form>
328
+
329
+ <hr>
330
+
331
+ <h3>Build with Mixins</h3>
332
+ <p>A lot of elements in Modularis can be created using SCSS mixins so that you can include your own classes and just enough style as needed for the job at hand. To use these mixins, you'll need to have the extension installed or grab <a href="https://github.com/themepile/modularis/blob/master/scss/modularis/_modularis-global.scss">_modularis-global.scss</a>, <a href="https://github.com/themepile/modularis/blob/master/scss/modularis/components/_forms.scss">_forms.scss</a>, <a href="https://github.com/themepile/modularis/blob/master/scss/modularis/components/_global.scss">_global.scss</a> and <a href="https://github.com/themepile/modularis/blob/master/scss/modularis/components/_buttons.scss">_buttons.scss</a> from Github and throw them into a Modularis folder in your project directory. From there, you can import the files at the top of your own SCSS stylesheet, like so:</p>
333
+
334
+ <%= code_example '
335
+ @import "modularis/modularis-global", "modularis/components/global", "modularis/components/buttons", "modularis/components/forms";', :css %>
336
+
337
+
338
+ <p>We include most of the form styles by default, but the ones that are attached to HTML classes can be accessed via the mixins below. The error states have mixins, but we suggest using the classes since they are usually only visible temporarily.</p>
339
+
340
+ <h5>The Pre/Postfix Mixin</h5>
341
+ <p>With the form label mixin, you can control which classes make your labels line up how you want them to next to their form elements. You'll use these in conjunction with the grid mixin.</p>
342
+
343
+ <%= code_example '
344
+ <form>
345
+ <div class="row collapse">
346
+ <span class="your-prefix-class">Label</span>
347
+ <input type="text" class="your-label-class" placeholder="Value">
348
+ </div>
349
+ </form>', :html %>
350
+
351
+ <p>Since you need to wrap columns in a container anyway, we've used a <code>.row.collapse</code> rather than creating our own class to hold those mixins. Feel free to attach those styles to your own class or ID though.</p>
352
+
353
+ <h6>The base mixin:</h6>
354
+
355
+ <%= code_example '
356
+ .your-prefix-class {
357
+ @include prefix-postfix-base;
358
+ @include grid-column($columns:3,$float:left);
359
+ }
360
+
361
+ input[type="text"].your-input-class {
362
+ @include grid-column($columns:9);
363
+ }', :css %>
364
+
365
+ <form>
366
+ <div class="row collapse">
367
+ <span class="attached-label">Label</span>
368
+ <input type="text" class="attached-input" placeholder="Value">
369
+ </div>
370
+ </form>
371
+
372
+ <h6>The Prefix &amp; Postfix Style Mixins</h6>
373
+ <p>You can control the style you add to your prefix or postfix elements using this mixin, it looks like this:</p>
374
+
375
+ <%= code_example '
376
+ .your-prefix-class {
377
+ @include prefix-postfix-base;
378
+ @include prefix;
379
+ @include grid-column($columns:3,$float:left);
380
+ }
381
+
382
+ input[type="text"].your-input-class {
383
+ @include grid-column($columns:9);
384
+ }', :css %>
385
+
386
+ <form>
387
+ <div class="row collapse">
388
+ <span class="attached-label style">Label</span>
389
+ <input type="text" class="attached-input" placeholder="Value">
390
+ </div>
391
+ </form>
392
+
393
+ <p>There are two options you can set with the prefix and postfix mixins, these are:</p>
394
+
395
+ <%= code_example '
396
+ @include prefix($bg, $is-button);
397
+
398
+ /* Control the background color, which also effect the border and font color */
399
+ $bg: $input-prefix-bg
400
+
401
+ /* If you prefix or postfix element is a button, make sure to set this to true */
402
+ $is-button: false
403
+ ', :css %>
404
+
405
+ <form>
406
+ <div class="row collapse">
407
+ <span class="attached-label style custom">Label</span>
408
+ <input type="text" class="attached-input" placeholder="Value">
409
+ </div>
410
+ </form>
411
+
412
+ <h5>Default SCSS Variables</h5>
413
+ <%= code_example '
414
+ /* We use this to set the base for lots of form spacing and positioning styles */
415
+ $form-spacing: emCalc(16px);
416
+
417
+ /* We use these to style the labels in different ways */
418
+ $form-label-pointer: pointer;
419
+ $form-label-font-size: emCalc(14px);
420
+ $form-label-font-weight: 500;
421
+ $form-label-font-color: lighten(#000, 30%);
422
+ $form-label-bottom-margin: emCalc(3px);
423
+ $input-font-color: rgba(0,0,0,0.75);
424
+ $input-font-size: emCalc(14px);
425
+ $input-bg-color: #fff;
426
+ $input-focus-bg-color: darken(#fff, 2%);
427
+ $input-border-color: darken(#fff, 20%);
428
+ $input-focus-border-color: darken(#fff, 40%);
429
+ $input-border-style: solid;
430
+ $input-border-width: 1px;
431
+ $input-disabled-bg: #ddd;
432
+ $input-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
433
+ $input-include-glowing-effect: true;
434
+
435
+ /* We use these to style the fieldset border and spacing. */
436
+ $fieldset-border-style: solid;
437
+ $fieldset-border-width: 1px;
438
+ $fieldset-border-color: #ddd;
439
+ $fieldset-padding: emCalc(20px);
440
+ $fieldset-margin: emCalc(18px) 0;
441
+
442
+ /* We use these to style the legends when you use them */
443
+ $legend-bg: #fff;
444
+ $legend-font-weight: bold;
445
+ $legend-padding: 0 emCalc(3px);
446
+
447
+ /* We use these to style the prefix and postfix input elements */
448
+ $input-prefix-bg: darken(#fff, 5%);
449
+ $input-prefix-border-color: darken(#fff, 20%);
450
+ $input-prefix-border-size: 1px;
451
+ $input-prefix-border-type: solid;
452
+ $input-prefix-overflow: hidden;
453
+ $input-prefix-font-color: #333;
454
+ $input-prefix-font-color-alt: #fff;
455
+
456
+ /* We use these to style the error states for inputs and labels */
457
+ $input-error-message-padding: emCalc(6px) emCalc(4px);
458
+ $input-error-message-top: -($form-spacing) - emCalc(5px);
459
+ $input-error-message-font-size: emCalc(12px);
460
+ $input-error-message-font-weight: bold;
461
+ $input-error-message-font-color: #fff;
462
+ $input-error-message-font-color-alt: #333;
463
+
464
+ +/* We use this to style the glowing effect of inputs when focused */
465
+ +$glowing-effect-fade-time: 0.45s !default;
466
+ +$glowing-effect-color: $input-focus-border-color !default;
467
+
468
+ ', :css %>
469
+
470
+ <p><strong>Note:</strong> <code>emCalc();</code> is a function we wrote to convert <code>px</code> to <code>em</code>. It is included in <strong>_modularis-global.scss</strong>.</p>
471
+ </div>
472
+ </div>
473
+ </div>
474
+ <div class="large-3 pull-9 columns">
475
+ <%= render "_sidebar-components.html.erb" %>
476
+ </div>
477
+ </div>
@@ -0,0 +1,92 @@
1
+ <% @side_nav = "css" %>
2
+
3
+ <div class="row">
4
+ <div class="large-9 push-3 columns">
5
+ <div class="row">
6
+ <div class="large-12 columns">
7
+ <% @page_title = "Global" %>
8
+ <h2><%= @page_title %></h2>
9
+ <h4 class="subheader">Every Modularis project needs to include these global styles in order to work properly. These include things like basic formatting and global utility classes.</h4>
10
+
11
+ <hr>
12
+
13
+ <%= code_example "
14
+ /* Set box-sizing globally to handle padding and border widths */
15
+ *,
16
+ *:before,
17
+ *:after {
18
+ @include box-sizing(border-box);
19
+ }
20
+
21
+ html,
22
+ body { font-size: $base-font-size; }
23
+
24
+ /* Default body styles */
25
+ body {
26
+ background: $body-bg;
27
+ color: $body-font-color;
28
+ padding: 0;
29
+ margin: 0;
30
+ font-family: $body-font-family;
31
+ font-weight: $body-font-weight;
32
+ font-style: $body-font-style;
33
+ line-height: 1;
34
+ position: relative;
35
+ }
36
+
37
+ /* Override outline from normalize, we don't like it */
38
+ a:focus { outline: none; }
39
+
40
+ /* Grid Defaults to get images and embeds to work properly */
41
+ img,
42
+ object,
43
+ embed { max-width: 100%; height: auto; }
44
+
45
+ object,
46
+ embed { height: 100%; }
47
+ img { -ms-interpolation-mode: bicubic; }
48
+
49
+ #map_canvas,
50
+ .map_canvas {
51
+ img,
52
+ embed,
53
+ object { max-width: none !important;
54
+ }
55
+ }
56
+
57
+ /* Miscellaneous useful HTML classes */
58
+ .left { float: left !important; }
59
+ .right { float: right !important; }
60
+ .text-left { text-align: left !important; }
61
+ .text-right { text-align: right !important; }
62
+ .text-center { text-align: center !important; }
63
+ .text-justify { text-align: justify !important; }
64
+ .hide { display: none; }
65
+
66
+ /* Font smoothing */
67
+ /* Antialiased font smoothing works best for light text on a dark background. */
68
+ /* Apply to single elements instead of globally to body. */
69
+ /* Note this only applies to webkit-based desktop browsers on the Mac. */
70
+ .antialiased { -webkit-font-smoothing: antialiased; }
71
+
72
+ /* Get rid of gap under images by making them display: inline-block; by default */
73
+ img { display: inline-block; }
74
+
75
+ /* Make sure textarea takes on height automatically */
76
+ textarea { height: auto; min-height: 50px; }
77
+
78
+ /* Make select elements 100% width by default */
79
+ select { width: 100%; }
80
+ ", :css %>
81
+
82
+ </div>
83
+ </div>
84
+
85
+ </div>
86
+
87
+ <div class="large-3 pull-9 columns">
88
+ <%= render "_sidebar-components.html.erb" %>
89
+ </div>
90
+
91
+ </div>
92
+