sass-twitter-bootstrap 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (243) hide show
  1. data/.gitignore +4 -0
  2. data/Gemfile +3 -0
  3. data/Gemfile.lock +14 -0
  4. data/LICENSE +176 -0
  5. data/Makefile +94 -0
  6. data/README.md +217 -0
  7. data/Rakefile +52 -0
  8. data/bootstrap-2.0.4.css +4661 -0
  9. data/bootstrap-2.0.4.min.css +9 -0
  10. data/bootstrap-responsive-2.0.4.css +932 -0
  11. data/bootstrap-responsive-2.0.4.min.css +9 -0
  12. data/docs/assets/css/bootstrap-responsive.css +932 -0
  13. data/docs/assets/css/bootstrap.css +4661 -0
  14. data/docs/assets/css/docs.css +846 -0
  15. data/docs/assets/ico/apple-touch-icon-114-precomposed.png +0 -0
  16. data/docs/assets/ico/apple-touch-icon-144-precomposed.png +0 -0
  17. data/docs/assets/ico/apple-touch-icon-57-precomposed.png +0 -0
  18. data/docs/assets/ico/apple-touch-icon-72-precomposed.png +0 -0
  19. data/docs/assets/ico/favicon.ico +0 -0
  20. data/docs/assets/img/bird.png +0 -0
  21. data/docs/assets/img/bootstrap-mdo-sfmoma-01.jpg +0 -0
  22. data/docs/assets/img/bootstrap-mdo-sfmoma-02.jpg +0 -0
  23. data/docs/assets/img/bootstrap-mdo-sfmoma-03.jpg +0 -0
  24. data/docs/assets/img/browsers.png +0 -0
  25. data/docs/assets/img/example-sites/fleetio.png +0 -0
  26. data/docs/assets/img/example-sites/jshint.png +0 -0
  27. data/docs/assets/img/example-sites/kippt.png +0 -0
  28. data/docs/assets/img/example-sites/soundready.png +0 -0
  29. data/docs/assets/img/examples/bootstrap-example-fluid.jpg +0 -0
  30. data/docs/assets/img/examples/bootstrap-example-hero.jpg +0 -0
  31. data/docs/assets/img/examples/bootstrap-example-starter.jpg +0 -0
  32. data/docs/assets/img/github-16px.png +0 -0
  33. data/docs/assets/img/glyphicons-halflings-white.png +0 -0
  34. data/docs/assets/img/glyphicons-halflings.png +0 -0
  35. data/docs/assets/img/glyphicons/glyphicons_009_magic.png +0 -0
  36. data/docs/assets/img/glyphicons/glyphicons_042_group.png +0 -0
  37. data/docs/assets/img/glyphicons/glyphicons_079_podium.png +0 -0
  38. data/docs/assets/img/glyphicons/glyphicons_082_roundabout.png +0 -0
  39. data/docs/assets/img/glyphicons/glyphicons_155_show_thumbnails.png +0 -0
  40. data/docs/assets/img/glyphicons/glyphicons_163_iphone.png +0 -0
  41. data/docs/assets/img/glyphicons/glyphicons_214_resize_small.png +0 -0
  42. data/docs/assets/img/glyphicons/glyphicons_266_book_open.png +0 -0
  43. data/docs/assets/img/grid-18px-masked.png +0 -0
  44. data/docs/assets/img/icon-css3.png +0 -0
  45. data/docs/assets/img/icon-github.png +0 -0
  46. data/docs/assets/img/icon-html5.png +0 -0
  47. data/docs/assets/img/icon-twitter.png +0 -0
  48. data/docs/assets/img/less-logo-large.png +0 -0
  49. data/docs/assets/img/less-small.png +0 -0
  50. data/docs/assets/img/responsive-illustrations.png +0 -0
  51. data/docs/assets/js/README.md +106 -0
  52. data/docs/assets/js/application.js +184 -0
  53. data/docs/assets/js/bootstrap-alert.js +90 -0
  54. data/docs/assets/js/bootstrap-button.js +96 -0
  55. data/docs/assets/js/bootstrap-carousel.js +169 -0
  56. data/docs/assets/js/bootstrap-collapse.js +157 -0
  57. data/docs/assets/js/bootstrap-dropdown.js +100 -0
  58. data/docs/assets/js/bootstrap-modal.js +218 -0
  59. data/docs/assets/js/bootstrap-popover.js +98 -0
  60. data/docs/assets/js/bootstrap-scrollspy.js +151 -0
  61. data/docs/assets/js/bootstrap-tab.js +135 -0
  62. data/docs/assets/js/bootstrap-tooltip.js +275 -0
  63. data/docs/assets/js/bootstrap-transition.js +61 -0
  64. data/docs/assets/js/bootstrap-typeahead.js +285 -0
  65. data/docs/assets/js/bootstrap.js +1825 -0
  66. data/docs/assets/js/bootstrap.min.js +6 -0
  67. data/docs/assets/js/google-code-prettify/prettify.css +30 -0
  68. data/docs/assets/js/google-code-prettify/prettify.js +28 -0
  69. data/docs/assets/js/jquery.js +9252 -0
  70. data/docs/base-css.html +1710 -0
  71. data/docs/build/index.js +44 -0
  72. data/docs/build/node_modules/.bin/hulk +93 -0
  73. data/docs/build/node_modules/hogan.js/.git_ignore +1 -0
  74. data/docs/build/node_modules/hogan.js/.gitmodules +3 -0
  75. data/docs/build/node_modules/hogan.js/LICENSE +177 -0
  76. data/docs/build/node_modules/hogan.js/Makefile +62 -0
  77. data/docs/build/node_modules/hogan.js/README.md +93 -0
  78. data/docs/build/node_modules/hogan.js/bin/hulk +93 -0
  79. data/docs/build/node_modules/hogan.js/lib/compiler.js +348 -0
  80. data/docs/build/node_modules/hogan.js/lib/hogan.js +20 -0
  81. data/docs/build/node_modules/hogan.js/lib/template.js +233 -0
  82. data/docs/build/node_modules/hogan.js/package.json +20 -0
  83. data/docs/build/node_modules/hogan.js/test/html/list.html +8 -0
  84. data/docs/build/node_modules/hogan.js/test/index.html +13 -0
  85. data/docs/build/node_modules/hogan.js/test/index.js +848 -0
  86. data/docs/build/node_modules/hogan.js/test/mustache.js +90 -0
  87. data/docs/build/node_modules/hogan.js/test/spec.js +77 -0
  88. data/docs/build/node_modules/hogan.js/test/spec/Changes +31 -0
  89. data/docs/build/node_modules/hogan.js/test/spec/README.md +65 -0
  90. data/docs/build/node_modules/hogan.js/test/spec/Rakefile +27 -0
  91. data/docs/build/node_modules/hogan.js/test/spec/TESTING.md +46 -0
  92. data/docs/build/node_modules/hogan.js/test/spec/specs/comments.json +1 -0
  93. data/docs/build/node_modules/hogan.js/test/spec/specs/comments.yml +103 -0
  94. data/docs/build/node_modules/hogan.js/test/spec/specs/delimiters.json +1 -0
  95. data/docs/build/node_modules/hogan.js/test/spec/specs/delimiters.yml +158 -0
  96. data/docs/build/node_modules/hogan.js/test/spec/specs/interpolation.json +1 -0
  97. data/docs/build/node_modules/hogan.js/test/spec/specs/interpolation.yml +230 -0
  98. data/docs/build/node_modules/hogan.js/test/spec/specs/inverted.json +1 -0
  99. data/docs/build/node_modules/hogan.js/test/spec/specs/inverted.yml +193 -0
  100. data/docs/build/node_modules/hogan.js/test/spec/specs/partials.json +1 -0
  101. data/docs/build/node_modules/hogan.js/test/spec/specs/partials.yml +109 -0
  102. data/docs/build/node_modules/hogan.js/test/spec/specs/sections.json +1 -0
  103. data/docs/build/node_modules/hogan.js/test/spec/specs/sections.yml +256 -0
  104. data/docs/build/node_modules/hogan.js/test/spec/specs/~lambdas.json +1 -0
  105. data/docs/build/node_modules/hogan.js/test/spec/specs/~lambdas.yml +149 -0
  106. data/docs/build/node_modules/hogan.js/test/templates/list.mustache +8 -0
  107. data/docs/build/node_modules/hogan.js/tools/release.js +74 -0
  108. data/docs/build/node_modules/hogan.js/tools/web_templates.js +32 -0
  109. data/docs/build/node_modules/hogan.js/web/1.0.0/hogan.js +500 -0
  110. data/docs/build/node_modules/hogan.js/web/1.0.0/hogan.min.js +14 -0
  111. data/docs/build/node_modules/hogan.js/web/builds/1.0.0/hogan.js +500 -0
  112. data/docs/build/node_modules/hogan.js/web/builds/1.0.0/hogan.min.js +14 -0
  113. data/docs/build/node_modules/hogan.js/web/builds/1.0.3/hogan.js +545 -0
  114. data/docs/build/node_modules/hogan.js/web/builds/1.0.3/hogan.min.js +5 -0
  115. data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.amd.js +576 -0
  116. data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.common.js +576 -0
  117. data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.js +572 -0
  118. data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.min.amd.js +5 -0
  119. data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.min.common.js +5 -0
  120. data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.min.js +5 -0
  121. data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.min.mustache.js +5 -0
  122. data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.mustache.js +619 -0
  123. data/docs/build/node_modules/hogan.js/web/builds/1.0.5/template-1.0.5.js +233 -0
  124. data/docs/build/node_modules/hogan.js/web/builds/1.0.5/template-1.0.5.min.js +5 -0
  125. data/docs/build/node_modules/hogan.js/web/favicon.ico +0 -0
  126. data/docs/build/node_modules/hogan.js/web/images/logo.png +0 -0
  127. data/docs/build/node_modules/hogan.js/web/images/noise.png +0 -0
  128. data/docs/build/node_modules/hogan.js/web/images/small-hogan-icon.png +0 -0
  129. data/docs/build/node_modules/hogan.js/web/images/stripes.png +0 -0
  130. data/docs/build/node_modules/hogan.js/web/index.html.mustache +139 -0
  131. data/docs/build/node_modules/hogan.js/web/stylesheets/layout.css +206 -0
  132. data/docs/build/node_modules/hogan.js/web/stylesheets/skeleton.css +236 -0
  133. data/docs/build/node_modules/hogan.js/wrappers/amd.js.mustache +21 -0
  134. data/docs/build/node_modules/hogan.js/wrappers/common.js.mustache +21 -0
  135. data/docs/build/node_modules/hogan.js/wrappers/js.mustache +17 -0
  136. data/docs/build/node_modules/hogan.js/wrappers/mustache.js.mustache +64 -0
  137. data/docs/build/package.json +6 -0
  138. data/docs/components.html +1931 -0
  139. data/docs/download.html +454 -0
  140. data/docs/examples.html +147 -0
  141. data/docs/examples/fluid.html +162 -0
  142. data/docs/examples/hero.html +109 -0
  143. data/docs/examples/starter-template.html +79 -0
  144. data/docs/index.html +259 -0
  145. data/docs/javascript.html +1520 -0
  146. data/docs/less.html +1060 -0
  147. data/docs/scaffolding.html +671 -0
  148. data/docs/templates/layout.mustache +146 -0
  149. data/docs/templates/pages/base-css.mustache +1594 -0
  150. data/docs/templates/pages/components.mustache +1815 -0
  151. data/docs/templates/pages/download.mustache +338 -0
  152. data/docs/templates/pages/examples.mustache +31 -0
  153. data/docs/templates/pages/index.mustache +144 -0
  154. data/docs/templates/pages/javascript.mustache +1405 -0
  155. data/docs/templates/pages/less.mustache +944 -0
  156. data/docs/templates/pages/scaffolding.mustache +555 -0
  157. data/docs/templates/pages/upgrading.mustache +194 -0
  158. data/docs/upgrading.html +310 -0
  159. data/js/tests/index.html +54 -0
  160. data/js/tests/phantom.js +63 -0
  161. data/js/tests/server.js +14 -0
  162. data/js/tests/unit/bootstrap-alert.js +56 -0
  163. data/js/tests/unit/bootstrap-button.js +77 -0
  164. data/js/tests/unit/bootstrap-carousel.js +28 -0
  165. data/js/tests/unit/bootstrap-collapse.js +54 -0
  166. data/js/tests/unit/bootstrap-dropdown.js +87 -0
  167. data/js/tests/unit/bootstrap-modal.js +114 -0
  168. data/js/tests/unit/bootstrap-phantom.js +21 -0
  169. data/js/tests/unit/bootstrap-popover.js +93 -0
  170. data/js/tests/unit/bootstrap-scrollspy.js +31 -0
  171. data/js/tests/unit/bootstrap-tab.js +61 -0
  172. data/js/tests/unit/bootstrap-tooltip.js +155 -0
  173. data/js/tests/unit/bootstrap-transition.js +13 -0
  174. data/js/tests/unit/bootstrap-typeahead.js +148 -0
  175. data/js/tests/vendor/jquery.js +9252 -0
  176. data/js/tests/vendor/qunit.css +232 -0
  177. data/js/tests/vendor/qunit.js +1510 -0
  178. data/lib/sass-twitter-bootstrap.rb +9 -0
  179. data/lib/sass/twitter/bootstrap/rails.rb +14 -0
  180. data/lib/sass/twitter/bootstrap/version.rb +7 -0
  181. data/package.json +25 -0
  182. data/sass-twitter-bootstrap.gemspec +19 -0
  183. data/vendor/assets/images/glyphicons-halflings-white.png +0 -0
  184. data/vendor/assets/images/glyphicons-halflings.png +0 -0
  185. data/vendor/assets/javascripts/README.md +112 -0
  186. data/vendor/assets/javascripts/twitter/bootstrap-alert.js +90 -0
  187. data/vendor/assets/javascripts/twitter/bootstrap-button.js +96 -0
  188. data/vendor/assets/javascripts/twitter/bootstrap-carousel.js +169 -0
  189. data/vendor/assets/javascripts/twitter/bootstrap-collapse.js +157 -0
  190. data/vendor/assets/javascripts/twitter/bootstrap-dropdown.js +100 -0
  191. data/vendor/assets/javascripts/twitter/bootstrap-modal.js +218 -0
  192. data/vendor/assets/javascripts/twitter/bootstrap-popover.js +98 -0
  193. data/vendor/assets/javascripts/twitter/bootstrap-scrollspy.js +151 -0
  194. data/vendor/assets/javascripts/twitter/bootstrap-tab.js +135 -0
  195. data/vendor/assets/javascripts/twitter/bootstrap-tooltip.js +275 -0
  196. data/vendor/assets/javascripts/twitter/bootstrap-transition.js +61 -0
  197. data/vendor/assets/javascripts/twitter/bootstrap-typeahead.js +285 -0
  198. data/vendor/assets/javascripts/twitter/bootstrap.js +12 -0
  199. data/vendor/assets/stylesheets/tests/css-tests.css +52 -0
  200. data/vendor/assets/stylesheets/tests/css-tests.html +917 -0
  201. data/vendor/assets/stylesheets/tests/forms.html +179 -0
  202. data/vendor/assets/stylesheets/tests/navbar.html +108 -0
  203. data/vendor/assets/stylesheets/twitter/_accordion.scss +33 -0
  204. data/vendor/assets/stylesheets/twitter/_alerts.scss +58 -0
  205. data/vendor/assets/stylesheets/twitter/_breadcrumbs.scss +24 -0
  206. data/vendor/assets/stylesheets/twitter/_button-groups.scss +191 -0
  207. data/vendor/assets/stylesheets/twitter/_buttons.scss +191 -0
  208. data/vendor/assets/stylesheets/twitter/_carousel.scss +121 -0
  209. data/vendor/assets/stylesheets/twitter/_close.scss +29 -0
  210. data/vendor/assets/stylesheets/twitter/_code.scss +57 -0
  211. data/vendor/assets/stylesheets/twitter/_component-animations.scss +20 -0
  212. data/vendor/assets/stylesheets/twitter/_dropdowns.scss +143 -0
  213. data/vendor/assets/stylesheets/twitter/_forms.scss +582 -0
  214. data/vendor/assets/stylesheets/twitter/_grid.scss +5 -0
  215. data/vendor/assets/stylesheets/twitter/_hero-unit.scss +22 -0
  216. data/vendor/assets/stylesheets/twitter/_labels-badges.scss +52 -0
  217. data/vendor/assets/stylesheets/twitter/_layouts.scss +17 -0
  218. data/vendor/assets/stylesheets/twitter/_mixins.scss +643 -0
  219. data/vendor/assets/stylesheets/twitter/_modals.scss +90 -0
  220. data/vendor/assets/stylesheets/twitter/_navbar.scss +358 -0
  221. data/vendor/assets/stylesheets/twitter/_navs.scss +363 -0
  222. data/vendor/assets/stylesheets/twitter/_pager.scss +36 -0
  223. data/vendor/assets/stylesheets/twitter/_pagination.scss +56 -0
  224. data/vendor/assets/stylesheets/twitter/_popovers.scss +49 -0
  225. data/vendor/assets/stylesheets/twitter/_progress-bars.scss +117 -0
  226. data/vendor/assets/stylesheets/twitter/_reset.scss +131 -0
  227. data/vendor/assets/stylesheets/twitter/_responsive-1200px-min.scss +26 -0
  228. data/vendor/assets/stylesheets/twitter/_responsive-767px-max.scss +149 -0
  229. data/vendor/assets/stylesheets/twitter/_responsive-768px-979px.scss +17 -0
  230. data/vendor/assets/stylesheets/twitter/_responsive-navbar.scss +153 -0
  231. data/vendor/assets/stylesheets/twitter/_responsive-utilities.scss +41 -0
  232. data/vendor/assets/stylesheets/twitter/_scaffolding.scss +29 -0
  233. data/vendor/assets/stylesheets/twitter/_sprites.scss +191 -0
  234. data/vendor/assets/stylesheets/twitter/_tables.scss +155 -0
  235. data/vendor/assets/stylesheets/twitter/_thumbnails.scss +47 -0
  236. data/vendor/assets/stylesheets/twitter/_tooltip.scss +35 -0
  237. data/vendor/assets/stylesheets/twitter/_type.scss +232 -0
  238. data/vendor/assets/stylesheets/twitter/_utilities.scss +23 -0
  239. data/vendor/assets/stylesheets/twitter/_variables.scss +204 -0
  240. data/vendor/assets/stylesheets/twitter/_wells.scss +27 -0
  241. data/vendor/assets/stylesheets/twitter/bootstrap.scss +62 -0
  242. data/vendor/assets/stylesheets/twitter/responsive.scss +48 -0
  243. metadata +304 -0
@@ -0,0 +1,582 @@
1
+ // Forms
2
+ // Base styles for various input types, form layouts, and states
3
+ // -------------------------------------------------------------
4
+
5
+
6
+ // GENERAL STYLES
7
+ // --------------
8
+
9
+ // Make all forms have space below them
10
+ form {
11
+ margin: 0 0 $baseLineHeight;
12
+ }
13
+
14
+ fieldset {
15
+ padding: 0;
16
+ margin: 0;
17
+ border: 0;
18
+ }
19
+
20
+ // Groups of fields with labels on top (legends)
21
+ legend {
22
+ display: block;
23
+ width: 100%;
24
+ padding: 0;
25
+ margin-bottom: $baseLineHeight * 1.5;
26
+ font-size: $baseFontSize * 1.5;
27
+ line-height: $baseLineHeight * 2;
28
+ color: $grayDark;
29
+ border: 0;
30
+ border-bottom: 1px solid #e5e5e5;
31
+
32
+ // Small
33
+ small {
34
+ font-size: $baseLineHeight * .75;
35
+ color: $grayLight;
36
+ }
37
+ }
38
+
39
+ // Set font for forms
40
+ label,
41
+ input,
42
+ button,
43
+ select,
44
+ textarea {
45
+ @include font-shorthand($baseFontSize, normal, $baseLineHeight); // Set size, weight, line-height here
46
+ }
47
+ input,
48
+ button,
49
+ select,
50
+ textarea {
51
+ font-family: $baseFontFamily; // And only set font-family here for those that need it (note the missing label element)
52
+ }
53
+
54
+ // Identify controls by their labels
55
+ label {
56
+ display: block;
57
+ margin-bottom: 5px;
58
+ }
59
+
60
+ // Form controls
61
+ // -------------------------
62
+
63
+ // Shared size and type resets
64
+ select,
65
+ textarea,
66
+ input[type="text"],
67
+ input[type="password"],
68
+ input[type="datetime"],
69
+ input[type="datetime-local"],
70
+ input[type="date"],
71
+ input[type="month"],
72
+ input[type="time"],
73
+ input[type="week"],
74
+ input[type="number"],
75
+ input[type="email"],
76
+ input[type="url"],
77
+ input[type="search"],
78
+ input[type="tel"],
79
+ input[type="color"],
80
+ .uneditable-input {
81
+ display: inline-block;
82
+ height: $baseLineHeight;
83
+ padding: 4px;
84
+ margin-bottom: 9px;
85
+ font-size: $baseFontSize;
86
+ line-height: $baseLineHeight;
87
+ color: $gray;
88
+ }
89
+
90
+ // Reset appearance properties for textual inputs and textarea
91
+ // Declare width for legacy (can't be on input[type=*] selectors or it's too specific)
92
+ input,
93
+ textarea {
94
+ width: 210px;
95
+ }
96
+ // Reset height since textareas have rows
97
+ textarea {
98
+ height: auto;
99
+ }
100
+ // Everything else
101
+ textarea,
102
+ input[type="text"],
103
+ input[type="password"],
104
+ input[type="datetime"],
105
+ input[type="datetime-local"],
106
+ input[type="date"],
107
+ input[type="month"],
108
+ input[type="time"],
109
+ input[type="week"],
110
+ input[type="number"],
111
+ input[type="email"],
112
+ input[type="url"],
113
+ input[type="search"],
114
+ input[type="tel"],
115
+ input[type="color"],
116
+ .uneditable-input {
117
+ background-color: $inputBackground;
118
+ border: 1px solid $inputBorder;
119
+ @include border-radius($inputBorderRadius);
120
+ @include box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
121
+ @include transition(#{border linear .2s, box-shadow linear .2s});
122
+
123
+ // Focus state
124
+ &:focus {
125
+ border-color: rgba(82,168,236,.8);
126
+ outline: 0;
127
+ outline: thin dotted \9; /* IE6-9 */
128
+ @include box-shadow(#{inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6)});
129
+ }
130
+ }
131
+
132
+ // Position radios and checkboxes better
133
+ input[type="radio"],
134
+ input[type="checkbox"] {
135
+ margin: 3px 0;
136
+ *margin-top: 0; /* IE7 */
137
+ line-height: normal;
138
+ cursor: pointer;
139
+ }
140
+
141
+ // Reset width of input buttons, radios, checkboxes
142
+ input[type="submit"],
143
+ input[type="reset"],
144
+ input[type="button"],
145
+ input[type="radio"],
146
+ input[type="checkbox"] {
147
+ width: auto; // Override of generic input selector
148
+ }
149
+
150
+ // Make uneditable textareas behave like a textarea
151
+ .uneditable-textarea {
152
+ width: auto;
153
+ height: auto;
154
+ }
155
+
156
+ // Set the height of select and file controls to match text inputs
157
+ select,
158
+ input[type="file"] {
159
+ height: 28px; /* In IE7, the height of the select element cannot be changed by height, only font-size */
160
+ *margin-top: 4px; /* For IE7, add top margin to align select with labels */
161
+ line-height: 28px;
162
+ }
163
+
164
+ // Make select elements obey height by applying a border
165
+ select {
166
+ width: 220px; // default input width + 10px of padding that doesn't get applied
167
+ border: 1px solid #bbb;
168
+ }
169
+
170
+ // Make multiple select elements height not fixed
171
+ select[multiple],
172
+ select[size] {
173
+ height: auto;
174
+ }
175
+
176
+ // Focus for select, file, radio, and checkbox
177
+ select:focus,
178
+ input[type="file"]:focus,
179
+ input[type="radio"]:focus,
180
+ input[type="checkbox"]:focus {
181
+ @include tab-focus();
182
+ }
183
+
184
+
185
+
186
+ // CHECKBOXES & RADIOS
187
+ // -------------------
188
+
189
+ // Indent the labels to position radios/checkboxes as hanging
190
+ .radio,
191
+ .checkbox {
192
+ min-height: 18px; // clear the floating input if there is no label text
193
+ padding-left: 18px;
194
+ }
195
+ .radio input[type="radio"],
196
+ .checkbox input[type="checkbox"] {
197
+ float: left;
198
+ margin-left: -18px;
199
+ }
200
+
201
+ // Move the options list down to align with labels
202
+ .controls > .radio:first-child,
203
+ .controls > .checkbox:first-child {
204
+ padding-top: 5px; // has to be padding because margin collaspes
205
+ }
206
+
207
+ // Radios and checkboxes on same line
208
+ // TODO v3: Convert .inline to .control-inline
209
+ .radio.inline,
210
+ .checkbox.inline {
211
+ display: inline-block;
212
+ padding-top: 5px;
213
+ margin-bottom: 0;
214
+ vertical-align: middle;
215
+ }
216
+ .radio.inline + .radio.inline,
217
+ .checkbox.inline + .checkbox.inline {
218
+ margin-left: 10px; // space out consecutive inline controls
219
+ }
220
+
221
+
222
+
223
+ // INPUT SIZES
224
+ // -----------
225
+
226
+ // General classes for quick sizes
227
+ .input-mini { width: 60px; }
228
+ .input-small { width: 90px; }
229
+ .input-medium { width: 150px; }
230
+ .input-large { width: 210px; }
231
+ .input-xlarge { width: 270px; }
232
+ .input-xxlarge { width: 530px; }
233
+
234
+ // Grid style input sizes
235
+ input[class*="span"],
236
+ select[class*="span"],
237
+ textarea[class*="span"],
238
+ .uneditable-input[class*="span"],
239
+ // Redeclare since the fluid row class is more specific
240
+ .row-fluid input[class*="span"],
241
+ .row-fluid select[class*="span"],
242
+ .row-fluid textarea[class*="span"],
243
+ .row-fluid .uneditable-input[class*="span"] {
244
+ float: none;
245
+ margin-left: 0;
246
+ }
247
+ // Ensure input-prepend/append never wraps
248
+ .input-append input[class*="span"],
249
+ .input-append .uneditable-input[class*="span"],
250
+ .input-prepend input[class*="span"],
251
+ .input-prepend .uneditable-input[class*="span"],
252
+ .row-fluid .input-prepend [class*="span"],
253
+ .row-fluid .input-append [class*="span"] {
254
+ display: inline-block;
255
+ }
256
+
257
+
258
+
259
+ // GRID SIZING FOR INPUTS
260
+ // ----------------------
261
+
262
+ @include grid-input($gridColumnWidth, $gridGutterWidth);
263
+
264
+
265
+
266
+ // DISABLED STATE
267
+ // --------------
268
+
269
+ // Disabled and read-only inputs
270
+ input[disabled],
271
+ select[disabled],
272
+ textarea[disabled],
273
+ input[readonly],
274
+ select[readonly],
275
+ textarea[readonly] {
276
+ cursor: not-allowed;
277
+ background-color: $inputDisabledBackground;
278
+ border-color: #ddd;
279
+ }
280
+ // Explicitly reset the colors here
281
+ input[type="radio"][disabled],
282
+ input[type="checkbox"][disabled],
283
+ input[type="radio"][readonly],
284
+ input[type="checkbox"][readonly] {
285
+ background-color: transparent;
286
+ }
287
+
288
+
289
+
290
+
291
+ // FORM FIELD FEEDBACK STATES
292
+ // --------------------------
293
+
294
+ // Warning
295
+ .control-group.warning {
296
+ @include formFieldState($warningText, $warningText, $warningBackground);
297
+ }
298
+ // Error
299
+ .control-group.error {
300
+ @include formFieldState($errorText, $errorText, $errorBackground);
301
+ }
302
+ // Success
303
+ .control-group.success {
304
+ @include formFieldState($successText, $successText, $successBackground);
305
+ }
306
+
307
+ // HTML5 invalid states
308
+ // Shares styles with the .control-group.error above
309
+ input:focus:required:invalid,
310
+ textarea:focus:required:invalid,
311
+ select:focus:required:invalid {
312
+ color: #b94a48;
313
+ border-color: #ee5f5b;
314
+ &:focus {
315
+ border-color: darken(#ee5f5b, 10%);
316
+ @include box-shadow(0 0 6px lighten(#ee5f5b, 20%));
317
+ }
318
+ }
319
+
320
+
321
+
322
+ // FORM ACTIONS
323
+ // ------------
324
+
325
+ .form-actions {
326
+ padding: ($baseLineHeight - 1) 20px $baseLineHeight;
327
+ margin-top: $baseLineHeight;
328
+ margin-bottom: $baseLineHeight;
329
+ background-color: $formActionsBackground;
330
+ border-top: 1px solid #e5e5e5;
331
+ @include clearfix(); // Adding clearfix to allow for .pull-right button containers
332
+ }
333
+
334
+ // For text that needs to appear as an input but should not be an input
335
+ .uneditable-input {
336
+ overflow: hidden; // prevent text from wrapping, but still cut it off like an input does
337
+ white-space: nowrap;
338
+ cursor: not-allowed;
339
+ background-color: $inputBackground;
340
+ border-color: #eee;
341
+ @include box-shadow(inset 0 1px 2px rgba(0,0,0,.025));
342
+ }
343
+
344
+ // Placeholder text gets special styles; can't be bundled together though for some reason
345
+ @include placeholder();
346
+
347
+
348
+
349
+ // HELP TEXT
350
+ // ---------
351
+
352
+ .help-block,
353
+ .help-inline {
354
+ color: $gray; // lighten the text some for contrast
355
+ }
356
+
357
+ .help-block {
358
+ display: block; // account for any element using help-block
359
+ margin-bottom: $baseLineHeight / 2;
360
+ }
361
+
362
+ .help-inline {
363
+ display: inline-block;
364
+ @include ie7-inline-block();
365
+ vertical-align: middle;
366
+ padding-left: 5px;
367
+ }
368
+
369
+
370
+
371
+ // INPUT GROUPS
372
+ // ------------
373
+
374
+ // Allow us to put symbols and text within the input field for a cleaner look
375
+ .input-prepend,
376
+ .input-append {
377
+ margin-bottom: 5px;
378
+ input,
379
+ select,
380
+ .uneditable-input {
381
+ position: relative; // placed here by default so that on :focus we can place the input above the .add-on for full border and box-shadow goodness
382
+ margin-bottom: 0; // prevent bottom margin from screwing up alignment in stacked forms
383
+ *margin-left: 0;
384
+ vertical-align: middle;
385
+ @include border-radius(0 $inputBorderRadius $inputBorderRadius 0);
386
+ // Make input on top when focused so blue border and shadow always show
387
+ &:focus {
388
+ z-index: 2;
389
+ }
390
+ }
391
+ .uneditable-input {
392
+ border-left-color: #ccc;
393
+ }
394
+ .add-on {
395
+ display: inline-block;
396
+ width: auto;
397
+ height: $baseLineHeight;
398
+ min-width: 16px;
399
+ padding: 4px 5px;
400
+ font-weight: normal;
401
+ line-height: $baseLineHeight;
402
+ text-align: center;
403
+ text-shadow: 0 1px 0 $white;
404
+ vertical-align: middle;
405
+ background-color: $grayLighter;
406
+ border: 1px solid #ccc;
407
+ }
408
+ .add-on,
409
+ .btn {
410
+ margin-left: -1px;
411
+ @include border-radius(0);
412
+ }
413
+ .active {
414
+ background-color: lighten($green, 30);
415
+ border-color: $green;
416
+ }
417
+ }
418
+ .input-prepend {
419
+ .add-on,
420
+ .btn {
421
+ margin-right: -1px;
422
+ }
423
+ .add-on:first-child,
424
+ .btn:first-child {
425
+ @include border-radius($inputBorderRadius 0 0 $inputBorderRadius);
426
+ }
427
+ }
428
+ .input-append {
429
+ input,
430
+ select,
431
+ .uneditable-input {
432
+ @include border-radius($inputBorderRadius 0 0 $inputBorderRadius);
433
+ }
434
+ .uneditable-input {
435
+ border-right-color: #ccc;
436
+ border-left-color: #eee;
437
+ }
438
+ .add-on:last-child,
439
+ .btn:last-child {
440
+ @include border-radius(0 $inputBorderRadius $inputBorderRadius 0);
441
+ }
442
+ }
443
+ // Remove all border-radius for inputs with both prepend and append
444
+ .input-prepend.input-append {
445
+ input,
446
+ select,
447
+ .uneditable-input {
448
+ @include border-radius(0);
449
+ }
450
+ .add-on:first-child,
451
+ .btn:first-child {
452
+ margin-right: -1px;
453
+ @include border-radius($inputBorderRadius 0 0 $inputBorderRadius);
454
+ }
455
+ .add-on:last-child,
456
+ .btn:last-child {
457
+ margin-left: -1px;
458
+ @include border-radius(0 $inputBorderRadius $inputBorderRadius 0);
459
+ }
460
+ }
461
+
462
+
463
+
464
+ // SEARCH FORM
465
+ // -----------
466
+
467
+ .search-query {
468
+ padding-right: 14px;
469
+ padding-right: 4px \9;
470
+ padding-left: 14px;
471
+ padding-left: 4px \9; /* IE7-8 doesn't have border-radius, so don't indent the padding */
472
+ margin-bottom: 0; // remove the default margin on all inputs
473
+ @include border-radius(14px);
474
+ }
475
+
476
+
477
+
478
+ // HORIZONTAL & VERTICAL FORMS
479
+ // ---------------------------
480
+
481
+ // Common properties
482
+ // -----------------
483
+
484
+ .form-search,
485
+ .form-inline,
486
+ .form-horizontal {
487
+ input,
488
+ textarea,
489
+ select,
490
+ .help-inline,
491
+ .uneditable-input,
492
+ .input-prepend,
493
+ .input-append {
494
+ display: inline-block;
495
+ @include ie7-inline-block();
496
+ margin-bottom: 0;
497
+ }
498
+ // Re-hide hidden elements due to specifity
499
+ .hide {
500
+ display: none;
501
+ }
502
+ }
503
+ .form-search label,
504
+ .form-inline label {
505
+ display: inline-block;
506
+ }
507
+ // Remove margin for input-prepend/-append
508
+ .form-search .input-append,
509
+ .form-inline .input-append,
510
+ .form-search .input-prepend,
511
+ .form-inline .input-prepend {
512
+ margin-bottom: 0;
513
+ }
514
+ // Inline checkbox/radio labels (remove padding on left)
515
+ .form-search .radio,
516
+ .form-search .checkbox,
517
+ .form-inline .radio,
518
+ .form-inline .checkbox {
519
+ padding-left: 0;
520
+ margin-bottom: 0;
521
+ vertical-align: middle;
522
+ }
523
+ // Remove float and margin, set to inline-block
524
+ .form-search .radio input[type="radio"],
525
+ .form-search .checkbox input[type="checkbox"],
526
+ .form-inline .radio input[type="radio"],
527
+ .form-inline .checkbox input[type="checkbox"] {
528
+ float: left;
529
+ margin-right: 3px;
530
+ margin-left: 0;
531
+ }
532
+
533
+
534
+ // Margin to space out fieldsets
535
+ .control-group {
536
+ margin-bottom: $baseLineHeight / 2;
537
+ }
538
+
539
+ // Legend collapses margin, so next element is responsible for spacing
540
+ legend + .control-group {
541
+ margin-top: $baseLineHeight;
542
+ -webkit-margin-top-collapse: separate;
543
+ }
544
+
545
+ // Horizontal-specific styles
546
+ // --------------------------
547
+
548
+ .form-horizontal {
549
+ // Increase spacing between groups
550
+ .control-group {
551
+ margin-bottom: $baseLineHeight;
552
+ @include clearfix();
553
+ }
554
+ // Float the labels left
555
+ .control-label {
556
+ float: left;
557
+ width: 140px;
558
+ padding-top: 5px;
559
+ text-align: right;
560
+ }
561
+ // Move over all input controls and content
562
+ .controls {
563
+ // Super jank IE7 fix to ensure the inputs in .input-append and input-prepend
564
+ // don't inherit the margin of the parent, in this case .controls
565
+ *display: inline-block;
566
+ *padding-left: 20px;
567
+ margin-left: 160px;
568
+ *margin-left: 0;
569
+ &:first-child {
570
+ *padding-left: 160px;
571
+ }
572
+ }
573
+ // Remove bottom margin on block level help text since that's accounted for on .control-group
574
+ .help-block {
575
+ margin-top: $baseLineHeight / 2;
576
+ margin-bottom: 0;
577
+ }
578
+ // Move over buttons in .form-actions to align with .controls
579
+ .form-actions {
580
+ padding-left: 160px;
581
+ }
582
+ }