sass-rails-bootstrap 2.2.1 → 2.2.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 (36) hide show
  1. data/README.md +2 -2
  2. data/lib/sass-rails-bootstrap/version.rb +1 -1
  3. data/vendor/assets/javascripts/twitter/bootstrap/affix.js +12 -1
  4. data/vendor/assets/javascripts/twitter/bootstrap/alert.js +12 -1
  5. data/vendor/assets/javascripts/twitter/bootstrap/button.js +12 -1
  6. data/vendor/assets/javascripts/twitter/bootstrap/carousel.js +11 -2
  7. data/vendor/assets/javascripts/twitter/bootstrap/collapse.js +15 -4
  8. data/vendor/assets/javascripts/twitter/bootstrap/dropdown.js +16 -3
  9. data/vendor/assets/javascripts/twitter/bootstrap/modal.js +12 -1
  10. data/vendor/assets/javascripts/twitter/bootstrap/popover.js +14 -3
  11. data/vendor/assets/javascripts/twitter/bootstrap/scrollspy.js +13 -2
  12. data/vendor/assets/javascripts/twitter/bootstrap/tab.js +12 -1
  13. data/vendor/assets/javascripts/twitter/bootstrap/tooltip.js +12 -1
  14. data/vendor/assets/javascripts/twitter/bootstrap/transition.js +1 -1
  15. data/vendor/assets/javascripts/twitter/bootstrap/typeahead.js +23 -10
  16. data/vendor/assets/stylesheets/twitter/_bootstrap-responsive.scss +11 -1
  17. data/vendor/assets/stylesheets/twitter/_bootstrap.scss +1 -1
  18. data/vendor/assets/stylesheets/twitter/bootstrap/_alerts.sass +14 -0
  19. data/vendor/assets/stylesheets/twitter/bootstrap/_breadcrumbs.sass +5 -5
  20. data/vendor/assets/stylesheets/twitter/bootstrap/_button-groups.sass +27 -42
  21. data/vendor/assets/stylesheets/twitter/bootstrap/_buttons.sass +6 -9
  22. data/vendor/assets/stylesheets/twitter/bootstrap/_carousel.sass +15 -15
  23. data/vendor/assets/stylesheets/twitter/bootstrap/_code.sass +9 -3
  24. data/vendor/assets/stylesheets/twitter/bootstrap/_dropdowns.sass +5 -9
  25. data/vendor/assets/stylesheets/twitter/bootstrap/_forms.sass +12 -8
  26. data/vendor/assets/stylesheets/twitter/bootstrap/_labels-badges.sass +7 -0
  27. data/vendor/assets/stylesheets/twitter/bootstrap/_mixins.sass +1 -1
  28. data/vendor/assets/stylesheets/twitter/bootstrap/_modals.sass +4 -3
  29. data/vendor/assets/stylesheets/twitter/bootstrap/_navbar.sass +18 -4
  30. data/vendor/assets/stylesheets/twitter/bootstrap/_navs.sass +5 -0
  31. data/vendor/assets/stylesheets/twitter/bootstrap/_popovers.sass +48 -36
  32. data/vendor/assets/stylesheets/twitter/bootstrap/_reset.sass +69 -4
  33. data/vendor/assets/stylesheets/twitter/bootstrap/_tables.sass +28 -31
  34. data/vendor/assets/stylesheets/twitter/bootstrap/_type.sass +17 -1
  35. data/vendor/assets/stylesheets/twitter/bootstrap/_variables.sass +3 -3
  36. metadata +6 -6
@@ -28,6 +28,13 @@
28
28
  +border-radius(9px)
29
29
 
30
30
 
31
+ // Empty labels/badges collapse
32
+ .label,
33
+ .badge
34
+ &:empty
35
+ display: none
36
+
37
+
31
38
  // Hover state, but only for links
32
39
  a
33
40
  &.label:hover,
@@ -139,7 +139,7 @@
139
139
  // Mixin for form field states
140
140
  =form-field-state($textColor: #555, $borderColor: #ccc, $backgroundColor: #f5f5f5)
141
141
  // Set the text color
142
- > label,
142
+ .control-label,
143
143
  .help-block,
144
144
  .help-inline
145
145
  color: $textColor
@@ -23,11 +23,11 @@
23
23
  // Base modal
24
24
  .modal
25
25
  position: fixed
26
- top: 50%
26
+ top: 10%
27
27
  left: 50%
28
28
  z-index: $zindexModal
29
29
  width: 560px
30
- margin: -250px 0 0 -280px
30
+ margin-left: -280px
31
31
  background-color: $white
32
32
  border: 1px solid #999
33
33
  border: 1px solid rgba(0,0,0,.3)
@@ -41,7 +41,7 @@
41
41
  +transition(#{'opacity .3s linear, top .3s ease-out'})
42
42
  top: -25%
43
43
  &.in
44
- top: 50%
44
+ top: 10%
45
45
 
46
46
  .modal-header
47
47
  padding: 9px 15px
@@ -56,6 +56,7 @@
56
56
 
57
57
  // Body (where all modal content resides)
58
58
  .modal-body
59
+ position: relative
59
60
  overflow-y: auto
60
61
  max-height: 400px
61
62
  padding: 15px
@@ -10,7 +10,6 @@
10
10
  .navbar
11
11
  overflow: visible
12
12
  margin-bottom: $baseLineHeight
13
- color: $navbarText
14
13
 
15
14
  // Fix for IE7's bad z-indexing so dropdowns don't appear below content that follows the navbar
16
15
  *position: relative
@@ -62,6 +61,7 @@
62
61
  .navbar-text
63
62
  margin-bottom: 0
64
63
  line-height: $navbarHeight
64
+ color: $navbarText
65
65
 
66
66
 
67
67
  // Janky solution for now to account for links outside the .nav
@@ -114,7 +114,7 @@
114
114
  margin-top: 3px
115
115
  .input-append,
116
116
  .input-prepend
117
- margin-top: 6px
117
+ margin-top: 5px
118
118
  white-space: nowrap // preven two items from separating within a .navbar-form that has .pull-left
119
119
  input
120
120
  margin-top: 0 // remove the margin on top since it's on the parent
@@ -310,6 +310,12 @@
310
310
  top: auto
311
311
 
312
312
 
313
+ // Caret should match text color on hover
314
+ .navbar .nav li.dropdown > a:hover .caret
315
+ border-top-color: $navbarLinkColorActive
316
+ border-bottom-color: $navbarLinkColorActive
317
+
318
+
313
319
  // Remove background color from open dropdown
314
320
  .navbar .nav li.dropdown.open > .dropdown-toggle,
315
321
  .navbar .nav li.dropdown.active > .dropdown-toggle,
@@ -352,8 +358,6 @@
352
358
  // -------------------------
353
359
 
354
360
  .navbar-inverse
355
- color: $navbarInverseText
356
-
357
361
  .navbar-inner
358
362
  +gradient-vertical($navbarInverseBackgroundHighlight, $navbarInverseBackground)
359
363
  border-color: $navbarInverseBorder
@@ -365,6 +369,12 @@
365
369
  &:hover
366
370
  color: $navbarInverseLinkColorHover
367
371
 
372
+ .brand
373
+ color: $navbarInverseBrandColor
374
+
375
+ .navbar-text
376
+ color: $navbarInverseText
377
+
368
378
  .nav > li > a:focus,
369
379
  .nav > li > a:hover
370
380
  background-color: $navbarInverseLinkBackgroundHover
@@ -394,6 +404,10 @@
394
404
  background-color: $navbarInverseLinkBackgroundActive
395
405
  color: $navbarInverseLinkColorActive
396
406
 
407
+ .nav li.dropdown > a:hover .caret
408
+ border-top-color: $navbarInverseLinkColorActive
409
+ border-bottom-color: $navbarInverseLinkColorActive
410
+
397
411
  .nav li.dropdown > .dropdown-toggle .caret
398
412
  border-top-color: $navbarInverseLinkColor
399
413
  border-bottom-color: $navbarInverseLinkColor
@@ -19,6 +19,11 @@
19
19
  text-decoration: none
20
20
  background-color: $grayLighter
21
21
 
22
+ // Prevent IE8 from misplacing imgs
23
+ // See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989
24
+ .nav > li > a > img
25
+ max-width: none
26
+
22
27
  // Redeclare pull classes because of specifity
23
28
  .nav > .pull-right
24
29
  float: right
@@ -11,6 +11,7 @@
11
11
  display: none
12
12
  width: 236px
13
13
  padding: 1px
14
+ text-align: left // Reset given new insertion method
14
15
  background-color: $popoverBackground
15
16
  -webkit-background-clip: padding-box
16
17
  -moz-background-clip: padding
@@ -20,6 +21,9 @@
20
21
  +border-radius(6px)
21
22
  +box-shadow(0 5px 10px rgba(0,0,0,.2))
22
23
 
24
+ // Overrides for proper insertion
25
+ white-space: normal
26
+
23
27
  // Offset the popover to account for the popover arrow
24
28
  &.top
25
29
  margin-top: -10px
@@ -42,67 +46,75 @@
42
46
 
43
47
  .popover-content
44
48
  padding: 9px 14px
45
- p, ul, ol
46
- margin-bottom: 0
47
49
 
48
50
  // Arrows
51
+ //
52
+ // .arrow is outer, .arrow:after is inner
53
+
49
54
  .popover .arrow,
50
55
  .popover .arrow:after
51
56
  position: absolute
52
- display: inline-block
57
+ display: block
53
58
  width: 0
54
59
  height: 0
55
60
  border-color: transparent
56
61
  border-style: solid
62
+ .popover .arrow
63
+ border-width: $popoverArrowOuterWidth
57
64
  .popover .arrow:after
65
+ border-width: $popoverArrowWidth
58
66
  content: ""
59
- z-index: -1
60
67
 
61
68
  .popover
62
69
  &.top .arrow
63
- bottom: -$popoverArrowWidth
64
70
  left: 50%
65
- margin-left: -$popoverArrowWidth
66
- border-width: $popoverArrowWidth $popoverArrowWidth 0
67
- border-top-color: $popoverArrowColor
71
+ margin-left: -$popoverArrowOuterWidth
72
+ border-bottom-width: 0
73
+ border-top-color: #999 // IE8 fallback
74
+ border-top-color: $popoverArrowOuterColor
75
+ bottom: -$popoverArrowOuterWidth
68
76
  &:after
69
- border-width: $popoverArrowOuterWidth $popoverArrowOuterWidth 0
70
- border-top-color: $popoverArrowOuterColor
71
- bottom: -1px
72
- left: -$popoverArrowOuterWidth
77
+ bottom: 1px
78
+ margin-left: -$popoverArrowWidth
79
+ border-bottom-width: 0
80
+ border-top-color: $popoverArrowColor
73
81
 
74
82
  &.right .arrow
75
83
  top: 50%
76
- left: -$popoverArrowWidth
77
- margin-top: -$popoverArrowWidth
78
- border-width: $popoverArrowWidth $popoverArrowWidth $popoverArrowWidth 0
79
- border-right-color: $popoverArrowColor
84
+ left: -$popoverArrowOuterWidth
85
+ margin-top: -$popoverArrowOuterWidth
86
+ border-left-width: 0
87
+ border-right-color: #999 // IE8 fallback
88
+ border-right-color: $popoverArrowOuterColor
80
89
  &:after
81
- border-width: $popoverArrowOuterWidth $popoverArrowOuterWidth $popoverArrowOuterWidth 0
82
- border-right-color: $popoverArrowOuterColor
83
- bottom: -$popoverArrowOuterWidth
84
- left: -1px
90
+ left: 1px
91
+ bottom: -$popoverArrowWidth
92
+ border-left-width: 0
93
+ border-right-color: $popoverArrowColor
85
94
 
86
95
  &.bottom .arrow
87
- top: -$popoverArrowWidth
88
96
  left: 50%
89
- margin-left: -$popoverArrowWidth
90
- border-width: 0 $popoverArrowWidth $popoverArrowWidth
91
- border-bottom-color: $popoverArrowColor
97
+ margin-left: -$popoverArrowOuterWidth
98
+ border-top-width: 0
99
+ border-bottom-color: #999 // IE8 fallback
100
+ border-bottom-color: $popoverArrowOuterColor
101
+ top: -$popoverArrowOuterWidth
92
102
  &:after
93
- border-width: 0 $popoverArrowOuterWidth $popoverArrowOuterWidth
94
- border-bottom-color: $popoverArrowOuterColor
95
- top: -1px
96
- left: -$popoverArrowOuterWidth
103
+ top: 1px
104
+ margin-left: -$popoverArrowWidth
105
+ border-top-width: 0
106
+ border-bottom-color: $popoverArrowColor
97
107
 
98
108
  &.left .arrow
99
109
  top: 50%
100
- right: -$popoverArrowWidth
101
- margin-top: -$popoverArrowWidth
102
- border-width: $popoverArrowWidth 0 $popoverArrowWidth $popoverArrowWidth
103
- border-left-color: $popoverArrowColor
110
+ right: -$popoverArrowOuterWidth
111
+ margin-top: -$popoverArrowOuterWidth
112
+ border-right-width: 0
113
+ border-left-color: #999 // IE8 fallback
114
+ border-left-color: $popoverArrowOuterColor
104
115
  &:after
105
- border-width: $popoverArrowOuterWidth 0 $popoverArrowOuterWidth $popoverArrowOuterWidth
106
- border-left-color: $popoverArrowOuterColor
107
- bottom: -$popoverArrowOuterWidth
108
- right: -1px
116
+ right: 1px
117
+ border-right-width: 0
118
+ border-left-color: $popoverArrowColor
119
+ bottom: -$popoverArrowWidth
120
+
@@ -1,5 +1,5 @@
1
1
  //
2
- // Reset
2
+ // Reset CSS
3
3
  // Adapted from http://github.com/necolas/normalize.css
4
4
  // --------------------------------------------------
5
5
 
@@ -111,11 +111,19 @@ input[type="reset"],
111
111
  input[type="submit"]
112
112
  -webkit-appearance: button // Corrects inability to style clickable `input` types in iOS.
113
113
  cursor: pointer // Improves usability and consistency of cursor style between image-type `input` and others.
114
+
115
+ label,
116
+ select,
117
+ button,
118
+ input[type="button"],
119
+ input[type="reset"],
120
+ input[type="submit"],
121
+ input[type="radio"],
122
+ input[type="checkbox"]
123
+ cursor: pointer // Improves usability and consistency of cursor style between image-type `input` and others.
114
124
 
115
125
  input[type="search"] // Appearance in Safari/Chrome
116
- -webkit-box-sizing: content-box
117
- -moz-box-sizing: content-box
118
- box-sizing: content-box
126
+ +box-sizing(content-box)
119
127
  -webkit-appearance: textfield
120
128
 
121
129
  input[type="search"]::-webkit-search-decoration,
@@ -125,3 +133,60 @@ input[type="search"]::-webkit-search-cancel-button
125
133
  textarea
126
134
  overflow: auto // Remove vertical scrollbar in IE6-9
127
135
  vertical-align: top // Readability and alignment cross-browser
136
+
137
+
138
+
139
+ // Printing
140
+ // -------------------------
141
+ // Source: https://github.com/h5bp/html5-boilerplate/blob/master/css/main.css
142
+
143
+ @media print
144
+ *
145
+ text-shadow: none !important
146
+ color: #000 !important // Black prints faster: h5bp.com/s
147
+ background: transparent !important
148
+ box-shadow: none !important
149
+
150
+ a,
151
+ a:visited
152
+ text-decoration: underline
153
+
154
+ a[href]:after
155
+ content: " (" attr(href) ")"
156
+
157
+ abbr[title]:after
158
+ content: " (" attr(title) ")"
159
+
160
+ // Don't show links for images, or javascript/internal links
161
+ .ir a:after,
162
+ a[href^="javascript:"]:after,
163
+ a[href^="#"]:after
164
+ content: ""
165
+
166
+ pre,
167
+ blockquote
168
+ border: 1px solid #999
169
+ page-break-inside: avoid
170
+
171
+ thead
172
+ display: table-header-group // h5bp.com/t
173
+
174
+ tr,
175
+ img
176
+ page-break-inside: avoid
177
+
178
+ img
179
+ max-width: 100% !important
180
+
181
+ @page
182
+ margin: 0.5cm
183
+
184
+ p,
185
+ h2,
186
+ h3
187
+ orphans: 3
188
+ widows: 3
189
+
190
+ h2,
191
+ h3
192
+ page-break-after: avoid
@@ -42,6 +42,9 @@ table
42
42
  // Account for multiple tbody instances
43
43
  tbody + tbody
44
44
  border-top: 2px solid $tableBorder
45
+ // Nesting
46
+ .table
47
+ background-color: $bodyBackground
45
48
 
46
49
 
47
50
 
@@ -78,45 +81,39 @@ table
78
81
  tbody:first-child tr:first-child td
79
82
  border-top: 0
80
83
  // For first th or td in the first row in the first thead or tbody
81
- thead:first-child tr:first-child th:first-child,
82
- tbody:first-child tr:first-child td:first-child
83
- -webkit-border-top-left-radius: 4px
84
- border-top-left-radius: 4px
85
- -moz-border-radius-topleft: 4px
86
- thead:first-child tr:first-child th:last-child,
87
- tbody:first-child tr:first-child td:last-child
88
- -webkit-border-top-right-radius: 4px
89
- border-top-right-radius: 4px
90
- -moz-border-radius-topright: 4px
91
- // For first th or td in the first row in the first thead or tbody
92
- thead:last-child tr:last-child th:first-child,
93
- tbody:last-child tr:last-child td:first-child,
94
- tfoot:last-child tr:last-child td:first-child
95
- -webkit-border-bottom-left-radius: 4px
96
- border-bottom-left-radius: 4px
97
- -moz-border-radius-bottomleft: 4px
98
- thead:last-child tr:last-child th:last-child,
99
- tbody:last-child tr:last-child td:last-child,
100
- tfoot:last-child tr:last-child td:last-child
101
- -webkit-border-bottom-right-radius: 4px
102
- border-bottom-right-radius: 4px
103
- -moz-border-radius-bottomright: 4px
84
+ thead:first-child tr:first-child > th:first-child,
85
+ tbody:first-child tr:first-child > td:first-child
86
+ +border-top-left-radius($baseBorderRadius)
87
+ thead:first-child tr:first-child > th:last-child,
88
+ tbody:first-child tr:first-child > td:last-child
89
+ +border-top-right-radius($baseBorderRadius)
90
+ // For first th or td in the last row in the last thead or tbody
91
+ thead:last-child tr:last-child > th:first-child,
92
+ tbody:last-child tr:last-child > td:first-child,
93
+ tfoot:last-child tr:last-child > td:first-child
94
+ +border-bottom-left-radius($baseBorderRadius)
95
+ thead:last-child tr:last-child > th:last-child,
96
+ tbody:last-child tr:last-child > td:last-child,
97
+ tfoot:last-child tr:last-child > td:last-child
98
+ +border-bottom-right-radius($baseBorderRadius)
99
+
100
+ // Clear border-radius for first and last td in the last row in the last tbody for table with tfoot
101
+ tfoot + tbody:last-child tr:last-child td:first-child
102
+ +border-bottom-left-radius(0)
103
+ tfoot + tbody:last-child tr:last-child td:last-child
104
+ +border-bottom-right-radius(0)
104
105
 
105
106
  // Special fixes to round the left border on the first td/th
106
107
  caption + thead tr:first-child th:first-child,
107
108
  caption + tbody tr:first-child td:first-child,
108
109
  colgroup + thead tr:first-child th:first-child,
109
110
  colgroup + tbody tr:first-child td:first-child
110
- -webkit-border-top-left-radius: 4px
111
- border-top-left-radius: 4px
112
- -moz-border-radius-topleft: 4px
111
+ +border-top-left-radius($baseBorderRadius)
113
112
  caption + thead tr:first-child th:last-child,
114
113
  caption + tbody tr:first-child td:last-child,
115
114
  colgroup + thead tr:first-child th:last-child,
116
115
  colgroup + tbody tr:first-child td:last-child
117
- -webkit-border-top-right-radius: 4px
118
- border-top-right-radius: 4px
119
- -moz-border-radius-topright: 4px
116
+ +border-top-right-radius($baseBorderRadius)
120
117
 
121
118
 
122
119
  // ZEBRA-STRIPING
@@ -125,8 +122,8 @@ table
125
122
  // Default zebra-stripe styles (alternating gray and transparent backgrounds)
126
123
  .table-striped
127
124
  tbody
128
- tr:nth-child(odd) td,
129
- tr:nth-child(odd) th
125
+ > tr:nth-child(odd) > td,
126
+ > tr:nth-child(odd) > th
130
127
  background-color: $tableBackgroundAccent
131
128
 
132
129
 
@@ -19,8 +19,9 @@ p
19
19
  // Emphasis & misc
20
20
  // -------------------------
21
21
 
22
+ // Ex: 14px base font * 85% = about 12px
22
23
  small
23
- font-size: 85% // Ex: 14px base font * 85% = about 12px
24
+ font-size: 85%
24
25
 
25
26
  strong
26
27
  font-weight: bold
@@ -34,6 +35,8 @@ cite
34
35
  // Utility classes
35
36
  .muted
36
37
  color: $grayLight
38
+ a.muted:hover
39
+ color: darken($grayLight, 10%)
37
40
 
38
41
  .text-warning
39
42
  color: $warningText
@@ -125,10 +128,23 @@ ol ul
125
128
  li
126
129
  line-height: $baseLineHeight
127
130
 
131
+
132
+ // Remove default list styles
128
133
  ul.unstyled,
129
134
  ol.unstyled
130
135
  margin-left: 0
131
136
  list-style: none
137
+
138
+
139
+ // Single-line list items
140
+ ul.inline,
141
+ ol.inline
142
+ margin-left: 0
143
+ list-style: none
144
+ & > li
145
+ display: inline-block
146
+ padding-left: 5px
147
+ padding-right: 5px
132
148
 
133
149
 
134
150
  // Description Lists