sass-rails-bootstrap 2.0.2

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 (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,271 @@
1
+ /* =============================================================
2
+ * bootstrap-typeahead.js v2.0.2
3
+ * http://twitter.github.com/bootstrap/javascript.html#typeahead
4
+ * =============================================================
5
+ * Copyright 2012 Twitter, Inc.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ * ============================================================ */
19
+
20
+ !function( $ ){
21
+
22
+ "use strict"
23
+
24
+ var Typeahead = function ( element, options ) {
25
+ this.$element = $(element)
26
+ this.options = $.extend({}, $.fn.typeahead.defaults, options)
27
+ this.matcher = this.options.matcher || this.matcher
28
+ this.sorter = this.options.sorter || this.sorter
29
+ this.highlighter = this.options.highlighter || this.highlighter
30
+ this.$menu = $(this.options.menu).appendTo('body')
31
+ this.source = this.options.source
32
+ this.shown = false
33
+ this.listen()
34
+ }
35
+
36
+ Typeahead.prototype = {
37
+
38
+ constructor: Typeahead
39
+
40
+ , select: function () {
41
+ var val = this.$menu.find('.active').attr('data-value')
42
+ this.$element.val(val)
43
+ this.$element.change()
44
+ return this.hide()
45
+ }
46
+
47
+ , show: function () {
48
+ var pos = $.extend({}, this.$element.offset(), {
49
+ height: this.$element[0].offsetHeight
50
+ })
51
+
52
+ this.$menu.css({
53
+ top: pos.top + pos.height
54
+ , left: pos.left
55
+ })
56
+
57
+ this.$menu.show()
58
+ this.shown = true
59
+ return this
60
+ }
61
+
62
+ , hide: function () {
63
+ this.$menu.hide()
64
+ this.shown = false
65
+ return this
66
+ }
67
+
68
+ , lookup: function (event) {
69
+ var that = this
70
+ , items
71
+ , q
72
+
73
+ this.query = this.$element.val()
74
+
75
+ if (!this.query) {
76
+ return this.shown ? this.hide() : this
77
+ }
78
+
79
+ items = $.grep(this.source, function (item) {
80
+ if (that.matcher(item)) return item
81
+ })
82
+
83
+ items = this.sorter(items)
84
+
85
+ if (!items.length) {
86
+ return this.shown ? this.hide() : this
87
+ }
88
+
89
+ return this.render(items.slice(0, this.options.items)).show()
90
+ }
91
+
92
+ , matcher: function (item) {
93
+ return ~item.toLowerCase().indexOf(this.query.toLowerCase())
94
+ }
95
+
96
+ , sorter: function (items) {
97
+ var beginswith = []
98
+ , caseSensitive = []
99
+ , caseInsensitive = []
100
+ , item
101
+
102
+ while (item = items.shift()) {
103
+ if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item)
104
+ else if (~item.indexOf(this.query)) caseSensitive.push(item)
105
+ else caseInsensitive.push(item)
106
+ }
107
+
108
+ return beginswith.concat(caseSensitive, caseInsensitive)
109
+ }
110
+
111
+ , highlighter: function (item) {
112
+ return item.replace(new RegExp('(' + this.query + ')', 'ig'), function ($1, match) {
113
+ return '<strong>' + match + '</strong>'
114
+ })
115
+ }
116
+
117
+ , render: function (items) {
118
+ var that = this
119
+
120
+ items = $(items).map(function (i, item) {
121
+ i = $(that.options.item).attr('data-value', item)
122
+ i.find('a').html(that.highlighter(item))
123
+ return i[0]
124
+ })
125
+
126
+ items.first().addClass('active')
127
+ this.$menu.html(items)
128
+ return this
129
+ }
130
+
131
+ , next: function (event) {
132
+ var active = this.$menu.find('.active').removeClass('active')
133
+ , next = active.next()
134
+
135
+ if (!next.length) {
136
+ next = $(this.$menu.find('li')[0])
137
+ }
138
+
139
+ next.addClass('active')
140
+ }
141
+
142
+ , prev: function (event) {
143
+ var active = this.$menu.find('.active').removeClass('active')
144
+ , prev = active.prev()
145
+
146
+ if (!prev.length) {
147
+ prev = this.$menu.find('li').last()
148
+ }
149
+
150
+ prev.addClass('active')
151
+ }
152
+
153
+ , listen: function () {
154
+ this.$element
155
+ .on('blur', $.proxy(this.blur, this))
156
+ .on('keypress', $.proxy(this.keypress, this))
157
+ .on('keyup', $.proxy(this.keyup, this))
158
+
159
+ if ($.browser.webkit || $.browser.msie) {
160
+ this.$element.on('keydown', $.proxy(this.keypress, this))
161
+ }
162
+
163
+ this.$menu
164
+ .on('click', $.proxy(this.click, this))
165
+ .on('mouseenter', 'li', $.proxy(this.mouseenter, this))
166
+ }
167
+
168
+ , keyup: function (e) {
169
+ switch(e.keyCode) {
170
+ case 40: // down arrow
171
+ case 38: // up arrow
172
+ break
173
+
174
+ case 9: // tab
175
+ case 13: // enter
176
+ if (!this.shown) return
177
+ this.select()
178
+ break
179
+
180
+ case 27: // escape
181
+ if (!this.shown) return
182
+ this.hide()
183
+ break
184
+
185
+ default:
186
+ this.lookup()
187
+ }
188
+
189
+ e.stopPropagation()
190
+ e.preventDefault()
191
+ }
192
+
193
+ , keypress: function (e) {
194
+ if (!this.shown) return
195
+
196
+ switch(e.keyCode) {
197
+ case 9: // tab
198
+ case 13: // enter
199
+ case 27: // escape
200
+ e.preventDefault()
201
+ break
202
+
203
+ case 38: // up arrow
204
+ e.preventDefault()
205
+ this.prev()
206
+ break
207
+
208
+ case 40: // down arrow
209
+ e.preventDefault()
210
+ this.next()
211
+ break
212
+ }
213
+
214
+ e.stopPropagation()
215
+ }
216
+
217
+ , blur: function (e) {
218
+ var that = this
219
+ setTimeout(function () { that.hide() }, 150)
220
+ }
221
+
222
+ , click: function (e) {
223
+ e.stopPropagation()
224
+ e.preventDefault()
225
+ this.select()
226
+ }
227
+
228
+ , mouseenter: function (e) {
229
+ this.$menu.find('.active').removeClass('active')
230
+ $(e.currentTarget).addClass('active')
231
+ }
232
+
233
+ }
234
+
235
+
236
+ /* TYPEAHEAD PLUGIN DEFINITION
237
+ * =========================== */
238
+
239
+ $.fn.typeahead = function ( option ) {
240
+ return this.each(function () {
241
+ var $this = $(this)
242
+ , data = $this.data('typeahead')
243
+ , options = typeof option == 'object' && option
244
+ if (!data) $this.data('typeahead', (data = new Typeahead(this, options)))
245
+ if (typeof option == 'string') data[option]()
246
+ })
247
+ }
248
+
249
+ $.fn.typeahead.defaults = {
250
+ source: []
251
+ , items: 8
252
+ , menu: '<ul class="typeahead dropdown-menu"></ul>'
253
+ , item: '<li><a href="#"></a></li>'
254
+ }
255
+
256
+ $.fn.typeahead.Constructor = Typeahead
257
+
258
+
259
+ /* TYPEAHEAD DATA-API
260
+ * ================== */
261
+
262
+ $(function () {
263
+ $('body').on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
264
+ var $this = $(this)
265
+ if ($this.data('typeahead')) return
266
+ e.preventDefault()
267
+ $this.typeahead($this.data())
268
+ })
269
+ })
270
+
271
+ }( window.jQuery );
@@ -0,0 +1,12 @@
1
+ //= require twitter/bootstrap/alert
2
+ //= require twitter/bootstrap/button
3
+ //= require twitter/bootstrap/carousel
4
+ //= require twitter/bootstrap/collapse
5
+ //= require twitter/bootstrap/dropdown
6
+ //= require twitter/bootstrap/modal
7
+ //= require twitter/bootstrap/scrollspy
8
+ //= require twitter/bootstrap/tab
9
+ //= require twitter/bootstrap/tooltip
10
+ //= require twitter/bootstrap/popover
11
+ //= require twitter/bootstrap/transition
12
+ //= require twitter/bootstrap/typeahead
@@ -0,0 +1,66 @@
1
+ /*!
2
+ * Bootstrap v2.0.1
3
+ *
4
+ * Copyright 2012 Twitter, Inc
5
+ * Licensed under the Apache License v2.0
6
+ * http://www.apache.org/licenses/LICENSE-2.0
7
+ *
8
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
9
+ */
10
+
11
+ // NOTE: This file has to be in SCSS rather than SASS format because of an apparent bug
12
+ // with variable visibility when importing.
13
+
14
+ // Core variables and mixins
15
+ @import "bootstrap/variables"; // Modify this for custom colors, font-sizes, etc
16
+ @import "bootstrap/mixins";
17
+
18
+ // CSS Reset
19
+ @import "bootstrap/reset";
20
+
21
+ // Grid system and page structure
22
+ @import "bootstrap/scaffolding";
23
+ @import "bootstrap/grid";
24
+ @import "bootstrap/layouts";
25
+
26
+ // Base CSS
27
+ @import "bootstrap/type";
28
+ @import "bootstrap/code";
29
+ @import "bootstrap/forms";
30
+ @import "bootstrap/tables";
31
+
32
+ // Components: common
33
+ @import "bootstrap/sprites";
34
+ @import "bootstrap/dropdowns";
35
+ @import "bootstrap/wells";
36
+ @import "bootstrap/component-animations";
37
+ @import "bootstrap/close";
38
+
39
+ // Components: Buttons & Alerts
40
+ @import "bootstrap/buttons";
41
+ @import "bootstrap/button-groups";
42
+ @import "bootstrap/alerts"; // Note: alerts share common CSS with buttons and thus have styles in buttons.less
43
+
44
+ // Components: Nav
45
+ @import "bootstrap/navs";
46
+ @import "bootstrap/navbar";
47
+ @import "bootstrap/breadcrumbs";
48
+ @import "bootstrap/pagination";
49
+ @import "bootstrap/pager";
50
+
51
+ // Components: Popovers
52
+ @import "bootstrap/modals";
53
+ @import "bootstrap/tooltip";
54
+ @import "bootstrap/popovers";
55
+
56
+ // Components: Misc
57
+ @import "bootstrap/thumbnails";
58
+ @import "bootstrap/labels";
59
+ @import "bootstrap/badges";
60
+ @import "bootstrap/progress-bars";
61
+ @import "bootstrap/accordion";
62
+ @import "bootstrap/carousel";
63
+ @import "bootstrap/hero-unit";
64
+
65
+ // Utility classes
66
+ @import "bootstrap/utilities"; // Has to be last to override when necessary
@@ -0,0 +1,26 @@
1
+ // ACCORDION
2
+ // ---------
3
+
4
+
5
+ // Parent container
6
+ .accordion
7
+ margin-bottom: $baseLineHeight
8
+
9
+ // Group == heading + body
10
+ .accordion-group
11
+ margin-bottom: 2px
12
+ border: 1px solid #e5e5e5
13
+ +border-radius(4px)
14
+
15
+ .accordion-heading
16
+ border-bottom: 0
17
+
18
+ .accordion-heading .accordion-toggle
19
+ display: block
20
+ padding: 8px 15px
21
+
22
+
23
+ // Inner needs the styles because you can't animate properly with any styles on the element
24
+ .accordion-inner
25
+ padding: 9px 15px
26
+ border-top: 1px solid #e5e5e5
@@ -0,0 +1,54 @@
1
+ // ALERT STYLES
2
+ // ------------
3
+
4
+ // Base alert styles
5
+ .alert
6
+ padding: 8px 35px 8px 14px
7
+ margin-bottom: $baseLineHeight
8
+ text-shadow: 0 1px 0 rgba(255,255,255,.5)
9
+ background-color: $warningBackground
10
+ border: 1px solid $warningBorder
11
+ +border-radius(4px)
12
+ color: $warningText
13
+
14
+ .alert-heading
15
+ color: inherit
16
+
17
+ // Adjust close link position
18
+ .alert .close
19
+ position: relative
20
+ top: -2px
21
+ right: -21px
22
+ line-height: 18px
23
+
24
+ // Alternate styles
25
+ // ----------------
26
+
27
+ .alert-success
28
+ background-color: $successBackground
29
+ border-color: $successBorder
30
+ color: $successText
31
+
32
+ .alert-danger,
33
+ .alert-error
34
+ background-color: $errorBackground
35
+ border-color: $errorBorder
36
+ color: $errorText
37
+
38
+ .alert-info
39
+ background-color: $infoBackground
40
+ border-color: $infoBorder
41
+ color: $infoText
42
+
43
+ // Block alerts
44
+ // ------------------------
45
+ .alert-block
46
+ padding-top: 14px
47
+ padding-bottom: 14px
48
+
49
+ .alert-block > p,
50
+ .alert-block > ul
51
+ margin-bottom: 0
52
+
53
+ .alert-block p + p
54
+ margin-top: 5px
@@ -0,0 +1,44 @@
1
+ // BADGES
2
+ // ------
3
+
4
+ // Base
5
+ .badge
6
+ padding: 1px 9px 2px
7
+ font-size: $baseFontSize * 0.925
8
+ font-weight: bold
9
+ white-space: nowrap
10
+ color: $white
11
+ background-color: $grayLight
12
+ +border-radius(9px)
13
+
14
+ // Hover state
15
+ .badge:hover
16
+ color: $white
17
+ text-decoration: none
18
+ cursor: pointer
19
+
20
+ // Colors
21
+ .badge-error
22
+ background-color: $errorText
23
+ .badge-error:hover
24
+ background-color: darken($errorText, 10%)
25
+
26
+ .badge-warning
27
+ background-color: $orange
28
+ .badge-warning:hover
29
+ background-color: darken($orange, 10%)
30
+
31
+ .badge-success
32
+ background-color: $successText
33
+ .badge-success:hover
34
+ background-color: darken($successText, 10%)
35
+
36
+ .badge-info
37
+ background-color: $infoText
38
+ .badge-info:hover
39
+ background-color: darken($infoText, 10%)
40
+
41
+ .badge-inverse
42
+ background-color: $grayDark
43
+ .badge-inverse:hover
44
+ background-color: darken($grayDark, 10%)
@@ -0,0 +1,20 @@
1
+ // BREADCRUMBS
2
+ // -----------
3
+
4
+ .breadcrumb
5
+ padding: 7px 14px
6
+ margin: 0 0 $baseLineHeight
7
+ list-style: none
8
+ +gradient-vertical($white, #f5f5f5)
9
+ border: 1px solid #ddd
10
+ +border-radius(3px)
11
+ +box-shadow(inset 0 1px 0 $white)
12
+ li
13
+ display: inline-block
14
+ +ie7-inline-block
15
+ text-shadow: 0 1px 0 $white
16
+ .divider
17
+ padding: 0 5px
18
+ color: $grayLight
19
+ .active a
20
+ color: $grayDark
@@ -0,0 +1,155 @@
1
+ // BUTTON GROUPS
2
+ // -------------
3
+
4
+
5
+ // Make the div behave like a button
6
+ .btn-group
7
+ position: relative
8
+ +clearfix // clears the floated buttons
9
+ +ie7-restore-left-whitespace
10
+
11
+ // Space out series of button groups
12
+ .btn-group + .btn-group
13
+ margin-left: 5px
14
+
15
+ // Optional: Group multiple button groups together for a toolbar
16
+ .btn-toolbar
17
+ margin-top: $baseLineHeight / 2
18
+ margin-bottom: $baseLineHeight / 2
19
+ .btn-group
20
+ display: inline-block
21
+ +ie7-inline-block
22
+
23
+ // Float them, remove border radius, then re-add to first and last elements
24
+ .btn-group .btn
25
+ position: relative
26
+ float: left
27
+ margin-left: -1px
28
+ +border-radius(0)
29
+
30
+ // Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match
31
+ .btn-group .btn:first-child
32
+ margin-left: 0
33
+ -webkit-border-top-left-radius: 4px
34
+ -moz-border-radius-topleft: 4px
35
+ border-top-left-radius: 4px
36
+ -webkit-border-bottom-left-radius: 4px
37
+ -moz-border-radius-bottomleft: 4px
38
+ border-bottom-left-radius: 4px
39
+
40
+ .btn-group .btn:last-child,
41
+ .btn-group .dropdown-toggle
42
+ -webkit-border-top-right-radius: 4px
43
+ -moz-border-radius-topright: 4px
44
+ border-top-right-radius: 4px
45
+ -webkit-border-bottom-right-radius: 4px
46
+ -moz-border-radius-bottomright: 4px
47
+ border-bottom-right-radius: 4px
48
+
49
+ // Reset corners for large buttons
50
+ .btn-group .btn.large:first-child
51
+ margin-left: 0
52
+ -webkit-border-top-left-radius: 6px
53
+ -moz-border-radius-topleft: 6px
54
+ border-top-left-radius: 6px
55
+ -webkit-border-bottom-left-radius: 6px
56
+ -moz-border-radius-bottomleft: 6px
57
+ border-bottom-left-radius: 6px
58
+
59
+ .btn-group .btn.large:last-child,
60
+ .btn-group .large.dropdown-toggle
61
+ -webkit-border-top-right-radius: 6px
62
+ -moz-border-radius-topright: 6px
63
+ border-top-right-radius: 6px
64
+ -webkit-border-bottom-right-radius: 6px
65
+ -moz-border-radius-bottomright: 6px
66
+ border-bottom-right-radius: 6px
67
+
68
+ // On hover/focus/active, bring the proper btn to front
69
+ .btn-group .btn:hover,
70
+ .btn-group .btn:focus,
71
+ .btn-group .btn:active,
72
+ .btn-group .btn.active
73
+ z-index: 2
74
+
75
+ // On active and open, don't show outline
76
+ .btn-group .dropdown-toggle:active,
77
+ .btn-group.open .dropdown-toggle
78
+ outline: 0
79
+
80
+
81
+
82
+ // Split button dropdowns
83
+ // ----------------------
84
+
85
+ // Give the line between buttons some depth
86
+ .btn-group .dropdown-toggle
87
+ padding-left: 8px
88
+ padding-right: 8px
89
+ $shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)
90
+ +box-shadow($shadow)
91
+ *padding-top: 3px
92
+ *padding-bottom: 3px
93
+
94
+ .btn-group .btn-mini.dropdown-toggle
95
+ padding-left: 1px
96
+ padding-right: 1px
97
+
98
+ .btn-group .btn-small.dropdown-toggle
99
+ padding-left: 4px
100
+ padding-right: 4px
101
+
102
+ .btn-group .btn-large.dropdown-toggle
103
+ padding-left: 12px
104
+ padding-right: 12px
105
+
106
+ .btn-group.open
107
+ // IE7's z-index only goes to the nearest positioned ancestor, which would
108
+ // make the menu appear below buttons that appeared later on the page
109
+ *z-index: $zindexDropdown
110
+
111
+ // Reposition menu on open and round all corners
112
+ .dropdown-menu
113
+ display: block
114
+ margin-top: 1px
115
+ +border-radius(5px)
116
+
117
+ .dropdown-toggle
118
+ background-image: none
119
+ $shadow: inset 0 1px 6px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05)
120
+ +box-shadow($shadow)
121
+
122
+ // Reposition the caret
123
+ .btn .caret
124
+ margin-top: 7px
125
+ margin-left: 0
126
+
127
+ .btn:hover .caret,
128
+ .open.btn-group .caret
129
+ +opacity(100)
130
+
131
+ // Carets in other button sizes
132
+ .btn-mini .caret
133
+ margin-top: 5px
134
+
135
+ .btn-small .caret
136
+ margin-top: 6px
137
+
138
+ .btn-large .caret
139
+ margin-top: 6px
140
+ border-left: 5px solid transparent
141
+ border-right: 5px solid transparent
142
+ border-top: 5px solid $black
143
+
144
+ // Account for other colors
145
+ .btn-primary,
146
+ .btn-warning,
147
+ .btn-danger,
148
+ .btn-info,
149
+ .btn-success,
150
+ .btn-inverse
151
+ .caret
152
+ border-top-color: $white
153
+ border-bottom-color: $white
154
+ +opacity(75)
155
+