underoos 1.0.0 → 1.1.0

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 (140) hide show
  1. data/Gemfile +5 -0
  2. data/Gemfile.lock +21 -7
  3. data/README.md +85 -10
  4. data/Rakefile +36 -1
  5. data/app/assets/javascripts/docs.js +6 -0
  6. data/app/assets/javascripts/styleguide.coffee +162 -0
  7. data/app/assets/javascripts/underoos.js +0 -1
  8. data/app/assets/stylesheets/base/_base.sass +14 -0
  9. data/app/assets/stylesheets/base/_buttons.sass +68 -0
  10. data/app/assets/stylesheets/base/_forms.sass +313 -24
  11. data/app/assets/stylesheets/base/_helpers.sass +27 -13
  12. data/app/assets/stylesheets/base/_normalize.sass +17 -9
  13. data/app/assets/stylesheets/base/_scaffold.sass +85 -0
  14. data/app/assets/stylesheets/base/_tables.sass +77 -0
  15. data/app/assets/stylesheets/base/_transitions.sass +10 -2
  16. data/app/assets/stylesheets/base/_typography.sass +183 -21
  17. data/app/assets/stylesheets/components/_accordions.sass +38 -0
  18. data/app/assets/stylesheets/components/_breadcrumbs.sass +19 -5
  19. data/app/assets/stylesheets/components/_button-groups.sass +43 -0
  20. data/app/assets/stylesheets/components/_carets.sass +13 -2
  21. data/app/assets/stylesheets/components/_carousels.sass +32 -0
  22. data/app/assets/stylesheets/components/_close.sass +15 -2
  23. data/app/assets/stylesheets/components/_components.sass +28 -0
  24. data/app/assets/stylesheets/components/_decals.sass +14 -0
  25. data/app/assets/stylesheets/components/_dropdowns.sass +88 -4
  26. data/app/assets/stylesheets/components/_media.sass +36 -0
  27. data/app/assets/stylesheets/components/_modals.sass +29 -0
  28. data/app/assets/stylesheets/components/_nav-lists.sass +20 -0
  29. data/app/assets/stylesheets/components/_navbars.sass +64 -3
  30. data/app/assets/stylesheets/components/_notifications.sass +112 -16
  31. data/app/assets/stylesheets/components/_paddles.sass +26 -0
  32. data/app/assets/stylesheets/components/_pagination.sass +23 -3
  33. data/app/assets/stylesheets/components/_pills.sass +80 -0
  34. data/app/assets/stylesheets/components/_popovers.sass +28 -0
  35. data/app/assets/stylesheets/components/_progress-bars.sass +33 -1
  36. data/app/assets/stylesheets/components/_tabs.sass +79 -0
  37. data/app/assets/stylesheets/components/_tooltips.sass +26 -0
  38. data/app/assets/stylesheets/components/_wells.sass +9 -0
  39. data/app/assets/stylesheets/layouts/_containers.sass +12 -0
  40. data/app/assets/stylesheets/layouts/_layouts.sass +5 -0
  41. data/app/assets/stylesheets/layouts/_print.sass +5 -1
  42. data/app/assets/stylesheets/layouts/_queries.sass +18 -15
  43. data/app/assets/stylesheets/layouts/_upgrades.sass +51 -40
  44. data/app/assets/stylesheets/mixins/_arrows.sass +13 -1
  45. data/app/assets/stylesheets/mixins/_clearfixins.sass +18 -4
  46. data/app/assets/stylesheets/mixins/_coloring.sass +10 -1
  47. data/app/assets/stylesheets/mixins/_columns.sass +16 -3
  48. data/app/assets/stylesheets/mixins/_conversions.sass +18 -6
  49. data/app/assets/stylesheets/mixins/_font-size.sass +16 -1
  50. data/app/assets/stylesheets/mixins/_image-tools.sass +12 -1
  51. data/app/assets/stylesheets/mixins/_inline-block.sass +21 -0
  52. data/app/assets/stylesheets/mixins/_ir.sass +14 -1
  53. data/app/assets/stylesheets/mixins/_mixins.sass +6 -0
  54. data/app/assets/stylesheets/mixins/_responsive.sass +16 -0
  55. data/app/assets/stylesheets/mixins/_sticky-footer.sass +52 -0
  56. data/app/assets/stylesheets/mixins/_tab-focus.sass +8 -1
  57. data/app/assets/stylesheets/mixins/_timing-equations.sass +34 -1
  58. data/app/assets/stylesheets/mixins/_visibility.sass +18 -5
  59. data/app/assets/stylesheets/polyfills/_box-shadow.sass +10 -0
  60. data/app/assets/stylesheets/polyfills/_box-sizing.sass +10 -1
  61. data/app/assets/stylesheets/polyfills/_functions.sass +14 -1
  62. data/app/assets/stylesheets/polyfills/_opacity.sass +10 -1
  63. data/app/assets/stylesheets/polyfills/_polyfills.sass +9 -2
  64. data/app/assets/stylesheets/polyfills/_transition.sass +10 -0
  65. data/app/assets/stylesheets/polyfills/_user-select.sass +10 -0
  66. data/app/assets/stylesheets/settings/_config.sass +26 -0
  67. data/app/assets/stylesheets/settings/_settings.sass +7 -0
  68. data/app/assets/stylesheets/settings/_theme.sass +189 -0
  69. data/app/assets/stylesheets/{styleguide.sass → underoos-docs.sass} +20 -116
  70. data/app/assets/stylesheets/underoos.sass +5 -16
  71. data/config.ru +1 -3
  72. data/features/generator.feature +13 -4
  73. data/lib/generators/underoos/assets_generator.rb +4 -2
  74. data/lib/underoos/version.rb +1 -1
  75. data/public/images.html +157 -0
  76. data/public/index.html +149 -0
  77. data/public/sherpa.css +306 -0
  78. data/public/styles.html +5374 -0
  79. data/script/javascripts +0 -1
  80. data/sherpa/config.yml +96 -0
  81. data/sherpa/layouts/images.mustache +17 -0
  82. data/sherpa/layouts/layout.mustache +77 -0
  83. data/sherpa/layouts/overview.mustache +19 -0
  84. data/sherpa/layouts/raw.mustache +25 -0
  85. data/sherpa/layouts/section.mustache +67 -0
  86. data/underoos.gemspec +0 -2
  87. data/vendor/assets/javascripts/bootstrap-alert.js +28 -32
  88. data/vendor/assets/javascripts/bootstrap-button.js +29 -33
  89. data/vendor/assets/javascripts/bootstrap-collapse.js +45 -26
  90. data/vendor/assets/javascripts/bootstrap-dropdown.js +18 -10
  91. data/vendor/assets/javascripts/bootstrap-modal.js +25 -17
  92. data/vendor/assets/javascripts/bootstrap-popover.js +13 -10
  93. data/vendor/assets/javascripts/bootstrap-tab.js +12 -7
  94. data/vendor/assets/javascripts/bootstrap-tooltip.js +40 -35
  95. data/vendor/assets/javascripts/bootstrap-transition.js +30 -20
  96. data/vendor/assets/javascripts/bootstrap-typeahead.js +24 -10
  97. data/vendor/assets/javascripts/sherpa.coffee +78 -0
  98. metadata +34 -75
  99. data/app/assets/javascripts/styleguide.js +0 -132
  100. data/app/assets/stylesheets/base/_elements.sass +0 -61
  101. data/app/assets/stylesheets/polyfills/_inline-block.sass +0 -8
  102. data/app/assets/stylesheets/themes/_default.sass +0 -119
  103. data/app/controllers/underoos/styleguides_controller.rb +0 -79
  104. data/app/views/shared/_upgrades.html.haml +0 -12
  105. data/app/views/underoos/styleguides/_assets.haml +0 -42
  106. data/app/views/underoos/styleguides/_components.haml +0 -42
  107. data/app/views/underoos/styleguides/_elements.haml +0 -242
  108. data/app/views/underoos/styleguides/_forms.haml +0 -305
  109. data/app/views/underoos/styleguides/_layouts.haml +0 -76
  110. data/app/views/underoos/styleguides/_palettes.haml +0 -18
  111. data/app/views/underoos/styleguides/_resources.haml +0 -27
  112. data/app/views/underoos/styleguides/_tables.haml +0 -124
  113. data/app/views/underoos/styleguides/_typography.haml +0 -284
  114. data/app/views/underoos/styleguides/_utilities.haml +0 -270
  115. data/app/views/underoos/styleguides/components/_accordions.haml +0 -83
  116. data/app/views/underoos/styleguides/components/_breadcrumbs.haml +0 -42
  117. data/app/views/underoos/styleguides/components/_button-groups.haml +0 -162
  118. data/app/views/underoos/styleguides/components/_carets.haml +0 -28
  119. data/app/views/underoos/styleguides/components/_close.haml +0 -20
  120. data/app/views/underoos/styleguides/components/_decals.haml +0 -40
  121. data/app/views/underoos/styleguides/components/_dropdowns.haml +0 -189
  122. data/app/views/underoos/styleguides/components/_media.haml +0 -78
  123. data/app/views/underoos/styleguides/components/_modals.haml +0 -42
  124. data/app/views/underoos/styleguides/components/_nav-lists.haml +0 -52
  125. data/app/views/underoos/styleguides/components/_navbars.haml +0 -144
  126. data/app/views/underoos/styleguides/components/_navs-showcase.haml +0 -27
  127. data/app/views/underoos/styleguides/components/_notifications.haml +0 -169
  128. data/app/views/underoos/styleguides/components/_paddles.haml +0 -68
  129. data/app/views/underoos/styleguides/components/_pagination.haml +0 -64
  130. data/app/views/underoos/styleguides/components/_popovers.haml +0 -33
  131. data/app/views/underoos/styleguides/components/_progress-bars.haml +0 -72
  132. data/app/views/underoos/styleguides/components/_tabs-pills.haml +0 -241
  133. data/app/views/underoos/styleguides/components/_tooltips.haml +0 -37
  134. data/app/views/underoos/styleguides/components/_wells.haml +0 -29
  135. data/app/views/underoos/styleguides/index.html.haml +0 -259
  136. data/app/views/underoos/styleguides/partials/_form-template.haml +0 -171
  137. data/app/views/underoos/styleguides/partials/_table-data.haml +0 -33
  138. data/app/views/underoos/styleguides/partials/_transitions.haml +0 -136
  139. data/config/routes.rb +0 -3
  140. data/vendor/assets/javascripts/bootstrap-scrollspy.js +0 -125
@@ -1,5 +1,290 @@
1
1
 
2
- // ## Form containers and base settings
2
+ //~
3
+ // Styling for inputs, textarea, labels, selects, and other controls associated
4
+ // with form elements. Tuned to play with [formtastic](https://github.com/justinfrench/formtastic).
5
+ //
6
+ // Forms can be styled by applying a top level class on the `<form>` element.
7
+ //
8
+ // Name | Class | Usage
9
+ // --------------- | ------------------- | ---------------------------
10
+ // Vertical | _not required_ | Stacked label, controls and hints
11
+ // Horizontal | `.form-horizontal` | Labels and controls on the same line, stacked hints
12
+ // Inline | `.form-inline` | All controls on the same line
13
+ // Search | `.form-search` | Similar to inline, but targets a search field
14
+ //
15
+ // Notes:
16
+ // - **Pro Tip!** Add one of the `.well` classes to the `<form>` element to contain it from other items on the page
17
+
18
+ //~
19
+ // #### Basic form
20
+ // Small sample of form control elements using the default layout.
21
+ //
22
+ // Usage:
23
+ // <form class="well dark">
24
+ // <ol>
25
+ // <li>
26
+ // <label class="label" for="example_url">Domain Name<abbr title="required">*</abbr></label>
27
+ // <input class="input-medium" id="example_url" name="example[url]" placeholder="www.example.com" type="url">
28
+ // <p class="hint">Enter your domain name!</p>
29
+ // </li>
30
+ // <li class="boolean">
31
+ // <label for="example_check" name="example[check]">
32
+ // <input id="example_check" name="example[check]" type="checkbox" value="0">
33
+ // Check this box!
34
+ // </label>
35
+ // </li>
36
+ // <li class="form-actions">
37
+ // <button class="btn" type="submit">Submit</button>
38
+ // </li>
39
+ // </ol>
40
+ // </form>
41
+
42
+ //~
43
+ // #### Inline form
44
+ // Utilizing the `.form-inline` class on the `<form>` element for small forms needing a compact style.
45
+ //
46
+ // Usage:
47
+ // <form class="form-inline well dark">
48
+ // <ol>
49
+ // <li>
50
+ // <input class="input-small" name="test[email]" placeholder="email" type="email">
51
+ // <input class="input-small" name="test[password]" placeholder="password" type="password">
52
+ // <button class="btn" type="submit">Go</button>
53
+ // </li>
54
+ // </ol>
55
+ // </form>
56
+
57
+ //~
58
+ // #### Search form
59
+ // Utilizing the `.form-search` class on the `<form>` element for forms associated with searching.
60
+ //
61
+ // Notes:
62
+ // - **Pro Tip** Add the class `search-query` to input elements for rounded corners.
63
+ //
64
+ // Usage:
65
+ // <form class="form-search well dark">
66
+ // <ol>
67
+ // <li>
68
+ // <input class="search-query input-small" name="test[search]" placeholder="google" type="search">
69
+ // <button class="btn" type="submit">Search</button>
70
+ // </li>
71
+ // </ol>
72
+ // </form>
73
+
74
+ //~
75
+ // #### Horizontal &amp; Vertical forms
76
+ // These are the most common layouts used by forms. The structure for both vertical and horizontal
77
+ // forms remains the same, swapping between the two styles is a matter of changing the class name
78
+ // on the top level `<form>` element.
79
+ //
80
+ // Notes:
81
+ // - **Pro Tip!** Adding the `.error|.warning|.success` class to the `<li>` will show the state on the element
82
+ // - **Pro Tip!** For fully disabled controls the `<li>` element needs the class `.disabled`, as well the `disabled` attribute on `input`, `select`, and `textarea` controls
83
+ //
84
+ // Usage:
85
+ // <!-- Testing purposes only -->
86
+ // <section class="button-toolbar" id="underoos_form_demo_type" style="margin-bottom:1.5em;">
87
+ // <nav class="button-group" data-toggle="buttons-radio">
88
+ // <a class="btn" href="#" data-form-type="form-vertical">Vertical</a>
89
+ // <a class="btn active" href="#" data-form-type="form-horizontal">Horizontal</a>
90
+ // </nav>
91
+ // <nav class="button-group" data-toggle="buttons-radio">
92
+ // <a class="btn" href="#" data-form-type="regular">Well</a>
93
+ // <a class="btn active" href="#" data-form-type="dark">Dark</a>
94
+ // <a class="btn" href="#" data-form-type="lite">Light</a>
95
+ // <a class="btn" href="#" data-form-type="primary">Primary</a>
96
+ // <a class="btn" href="#" data-form-type="empty">None</a>
97
+ // </nav>
98
+ // <nav class="button-group" data-toggle="buttons-radio">
99
+ // <a class="btn active" href="#" data-form-type="normal">Normal</a>
100
+ // <a class="btn" href="#" data-form-type="disabled">Disabled</a>
101
+ // <a class="btn" href="#" data-form-type="error">Error</a>
102
+ // <a class="btn" href="#" data-form-type="warning">Warning</a>
103
+ // <a class="btn" href="#" data-form-type="success">Success</a>
104
+ // </nav>
105
+ // </section>
106
+ //
107
+ // <form class="form-horizontal well dark">
108
+ // <fieldset>
109
+ // <legend>I am Legend</legend>
110
+ // <ol>
111
+ // <li class=" " id="horz_test_text_input">
112
+ // <label class="label" for="horz_test_text">Text Input<abbr title="required">*</abbr></label>
113
+ // <input class="input-medium" id="horz_test_text" name="test[text]" placeholder="text input" type="text">
114
+ // <p class="hint">This is a hint for the text element!</p>
115
+ // </li>
116
+ // <li class="boolean">
117
+ // <label for="horz_test_check1" name="test[check1]">
118
+ // <input checked="checked" id="horz_test_check1" name="test[check1]" type="checkbox" value="0">
119
+ // Checkboxes for multiple selections
120
+ // </label>
121
+ // </li>
122
+ // <li class="boolean">
123
+ // <label for="horz_test_check2" name="test[check2]">
124
+ // <input id="horz_test_check2" name="test[check2]" type="checkbox" value="1">
125
+ // Go ahead and select this one too
126
+ // </label>
127
+ // </li>
128
+ // <li>
129
+ // <ol class="choices-group">
130
+ // <li class="choice">
131
+ // <label for="horz_test_radio1">
132
+ // <input id="horz_test_radio1" name="test[radio]" type="radio" value="true">
133
+ // Yes, to radio buttons
134
+ // </label>
135
+ // </li>
136
+ // <li class="choice">
137
+ // <label for="horz_test_radio2">
138
+ // <input id="horz_test_radio2" name="test[radio]" type="radio" value="false">
139
+ // No, to radio buttons
140
+ // </label>
141
+ // </li>
142
+ // </ol>
143
+ // </li>
144
+ // <li class="boolean inline">
145
+ // <label for="horz_test_check3" name="test[check3]">
146
+ // <input checked="checked" id="horz_test_check3" name="test[check3]" type="checkbox" value="0">
147
+ // Checkbox inline 1
148
+ // </label>
149
+ // </li>
150
+ // <li class="boolean inline">
151
+ // <label for="horz_test_check4" name="test[check4]">
152
+ // <input id="horz_test_check4" name="test[check4]" type="checkbox" value="1">
153
+ // Checkbox inline 2
154
+ // </label>
155
+ // </li>
156
+ // <li>
157
+ // <ol class="choices-group">
158
+ // <li class="choice inline">
159
+ // <label for="horz_test_radio3">
160
+ // <input id="horz_test_radio3" name="test[radio]" type="radio" value="true">
161
+ // Yes, radio inline
162
+ // </label>
163
+ // </li>
164
+ // <li class="choice inline">
165
+ // <label for="horz_test_radio4">
166
+ // <input id="horz_test_radio4" name="test[radio]" type="radio" value="false">
167
+ // No, radio inline
168
+ // </label>
169
+ // </li>
170
+ // </ol>
171
+ // </li>
172
+ // <li class=" " id="horz_test_select_input">
173
+ // <label class="label" for="horz_test_select">Select</label>
174
+ // <select class="input-medium" id="horz_test_select" name="test[select]">
175
+ // <optgroup label="Colorado">
176
+ // <option selected="selected" value="denver">Denver</option>
177
+ // <option value="boulder">Boulder</option>
178
+ // </optgroup>
179
+ // <optgroup label="California">
180
+ // <option value="los angeles">Los Angeles</option>
181
+ // <option value="san francisco">San Francisco</option>
182
+ // </optgroup>
183
+ // </select>
184
+ // </li>
185
+ // <li class=" " id="horz_test_multi_input">
186
+ // <label class="label" for="horz_test_multi">Multi</label>
187
+ // <select class="input-medium" id="horz_test_multi" multiple="" name="test[multi]">
188
+ // <option value="1">One</option>
189
+ // <option selected="selected" value="2">Two</option>
190
+ // <option value="3">Three</option>
191
+ // <option value="4">Four</option>
192
+ // <option value="5">Five</option>
193
+ // </select>
194
+ // </li>
195
+ // <li class=" " id="horz_test_textarea_textarea.optional">
196
+ // <label class="label" for="horz_test_textarea">Text Area</label>
197
+ // <textarea class="input-medium" id="horz_test_textarea" name="test[textarea]" placeholder="Enter some text..." rows="2"></textarea>
198
+ // </li>
199
+ // <li class=" " id="horz_test_uneditable">
200
+ // <label class="label" for="horz_test_uneditable">Uneditable Input</label>
201
+ // <span class="input-medium uneditable" id="horz_test_uneditable">Hammer time</span>
202
+ // <p class="hint">Can't touch this!</p>
203
+ // </li>
204
+ // <li class="button commit">
205
+ // <label class="label" for="horz_test_file">File Browser</label>
206
+ // <input class="file" id="horz_test_file" name="file" type="file" value="file">
207
+ // </li>
208
+ // <li>
209
+ // <ol class="form-actions">
210
+ // <li class="button commit">
211
+ // <input class="submit btn" name="submit" type="submit" value="Submit">
212
+ // </li>
213
+ // <li class="button commit">
214
+ // <input class="reset btn" name="reset" type="reset" value="Reset">
215
+ // </li>
216
+ // <li class="button commit">
217
+ // <input class="button btn" name="button" type="button" value="Button">
218
+ // </li>
219
+ // <li class="button commit">
220
+ // <input class="image" name="image" src="http://placehold.it/68x28&amp;text=IMG" type="image" value="Image">
221
+ // </li>
222
+ // </ol>
223
+ // </li>
224
+ // </ol>
225
+ // </fieldset>
226
+ // </form>
227
+
228
+ //~
229
+ // #### Additional input controls
230
+ //
231
+ // Control | Type | Usage
232
+ // ------------------------------------------------------------------------------------------------------------- | ------------------- | ---------------------------
233
+ // <input class="input-xlarge" name="email" placeholder="name@example.com" type="email"> | `email` | Text field for editing an e-mail address, `:valid` and `:invalid` pseudo-classes are applied
234
+ // <input class="input-xlarge" name="password" placeholder="password" type="password"> | `password` | A single-line text field whose value is obscured
235
+ // <input class="input-xlarge" name="url" placeholder="www.example.com" type="url"> | `url` | Text field for editing a URL, `:valid` and `:invalid` pseudo-classes are applied
236
+ // <input class="input-xlarge" name="tel" placeholder="303-867-5309" type="tel"> | `tel` | Text field for entering a telephone number, `:valid` and `:invalid` pseudo-classes are applied
237
+ // <input class="input-xlarge" name="datetime" placeholder="2012-01-29 12:06:23:21" type="datetime"> | `datetime` | Date and time control with the time zone set to UTC
238
+ // <input class="input-xlarge" name="datetime-local" placeholder="2012-01-29 12:06:23:21" type="datetime-local"> | `datetime-local` | Date and time control with no time zone
239
+ // <input class="input-xlarge" name="time" placeholder="12:06:23:21" type="time"> | `time` | Time control with no time zone
240
+ // <input class="input-xlarge" name="date" placeholder="2012-01-29" type="date"> | `date` | Date control with no time zone
241
+ // <input class="input-xlarge" name="month" placeholder="2012-01" type="month"> | `month` | Date control consisting of a year and a month with no time zone
242
+ // <input class="input-xlarge" name="week" placeholder="42" type="week"> | `week` | Date control consisting of a week-year number and a week number with no time zone
243
+ // <input class="input-xlarge" max="10" min="0" name="number" placeholder="5" type="number"> | `number` | Control for floating point values, add `min` and `max` attributes to create a spinner
244
+ // <input class="input-xlarge" max="10" min="0" name="range" placeholder="5" step=".5" type="range"> | `range` | Slider control for numbers where exact value is not important, add `min`, `max` and `step` attributes
245
+ // <input alt="color" class="input-xlarge" name="color" placeholder="#fff" type="color"> | `color` | A control for specifying a color
246
+ // <input class="input-xlarge" name="hidden" placeholder="hidden" type="hidden"> | `hidden` | A control that is not displayed, but whose value is submitted to the server
247
+ //
248
+ // <small>Descriptions courtesy [Mozilla Developer Network](https://developer.mozilla.org/en-US/)</small>
249
+
250
+ //~
251
+ // #### Typeahead
252
+ //
253
+ // For quick auto-complete functionality, utilize the typeahead component.
254
+ // It's a combination of an input with a `data-provide="typeahead"` attribute
255
+ // and a drop down menu. The component requires
256
+ // [Bootstrap's typeahead plugin](http://twitter.github.com/bootstrap/javascript.html#typeahead).
257
+ //
258
+ // The plugin, appends a `ul.typeahead.dropdown-menu` list to the `body` element.
259
+ // There are no specific styles included within underoos for typeaheads as they
260
+ // are primarily a combination of existing components.
261
+ //
262
+ // Notes:
263
+ // - **Pro Tip!** Make sure to include the attribute `autocomplete="off"` to disable the browser's default behavior
264
+ //
265
+ // Usage:
266
+ // <form>
267
+ // <ol>
268
+ // <li>
269
+ // <input autocomplete="off" class="input-medium" data-provide="typeahead" id="underoos_typeahead" placeholder="Add Superfriends by typing" type="text">
270
+ // </li>
271
+ // </ol>
272
+ // </form>
273
+ //
274
+ // Examples:
275
+ // $('#superfriends').typeahead({source:['Aquaman', 'Superman'] , items:10})
276
+
277
+ //~
278
+ // #### Content Editable
279
+ // Applying the attribute `contenteditable="true"` to elements allows the user
280
+ // to change the contents within the item. Elements that are editable typically
281
+ // include states for `hover` and `focus` while a user is editing.
282
+ //
283
+ // Usage:
284
+ // <h3 contenteditable="true">Edit Title</h3>
285
+ // <p contenteditable="true">Edit Description</p>
286
+
287
+ // Form containers and base settings
3
288
  form
4
289
  margin: 0
5
290
 
@@ -31,7 +316,7 @@ form li
31
316
  +form-placeholder
32
317
 
33
318
 
34
- // ## Description elements
319
+ // Description elements
35
320
  form abbr[title]
36
321
  border: none
37
322
  margin-left: 0.25em
@@ -61,7 +346,7 @@ label
61
346
  margin-top: 0.25em
62
347
 
63
348
 
64
- // ## Form controls
349
+ // Form controls
65
350
  input,
66
351
  textarea,
67
352
  select,
@@ -73,7 +358,6 @@ select,
73
358
  border-radius: $radii
74
359
  color: $body_color
75
360
  padding: 0.4em
76
- vertical-align: middle
77
361
 
78
362
  input,
79
363
  textarea,
@@ -102,7 +386,7 @@ label select
102
386
  background-color: $off_white
103
387
  cursor: not-allowed
104
388
 
105
- // ## Perform resets on odd controls before defining again
389
+ // Perform resets on odd controls before defining again
106
390
  select[multiple],
107
391
  select[size]
108
392
  height: auto
@@ -123,7 +407,7 @@ input[type="image"]
123
407
  padding: 0
124
408
 
125
409
 
126
- // ## Radio and Checkboxes
410
+ // Radio and Checkboxes
127
411
  input[type="checkbox"],
128
412
  input[type="radio"]
129
413
  +inline-block
@@ -131,7 +415,6 @@ input[type="radio"]
131
415
  border-radius: 0
132
416
  margin: -0.3em 0.3em 0 0
133
417
  padding: 0
134
- vertical-align: middle
135
418
 
136
419
  form .choices-group
137
420
  margin: 1em 0
@@ -150,17 +433,15 @@ form .boolean.inline,
150
433
  form .choice.inline
151
434
  +inline-block
152
435
  margin-right: 1em
153
- vertical-align: middle
154
436
 
155
437
 
156
- // ## Focus states
438
+ // Focus states
157
439
  input:focus,
158
440
  textarea:focus
159
441
  +box-shadow($input_inset_shadow, $focus_glow)
160
442
  background-color: $off_white
161
443
  border-color: $focus_border
162
444
  outline: 0
163
- outline: thin dotted \9
164
445
 
165
446
  input[type="file"]:focus,
166
447
  input[type="radio"]:focus,
@@ -169,7 +450,7 @@ select:focus
169
450
  +box-shadow(none)
170
451
  +tab-focus
171
452
 
172
- // ## Disabled states
453
+ // Disabled states
173
454
  input,
174
455
  textarea,
175
456
  select,
@@ -203,7 +484,7 @@ form .disabled label,
203
484
  form .disabled .hint
204
485
  color: $disabled_color
205
486
 
206
- // ## Error, Warning Success states
487
+ // Error, Warning Success states
207
488
  @mixin form-states($highlight)
208
489
  label, .hint
209
490
  color: $highlight
@@ -252,17 +533,27 @@ form .buttons
252
533
  margin-top: 1em
253
534
  margin-bottom: 1em
254
535
  padding: 1.5em
255
- &.dark
256
- background-color: darken($off_grey, 3%)
536
+
537
+ form.dark .form-actions,
538
+ form.dark .buttons
539
+ background-color: darken($off_grey, 3%)
540
+
541
+ form.lite .form-actions,
542
+ form.lite .buttons
543
+ background-color: darken($off_white, 3%)
544
+
545
+ form.primary .form-actions,
546
+ form.primary .buttons
547
+ background-color: darken($primary, 3%)
548
+
257
549
 
258
550
  .form-actions li,
259
551
  form .buttons li
260
552
  +inline-block
261
553
  margin: 0
262
- vertical-align: middle
263
554
 
264
555
 
265
- // ## Form layouts
556
+ // Form layouts
266
557
  .form-search,
267
558
  .form-inline,
268
559
  .form-horizontal,
@@ -280,7 +571,7 @@ form .buttons li
280
571
  margin-bottom: 0
281
572
 
282
573
 
283
- // ## Horizontal specific overrides
574
+ // Horizontal specific overrides
284
575
  .form-horizontal,
285
576
  .default-manage-form
286
577
  li
@@ -320,7 +611,7 @@ form .buttons li
320
611
  padding-left: $horiz_offset
321
612
 
322
613
 
323
- // ## Convenience classes for sizing
614
+ // Convenience classes for sizing
324
615
  .input-xsmall
325
616
  width: 12.5%
326
617
  .input-small
@@ -332,7 +623,7 @@ form .buttons li
332
623
  .input-xlarge
333
624
  width: 100%
334
625
 
335
- // ## Content Editable states
626
+ // Content Editable states
336
627
  [contenteditable="true"]
337
628
  border: 1px dotted transparent
338
629
 
@@ -345,7 +636,7 @@ form .buttons li
345
636
  border-style: solid
346
637
  border-color: $focus_border
347
638
  outline: 0
348
- outline: thin dotted \9
639
+ outline: thin dotted
349
640
 
350
641
  // Specific settings for formtastic
351
642
  .default-manage-form .well
@@ -353,10 +644,8 @@ form .buttons li
353
644
 
354
645
  form .buttons input[type="button"],
355
646
  form .buttons input[type="submit"]
356
- +btn-button($standard, $grey6)
357
- +btn-override($primary, $white)
647
+ @extend .btn.primary
358
648
 
359
649
  form .buttons input[type="reset"]
360
- +btn-button($standard, $grey6)
361
- +btn-override($danger, $white)
650
+ @extend .btn.danger
362
651