sass-rails-bootstrap 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. data/LICENSE +13 -0
  2. data/README.md +99 -0
  3. data/Rakefile +38 -0
  4. data/lib/sass-rails-bootstrap/engine.rb +4 -0
  5. data/lib/sass-rails-bootstrap/version.rb +3 -0
  6. data/lib/sass-rails-bootstrap.rb +5 -0
  7. data/lib/tasks/sass-rails-bootstrap_tasks.rake +4 -0
  8. data/test/dummy/README.rdoc +261 -0
  9. data/test/dummy/Rakefile +7 -0
  10. data/test/dummy/app/assets/javascripts/application.js +15 -0
  11. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  12. data/test/dummy/app/controllers/application_controller.rb +3 -0
  13. data/test/dummy/app/helpers/application_helper.rb +2 -0
  14. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  15. data/test/dummy/config/application.rb +56 -0
  16. data/test/dummy/config/boot.rb +10 -0
  17. data/test/dummy/config/database.yml +25 -0
  18. data/test/dummy/config/environment.rb +5 -0
  19. data/test/dummy/config/environments/development.rb +37 -0
  20. data/test/dummy/config/environments/production.rb +67 -0
  21. data/test/dummy/config/environments/test.rb +37 -0
  22. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  23. data/test/dummy/config/initializers/inflections.rb +15 -0
  24. data/test/dummy/config/initializers/mime_types.rb +5 -0
  25. data/test/dummy/config/initializers/secret_token.rb +7 -0
  26. data/test/dummy/config/initializers/session_store.rb +8 -0
  27. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  28. data/test/dummy/config/locales/en.yml +5 -0
  29. data/test/dummy/config/routes.rb +58 -0
  30. data/test/dummy/config.ru +4 -0
  31. data/test/dummy/db/test.sqlite3 +0 -0
  32. data/test/dummy/log/test.log +2 -0
  33. data/test/dummy/public/404.html +26 -0
  34. data/test/dummy/public/422.html +26 -0
  35. data/test/dummy/public/500.html +25 -0
  36. data/test/dummy/public/favicon.ico +0 -0
  37. data/test/dummy/script/rails +6 -0
  38. data/test/sass-rails-bootstrap_test.rb +7 -0
  39. data/test/test_helper.rb +10 -0
  40. data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings-white.png +0 -0
  41. data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings.png +0 -0
  42. data/vendor/assets/javascripts/twitter/bootstrap/alert.js +94 -0
  43. data/vendor/assets/javascripts/twitter/bootstrap/button.js +100 -0
  44. data/vendor/assets/javascripts/twitter/bootstrap/carousel.js +161 -0
  45. data/vendor/assets/javascripts/twitter/bootstrap/collapse.js +138 -0
  46. data/vendor/assets/javascripts/twitter/bootstrap/dropdown.js +92 -0
  47. data/vendor/assets/javascripts/twitter/bootstrap/modal.js +210 -0
  48. data/vendor/assets/javascripts/twitter/bootstrap/popover.js +95 -0
  49. data/vendor/assets/javascripts/twitter/bootstrap/scrollspy.js +125 -0
  50. data/vendor/assets/javascripts/twitter/bootstrap/tab.js +130 -0
  51. data/vendor/assets/javascripts/twitter/bootstrap/tooltip.js +270 -0
  52. data/vendor/assets/javascripts/twitter/bootstrap/transition.js +51 -0
  53. data/vendor/assets/javascripts/twitter/bootstrap/typeahead.js +271 -0
  54. data/vendor/assets/javascripts/twitter/bootstrap.js +12 -0
  55. data/vendor/assets/stylesheets/twitter/_bootstrap.scss +66 -0
  56. data/vendor/assets/stylesheets/twitter/bootstrap/_accordion.sass +26 -0
  57. data/vendor/assets/stylesheets/twitter/bootstrap/_alerts.sass +54 -0
  58. data/vendor/assets/stylesheets/twitter/bootstrap/_badges.sass +44 -0
  59. data/vendor/assets/stylesheets/twitter/bootstrap/_breadcrumbs.sass +20 -0
  60. data/vendor/assets/stylesheets/twitter/bootstrap/_button-groups.sass +155 -0
  61. data/vendor/assets/stylesheets/twitter/bootstrap/_buttons.sass +161 -0
  62. data/vendor/assets/stylesheets/twitter/bootstrap/_carousel.sass +105 -0
  63. data/vendor/assets/stylesheets/twitter/bootstrap/_close.sass +16 -0
  64. data/vendor/assets/stylesheets/twitter/bootstrap/_code.sass +48 -0
  65. data/vendor/assets/stylesheets/twitter/bootstrap/_component-animations.sass +16 -0
  66. data/vendor/assets/stylesheets/twitter/bootstrap/_dropdowns.sass +130 -0
  67. data/vendor/assets/stylesheets/twitter/bootstrap/_forms.sass +492 -0
  68. data/vendor/assets/stylesheets/twitter/bootstrap/_grid.sass +8 -0
  69. data/vendor/assets/stylesheets/twitter/bootstrap/_hero-unit.sass +19 -0
  70. data/vendor/assets/stylesheets/twitter/bootstrap/_labels.sass +45 -0
  71. data/vendor/assets/stylesheets/twitter/bootstrap/_layouts.sass +13 -0
  72. data/vendor/assets/stylesheets/twitter/bootstrap/_mixins.sass +517 -0
  73. data/vendor/assets/stylesheets/twitter/bootstrap/_modals.sass +87 -0
  74. data/vendor/assets/stylesheets/twitter/bootstrap/_navbar.sass +300 -0
  75. data/vendor/assets/stylesheets/twitter/bootstrap/_navs.sass +332 -0
  76. data/vendor/assets/stylesheets/twitter/bootstrap/_pager.sass +29 -0
  77. data/vendor/assets/stylesheets/twitter/bootstrap/_pagination.sass +45 -0
  78. data/vendor/assets/stylesheets/twitter/bootstrap/_popovers.sass +54 -0
  79. data/vendor/assets/stylesheets/twitter/bootstrap/_progress-bars.sass +105 -0
  80. data/vendor/assets/stylesheets/twitter/bootstrap/_reset.sass +115 -0
  81. data/vendor/assets/stylesheets/twitter/bootstrap/_responsive.sass +333 -0
  82. data/vendor/assets/stylesheets/twitter/bootstrap/_scaffolding.sass +25 -0
  83. data/vendor/assets/stylesheets/twitter/bootstrap/_sprites.sass +273 -0
  84. data/vendor/assets/stylesheets/twitter/bootstrap/_tables.sass +158 -0
  85. data/vendor/assets/stylesheets/twitter/bootstrap/_thumbnails.sass +34 -0
  86. data/vendor/assets/stylesheets/twitter/bootstrap/_tooltip.sass +43 -0
  87. data/vendor/assets/stylesheets/twitter/bootstrap/_type.sass +209 -0
  88. data/vendor/assets/stylesheets/twitter/bootstrap/_utilities.sass +19 -0
  89. data/vendor/assets/stylesheets/twitter/bootstrap/_variables.sass +199 -0
  90. data/vendor/assets/stylesheets/twitter/bootstrap/_wells.sass +23 -0
  91. metadata +183 -0
@@ -0,0 +1,517 @@
1
+ // Snippets of reusable CSS to develop faster and keep code readable
2
+ // -----------------------------------------------------------------
3
+
4
+
5
+ // UTILITY MIXINS
6
+ // --------------------------------------------------
7
+
8
+ // Clearfix
9
+ // --------
10
+ // For clearing floats like a boss h5bp.com/q
11
+ =clearfix
12
+ *zoom: 1
13
+ &:before, &:after
14
+ display: table
15
+ content: ""
16
+ &:after
17
+ clear: both
18
+
19
+ // Webkit-style focus
20
+ // ------------------
21
+ =tab-focus
22
+ // Default
23
+ outline: thin dotted #333
24
+ // Webkit
25
+ outline: 5px auto -webkit-focus-ring-color
26
+ outline-offset: -2px
27
+
28
+ // Center-align a block level element
29
+ // ----------------------------------
30
+ =center-block
31
+ display: block
32
+ margin-left: auto
33
+ margin-right: auto
34
+
35
+ // IE7 inline-block
36
+ // ----------------
37
+ =ie7-inline-block
38
+ *display: inline /* IE7 inline-block hack */
39
+ *zoom: 1
40
+
41
+ // IE7 likes to collapse whitespace on either side of the inline-block elements.
42
+ // Ems because we're attempting to match the width of a space character. Left
43
+ // version is for form buttons, which typically come after other elements, and
44
+ // right version is for icons, which come before. Applying both is ok, but it will
45
+ // mean that space between those elements will be .6em (~2 space characters) in IE7,
46
+ // instead of the 1 space in other browsers.
47
+ =ie7-restore-left-whitespace
48
+ *margin-left: .3em
49
+ &:first-child
50
+ *margin-left: 0
51
+
52
+ =ie7-restore-right-whitespace
53
+ *margin-right: .3em
54
+ &:last-child
55
+ *margin-left: 0
56
+
57
+ // Sizing shortcuts
58
+ // -------------------------
59
+ =size($height: 5px, $width: 5px)
60
+ width: $width
61
+ height: $height
62
+ =square($size: 5px)
63
+ +size($size, $size)
64
+
65
+ // Placeholder text
66
+ // -------------------------
67
+ =placeholder($color: $placeholderText)
68
+ \:-moz-placeholder
69
+ color: $color
70
+ ::-webkit-input-placeholder
71
+ color: $color
72
+
73
+ // Text overflow
74
+ // -------------------------
75
+ // Requires inline-block or block for proper styling
76
+ =text-overflow
77
+ overflow: hidden
78
+ text-overflow: ellipsis
79
+ white-space: nowrap
80
+
81
+ // New image replacement
82
+ // -------------------------
83
+ // Source: http://www.zeldman.com/2012/03/01/replacing-the-9999px-hack-new-image-replacement/
84
+ =hide-text
85
+ overflow: hidden
86
+ text-indent: 100%
87
+ white-space: nowrap
88
+
89
+ // FONTS
90
+ // --------------------------------------------------
91
+
92
+ =font-family-serif
93
+ font-family: Georgia, "Times New Roman", Times, serif
94
+ =font-family-sans-serif
95
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif
96
+ =font-family-monospace
97
+ font-family: Menlo, Monaco, "Courier New", monospace
98
+
99
+ =font-shorthand($size: $baseFontSize, $weight: normal, $lineHeight: $baseLineHeight)
100
+ font-size: $size
101
+ font-weight: $weight
102
+ line-height: $lineHeight
103
+
104
+ =font-serif($size: $baseFontSize, $weight: normal, $lineHeight: $baseLineHeight)
105
+ +font-family-serif
106
+ +font-shorthand($size, $weight, $lineHeight)
107
+ =font-sans-serif($size: $baseFontSize, $weight: normal, $lineHeight: $baseLineHeight)
108
+ +font-family-sans-serif
109
+ +font-shorthand($size, $weight, $lineHeight)
110
+ =font-monospace($size: $baseFontSize, $weight: normal, $lineHeight: $baseLineHeight)
111
+ +font-family-monospace
112
+ +font-shorthand($size, $weight, $lineHeight)
113
+
114
+
115
+
116
+
117
+
118
+ // FORMS
119
+ // --------------------------------------------------
120
+
121
+ // Block level inputs
122
+ =input-block-level
123
+ display: block
124
+ width: 100%
125
+ min-height: 28px // Make inputs at least the height of their button counterpart
126
+ // Makes inputs behave like true block-level elements
127
+ +box-sizing(border-box)
128
+
129
+ // Mixin for form field states
130
+ =form-field-state($textColor: #555, $borderColor: #ccc, $backgroundColor: #f5f5f5)
131
+ // Set the text color
132
+ > label,
133
+ .help-block,
134
+ .help-inline
135
+ color: $textColor
136
+ // Style inputs accordingly
137
+ input,
138
+ select,
139
+ textarea
140
+ color: $textColor
141
+ border-color: $borderColor
142
+ &:focus
143
+ border-color: darken($borderColor, 10%)
144
+ +box-shadow(0 0 6px lighten($borderColor, 20%))
145
+ // Give a small background color for input-prepend/-append
146
+ .input-prepend .add-on,
147
+ .input-append .add-on
148
+ color: $textColor
149
+ background-color: $backgroundColor
150
+ border-color: $textColor
151
+
152
+
153
+
154
+ // CSS3 PROPERTIES
155
+ // --------------------------------------------------
156
+
157
+ // Border Radius
158
+ =border-radius($radius: 5px)
159
+ -webkit-border-radius: $radius
160
+ -moz-border-radius: $radius
161
+ border-radius: $radius
162
+
163
+ // Drop shadows
164
+ =box-shadow($shadow: 0 1px 3px rgba(0,0,0,.25))
165
+ -webkit-box-shadow: $shadow
166
+ -moz-box-shadow: $shadow
167
+ box-shadow: $shadow
168
+
169
+ // Transitions
170
+ =transition($transition)
171
+ -webkit-transition: $transition
172
+ -moz-transition: $transition
173
+ -ms-transition: $transition
174
+ -o-transition: $transition
175
+ transition: $transition
176
+
177
+ // Transformations
178
+ =rotate($degrees)
179
+ -webkit-transform: rotate($degrees)
180
+ -moz-transform: rotate($degrees)
181
+ -ms-transform: rotate($degrees)
182
+ -o-transform: rotate($degrees)
183
+ transform: rotate($degrees)
184
+
185
+ =scale($ratio)
186
+ -webkit-transform: scale($ratio)
187
+ -moz-transform: scale($ratio)
188
+ -ms-transform: scale($ratio)
189
+ -o-transform: scale($ratio)
190
+ transform: scale($ratio)
191
+
192
+ =translate($x: 0, $y: 0)
193
+ -webkit-transform: translate($x, $y)
194
+ -moz-transform: translate($x, $y)
195
+ -ms-transform: translate($x, $y)
196
+ -o-transform: translate($x, $y)
197
+ transform: translate($x, $y)
198
+
199
+ =skew($x: 0, $y: 0)
200
+ -webkit-transform: skew($x, $y)
201
+ -moz-transform: skew($x, $y)
202
+ -ms-transform: skew($x, $y)
203
+ -o-transform: skew($x, $y)
204
+ transform: skew($x, $y)
205
+
206
+ =translate3d($x: 0, $y: 0, $z: 0)
207
+ -webkit-transform: translate($x, $y, $z)
208
+ -moz-transform: translate($x, $y, $z)
209
+ -ms-transform: translate($x, $y, $z)
210
+ -o-transform: translate($x, $y, $z)
211
+ transform: translate($x, $y, $z)
212
+
213
+
214
+
215
+ // Background clipping
216
+ // Heads up: FF 3.6 and under need "padding" instead of "padding-box"
217
+ =background-clip($clip)
218
+ -webkit-background-clip: $clip
219
+ -moz-background-clip: $clip
220
+ background-clip: $clip
221
+
222
+ // Background sizing
223
+ =background-size($size)
224
+ -webkit-background-size: $size
225
+ -moz-background-size: $size
226
+ -o-background-size: $size
227
+ background-size: $size
228
+
229
+
230
+ // Box sizing
231
+ =box-sizing($boxmodel)
232
+ -webkit-box-sizing: $boxmodel
233
+ -moz-box-sizing: $boxmodel
234
+ -ms-box-sizing: $boxmodel
235
+ box-sizing: $boxmodel
236
+
237
+ // User select
238
+ // For selecting text on the page
239
+ =user-select($select)
240
+ -webkit-user-select: $select
241
+ -moz-user-select: $select
242
+ -o-user-select: $select
243
+ user-select: $select
244
+
245
+ // Resize anything
246
+ =resizable($direction: both)
247
+ resize: $direction // Options: horizontal, vertical, both
248
+ overflow: auto // Safari fix
249
+
250
+ // CSS3 Content Columns
251
+ =content-columns($columnCount, $columnGap: $gridColumnGutter)
252
+ -webkit-column-count: $columnCount
253
+ -moz-column-count: $columnCount
254
+ column-count: $columnCount
255
+ -webkit-column-gap: $columnGap
256
+ -moz-column-gap: $columnGap
257
+ column-gap: $columnGap
258
+
259
+ // Opacity
260
+ =opacity($opacity: 100)
261
+ opacity: $opacity / 100
262
+ filter: alpha(opacity=#{$opacity})
263
+
264
+
265
+
266
+ // BACKGROUNDS
267
+ // --------------------------------------------------
268
+
269
+ // Add an alphatransparency value to any background or border color (via Elyse Holladay)
270
+ =translucent-background($color: $white, $alpha: 1)
271
+ background-color: hsla(hue($color), saturation($color), lightness($color), $alpha)
272
+ =translucent-border($color: $white, $alpha: 1)
273
+ +border-color(hsla(hue($color), saturation($color), lightness($color), $alpha))
274
+ +background-clip(padding-box)
275
+
276
+ // Gradient Bar Colors for buttons and alerts
277
+ =gradient-bar($primaryColor, $secondaryColor)
278
+ +gradient-vertical($primaryColor, $secondaryColor)
279
+ border-color: $secondaryColor $secondaryColor darken($secondaryColor, 15%)
280
+ border-color: rgba(0, 0, 0, .1) rgba(0, 0, 0, .1) fadein(rgba(0, 0, 0, .1), 15%)
281
+
282
+ // Gradients
283
+ =gradient-horizontal($startColor: #555, $endColor: #333)
284
+ background-color: $endColor
285
+ background-image: -moz-linear-gradient(left, $startColor, $endColor) // FF 3.6+
286
+ background-image: -ms-linear-gradient(left, $startColor, $endColor) // IE10
287
+ background-image: -webkit-gradient(linear, 0 0, 100% 0, from($startColor), to($endColor)) // Safari 4+, Chrome 2+
288
+ background-image: -webkit-linear-gradient(left, $startColor, $endColor) // Safari 5.1+, Chrome 10+
289
+ background-image: -o-linear-gradient(left, $startColor, $endColor) // Opera 11.10
290
+ background-image: linear-gradient(left, $startColor, $endColor) // Le standard
291
+ background-repeat: repeat-x
292
+ $ieStartColor: rgb(red($startColor), green($startColor), blue($startColor))
293
+ $ieEndColor: rgb(red($endColor), green($endColor), blue($endColor))
294
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$ieStartColor}', endColorstr='#{$ieEndColor}', GradientType=1) // IE9 and down
295
+ =gradient-vertical($startColor: #555, $endColor: #333)
296
+ background-color: mix($startColor, $endColor, 60%)
297
+ background-image: -moz-linear-gradient(top, $startColor, $endColor) // FF 3.6+
298
+ background-image: -ms-linear-gradient(top, $startColor, $endColor) // IE10
299
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from($startColor), to($endColor)) // Safari 4+, Chrome 2+
300
+ background-image: -webkit-linear-gradient(top, $startColor, $endColor) // Safari 5.1+, Chrome 10+
301
+ background-image: -o-linear-gradient(top, $startColor, $endColor) // Opera 11.10
302
+ background-image: linear-gradient(top, $startColor, $endColor) // The standard
303
+ background-repeat: repeat-x
304
+ $ieStartColor: rgb(red($startColor), green($startColor), blue($startColor))
305
+ $ieEndColor: rgb(red($endColor), green($endColor), blue($endColor))
306
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$ieStartColor}', endColorstr='#{$ieEndColor}', GradientType=0) // IE9 and down
307
+ =gradient-directional($startColor: #555, $endColor: #333, $deg: 45deg)
308
+ background-color: $endColor
309
+ background-repeat: repeat-x
310
+ background-image: -moz-linear-gradient($deg, $startColor, $endColor) // FF 3.6+
311
+ background-image: -ms-linear-gradient($deg, $startColor, $endColor) // IE10
312
+ background-image: -webkit-linear-gradient($deg, $startColor, $endColor) // Safari 5.1+, Chrome 10+
313
+ background-image: -o-linear-gradient($deg, $startColor, $endColor) // Opera 11.10
314
+ background-image: linear-gradient($deg, $startColor, $endColor) // The standard
315
+ =gradient-vertical-three-colors($startColor: #00b3ee, $midColor: #7a43b6, $colorStop: 50%, $endColor: #c3325f)
316
+ background-color: mix($midColor, $endColor, 80%)
317
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from($startColor), color-stop($colorStop, $midColor), to($endColor))
318
+ background-image: -webkit-linear-gradient($startColor, $midColor $colorStop, $endColor)
319
+ background-image: -moz-linear-gradient(top, $startColor, $midColor $colorStop, $endColor)
320
+ background-image: -ms-linear-gradient($startColor, $midColor $colorStop, $endColor)
321
+ background-image: -o-linear-gradient($startColor, $midColor $colorStop, $endColor)
322
+ background-image: linear-gradient($startColor, $midColor $colorStop, $endColor)
323
+ background-repeat: no-repeat
324
+ $ieStartColor: rgb(red($startColor), green($startColor), blue($startColor))
325
+ $ieEndColor: rgb(red($endColor), green($endColor), blue($endColor))
326
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$ieStartColor}', endColorstr='#{$ieEndColor}', GradientType=0) // IE9 and down
327
+ =gradient-radial($innerColor: #555, $outerColor: #333)
328
+ background-color: $outerColor
329
+ background-image: -webkit-gradient(radial, center center, 0, center center, 460, from($innerColor), to($outerColor))
330
+ background-image: -webkit-radial-gradient(circle, $innerColor, $outerColor)
331
+ background-image: -moz-radial-gradient(circle, $innerColor, $outerColor)
332
+ background-image: -ms-radial-gradient(circle, $innerColor, $outerColor)
333
+ background-image: -o-radial-gradient(circle, $innerColor, $outerColor)
334
+ background-repeat: no-repeat
335
+ =gradient-striped($color, $angle: -45deg)
336
+ background-color: $color
337
+ background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(.25, rgba(255,255,255,.15)), color-stop(.25, transparent), color-stop(.5, transparent), color-stop(.5, rgba(255,255,255,.15)), color-stop(.75, rgba(255,255,255,.15)), color-stop(.75, transparent), to(transparent))
338
+ background-image: -webkit-linear-gradient($angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent)
339
+ background-image: -moz-linear-gradient($angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent)
340
+ background-image: -ms-linear-gradient($angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent)
341
+ background-image: -o-linear-gradient($angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent)
342
+ background-image: \linear-gradient($angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent)
343
+
344
+ // Reset filters for IE
345
+ =reset-filter
346
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false)
347
+
348
+
349
+ // COMPONENT MIXINS
350
+ // --------------------------------------------------
351
+
352
+ // Horizontal dividers
353
+ // -------------------------
354
+ // Dividers (basically an hr) within dropdowns and nav lists
355
+ =nav-divider
356
+ height: 1px
357
+ margin: 5px 1px
358
+ overflow: hidden
359
+ background-color: #e5e5e5
360
+ border-bottom: 1px solid $white
361
+
362
+ // IE7 needs a set width since we gave a height. Restricting just
363
+ // to IE7 to keep the 1px left/right space in other browsers.
364
+ // It is unclear where IE is getting the extra space that we need
365
+ // to negative-margin away, but so it goes.
366
+ *width: 100%
367
+ *margin: -5px 0 5px
368
+
369
+ // Button backgrounds
370
+ // ---------------------------------------
371
+ =button-background($startColor, $endColor)
372
+ // gradient-bar will set the background to a pleasing blend of these, to support IE<=9
373
+ +gradient-bar($startColor, $endColor)
374
+ +reset-filter
375
+
376
+ // In these cases the gradient won't cover the background, so we override
377
+ &:hover, &:active, &.active, &.disabled, &[disabled]
378
+ background-color: $endColor
379
+
380
+ // IE 7 + 8 can't handle box-shadow to show active, so we darken a bit ourselves
381
+ &:active,
382
+ &.active
383
+ background-color: darken($endColor, 10%) #{"\9"}
384
+
385
+ // Navbar vertical align
386
+ // -------------------------
387
+ // Vertically center elements in the navbar.
388
+ // Example: an element has a height of 30px, so write out `.navbarVerticalAlign(30px);` to calculate the appropriate top margin.
389
+ =navbar-vertical-align($elementHeight)
390
+ margin-top: ($navbarHeight - $elementHeight) / 2
391
+
392
+ // Popover arrows
393
+ // -------------------------
394
+ // For tipsies and popovers
395
+ =popover-arrow-top($arrowWidth: 5px, $color: $black)
396
+ bottom: 0
397
+ left: 50%
398
+ margin-left: -$arrowWidth
399
+ border-left: $arrowWidth solid transparent
400
+ border-right: $arrowWidth solid transparent
401
+ border-top: $arrowWidth solid $color
402
+ =popover-arrow-left($arrowWidth: 5px, $color: $black)
403
+ top: 50%
404
+ right: 0
405
+ margin-top: -$arrowWidth
406
+ border-top: $arrowWidth solid transparent
407
+ border-bottom: $arrowWidth solid transparent
408
+ border-left: $arrowWidth solid $color
409
+ =popover-arrow-bottom($arrowWidth: 5px, $color: $black)
410
+ top: 0
411
+ left: 50%
412
+ margin-left: -$arrowWidth
413
+ border-left: $arrowWidth solid transparent
414
+ border-right: $arrowWidth solid transparent
415
+ border-bottom: $arrowWidth solid $color
416
+ =popover-arrow-right($arrowWidth: 5px, $color: $black)
417
+ top: 50%
418
+ left: 0
419
+ margin-top: -$arrowWidth
420
+ border-top: $arrowWidth solid transparent
421
+ border-bottom: $arrowWidth solid transparent
422
+ border-right: $arrowWidth solid $color
423
+
424
+
425
+ // Grid System
426
+ // -----------
427
+
428
+ // Centered container element
429
+ =container-fixed
430
+ margin-left: auto
431
+ margin-right: auto
432
+ +clearfix
433
+
434
+
435
+ // Table columns
436
+ =table-columns($columnSpan: 1)
437
+ float: none // undo default grid column styles
438
+ width: (($gridColumnWidth) * $columnSpan) + ($gridGutterWidth * ($columnSpan - 1)) - 16 // 16 is total padding on left and right of table cells
439
+ margin-left: 0 // undo default grid column styles
440
+
441
+
442
+ // Make a Grid
443
+ // Use +make-row and +make-column to assign semantic layouts grid system behavior
444
+ =make-row
445
+ margin-left: $gridGutterWidth * -1
446
+ +clearfix
447
+
448
+ =make-column($columns: 1)
449
+ float: left
450
+ margin-left: $gridGutterWidth
451
+ width: ($gridColumnWidth * $columns) + ($gridGutterWidth * ($columns - 1))
452
+
453
+
454
+ // The Grid
455
+ =core-grid-span($columns, $gridColumnWidth, $gridGutterWidth)
456
+ width: $gridColumnWidth * $columns + $gridGutterWidth * ($columns - 1)
457
+
458
+ =core-grid-offset($columns, $gridColumnWidth, $gridGutterWidth)
459
+ margin-left: $gridColumnWidth * $columns + $gridGutterWidth * ($columns - 1) + $gridGutterWidth * 2
460
+
461
+ =core-grid-generate($gridColumnWidth, $gridGutterWidth)
462
+ .row
463
+ margin-left: $gridGutterWidth * -1
464
+ +clearfix
465
+
466
+ [class*="span"]
467
+ float: left
468
+ margin-left: $gridGutterWidth
469
+
470
+ // Set the container width, and override it for fixed navbars in media queries
471
+ .container,
472
+ .navbar-fixed-top .container,
473
+ .navbar-fixed-bottom .container
474
+ +core-grid-span($gridColumns, $gridColumnWidth, $gridGutterWidth)
475
+
476
+ @for $i from 1 through $gridColumns
477
+ .span#{$i}
478
+ +core-grid-span($i, $gridColumnWidth, $gridGutterWidth)
479
+
480
+ @for $i from 1 to $gridColumns
481
+ .offset#{$i}
482
+ +core-grid-offset($i, $gridColumnWidth, $gridGutterWidth)
483
+
484
+
485
+ =fluid-grid-span($columns, $fluidGridColumnWidth, $fluidGridGutterWidth)
486
+ width: $fluidGridColumnWidth * $columns + $fluidGridGutterWidth * ($columns - 1)
487
+
488
+ =fluid-grid-generate($fluidGridColumnWidth, $fluidGridGutterWidth)
489
+ .row-fluid
490
+ width: 100%
491
+ +clearfix
492
+
493
+ > [class*="span"]
494
+ float: left
495
+ margin-left: $fluidGridGutterWidth
496
+
497
+ > [class*="span"]:first-child
498
+ margin-left: 0
499
+
500
+ @for $i from 1 through $gridColumns
501
+ > .span#{$i}
502
+ +fluid-grid-span($i, $fluidGridColumnWidth, $fluidGridGutterWidth)
503
+
504
+
505
+ =input-grid-span($columns, $gridColumnWidth, $gridGutterWidth)
506
+ width: $gridColumnWidth * $columns + $gridGutterWidth * ($columns - 1) - 10
507
+
508
+ =input-grid-generate($gridColumnWidth, $gridGutterWidth)
509
+ input,
510
+ textarea,
511
+ .uneditable-input
512
+ margin-left: 0 // override margin-left from core grid system
513
+ @for $i from 1 through $gridColumns
514
+ &.span#{$i}
515
+ +input-grid-span($i, $gridColumnWidth, $gridGutterWidth)
516
+
517
+
@@ -0,0 +1,87 @@
1
+ // MODALS
2
+ // ------
3
+
4
+ // Recalculate z-index where appropriate
5
+ .modal-open
6
+ .dropdown-menu
7
+ z-index: $zindexDropdown + $zindexModal
8
+ .dropdown.open
9
+ *z-index: $zindexDropdown + $zindexModal
10
+ .popover
11
+ z-index: $zindexPopover + $zindexModal
12
+ .tooltip
13
+ z-index: $zindexTooltip + $zindexModal
14
+
15
+ // Background
16
+ .modal-backdrop
17
+ position: fixed
18
+ top: 0
19
+ right: 0
20
+ bottom: 0
21
+ left: 0
22
+ z-index: $zindexModalBackdrop
23
+ background-color: $black
24
+ // Fade for backdrop
25
+ &.fade
26
+ +opacity(0)
27
+
28
+ .modal-backdrop,
29
+ .modal-backdrop.fade.in
30
+ +opacity(80)
31
+
32
+ // Base modal
33
+ .modal
34
+ position: fixed
35
+ top: 50%
36
+ left: 50%
37
+ z-index: $zindexModal
38
+ overflow: auto
39
+ width: 560px
40
+ margin: -250px 0 0 -280px
41
+ background-color: $white
42
+ border: 1px solid #999
43
+ border: 1px solid rgba(0,0,0,.3)
44
+ *border: 1px solid #999 /* IE6-7 */
45
+ +border-radius(6px)
46
+ +box-shadow(0 3px 7px rgba(0,0,0,0.3))
47
+ +background-clip(padding-box)
48
+ &.fade
49
+ +transition(#{'opacity .3s linear, top .3s ease-out'})
50
+ top: -25%
51
+ &.in
52
+ top: 50%
53
+
54
+ .modal-header
55
+ padding: 9px 15px
56
+ border-bottom: 1px solid #eee
57
+ // Close icon
58
+ .close
59
+ margin-top: 2px
60
+
61
+ // Body (where all modal content resides)
62
+ .modal-body
63
+ overflow-y: auto
64
+ max-height: 400px
65
+ padding: 15px
66
+
67
+ // Remove bottom margin if need be
68
+ .modal-form
69
+ margin-bottom: 0
70
+
71
+ // Footer (for actions)
72
+ .modal-footer
73
+ padding: 14px 15px 15px
74
+ margin-bottom: 0
75
+ text-align: right // right align buttons
76
+ background-color: #f5f5f5
77
+ border-top: 1px solid #ddd
78
+ +border-radius(0 0 6px 6px)
79
+ +box-shadow(inset 0 1px 0 $white)
80
+ +clearfix // clear it in case folks use .pull-* classes on buttons
81
+ // Properly space out buttons
82
+ .btn + .btn
83
+ margin-left: 5px
84
+ margin-bottom: 0 // account for input[type="submit"] which gets the bottom margin like all other inputs
85
+ // but override that for button groups
86
+ .btn-group .btn + .btn
87
+ margin-left: -1px