sass-twitter-bootstrap 2.2.1 → 2.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. data/lib/sass/twitter/bootstrap/version.rb +1 -1
  2. data/vendor/assets/javascripts/twitter/bootstrap-affix.js +12 -1
  3. data/vendor/assets/javascripts/twitter/bootstrap-alert.js +12 -1
  4. data/vendor/assets/javascripts/twitter/bootstrap-button.js +12 -1
  5. data/vendor/assets/javascripts/twitter/bootstrap-carousel.js +11 -2
  6. data/vendor/assets/javascripts/twitter/bootstrap-collapse.js +15 -4
  7. data/vendor/assets/javascripts/twitter/bootstrap-dropdown.js +16 -3
  8. data/vendor/assets/javascripts/twitter/bootstrap-modal.js +12 -1
  9. data/vendor/assets/javascripts/twitter/bootstrap-popover.js +14 -3
  10. data/vendor/assets/javascripts/twitter/bootstrap-scrollspy.js +13 -2
  11. data/vendor/assets/javascripts/twitter/bootstrap-tab.js +12 -1
  12. data/vendor/assets/javascripts/twitter/bootstrap-tooltip.js +12 -1
  13. data/vendor/assets/javascripts/twitter/bootstrap-transition.js +1 -1
  14. data/vendor/assets/javascripts/twitter/bootstrap-typeahead.js +23 -10
  15. data/{lib → vendor/assets/stylesheets}/tests/buttons.html +3 -3
  16. data/vendor/assets/stylesheets/tests/css-tests.html +71 -22
  17. data/{lib → vendor/assets/stylesheets}/tests/forms-responsive.html +3 -3
  18. data/{lib → vendor/assets/stylesheets}/tests/navbar-fixed-top.html +3 -3
  19. data/{lib → vendor/assets/stylesheets}/tests/navbar-static-top.html +3 -3
  20. data/vendor/assets/stylesheets/tests/navbar.html +3 -3
  21. data/vendor/assets/stylesheets/twitter/_alerts.scss +14 -0
  22. data/vendor/assets/stylesheets/twitter/_breadcrumbs.scss +5 -5
  23. data/vendor/assets/stylesheets/twitter/_button-groups.scss +27 -42
  24. data/vendor/assets/stylesheets/twitter/_buttons.scss +5 -7
  25. data/vendor/assets/stylesheets/twitter/_carousel.scss +15 -15
  26. data/vendor/assets/stylesheets/twitter/_code.scss +3 -0
  27. data/vendor/assets/stylesheets/twitter/_dropdowns.scss +5 -9
  28. data/vendor/assets/stylesheets/twitter/_forms.scss +12 -8
  29. data/vendor/assets/stylesheets/twitter/_labels-badges.scss +25 -15
  30. data/{lib → vendor/assets/stylesheets/twitter}/_media.scss +0 -0
  31. data/vendor/assets/stylesheets/twitter/_mixins.scss +3 -3
  32. data/vendor/assets/stylesheets/twitter/_modals.scss +1 -1
  33. data/vendor/assets/stylesheets/twitter/_navbar.scss +22 -4
  34. data/vendor/assets/stylesheets/twitter/_navs.scss +6 -0
  35. data/vendor/assets/stylesheets/twitter/_popovers.scss +50 -38
  36. data/vendor/assets/stylesheets/twitter/_reset.scss +82 -4
  37. data/vendor/assets/stylesheets/twitter/_tables.scss +36 -35
  38. data/vendor/assets/stylesheets/twitter/_type.scss +29 -21
  39. data/vendor/assets/stylesheets/twitter/_variables.scss +7 -7
  40. data/vendor/assets/stylesheets/twitter/bootstrap.scss +1 -1
  41. data/vendor/assets/stylesheets/twitter/responsive.scss +10 -1
  42. metadata +66 -52
@@ -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,12 +21,14 @@
20
21
  @include border-radius(6px);
21
22
  @include 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 { margin-top: -10px; }
25
29
  &.right { margin-left: 10px; }
26
30
  &.bottom { margin-top: 10px; }
27
31
  &.left { margin-left: -10px; }
28
-
29
32
  }
30
33
 
31
34
  .popover-title {
@@ -41,77 +44,86 @@
41
44
 
42
45
  .popover-content {
43
46
  padding: 9px 14px;
44
- p, ul, ol {
45
- margin-bottom: 0;
46
- }
47
47
  }
48
48
 
49
49
  // Arrows
50
+ //
51
+ // .arrow is outer, .arrow:after is inner
52
+
50
53
  .popover .arrow,
51
54
  .popover .arrow:after {
52
55
  position: absolute;
53
- display: inline-block;
56
+ display: block;
54
57
  width: 0;
55
58
  height: 0;
56
59
  border-color: transparent;
57
60
  border-style: solid;
58
61
  }
62
+ .popover .arrow {
63
+ border-width: $popoverArrowOuterWidth;
64
+ }
59
65
  .popover .arrow:after {
66
+ border-width: $popoverArrowWidth;
60
67
  content: "";
61
- z-index: -1;
62
68
  }
63
69
 
64
70
  .popover {
65
71
  &.top .arrow {
66
- bottom: -$popoverArrowWidth;
67
72
  left: 50%;
68
- margin-left: -$popoverArrowWidth;
69
- border-width: $popoverArrowWidth $popoverArrowWidth 0;
70
- border-top-color: $popoverArrowColor;
73
+ margin-left: -$popoverArrowOuterWidth;
74
+ border-bottom-width: 0;
75
+ border-top-color: #999; // IE8 fallback
76
+ border-top-color: $popoverArrowOuterColor;
77
+ bottom: -$popoverArrowOuterWidth;
71
78
  &:after {
72
- border-width: $popoverArrowOuterWidth $popoverArrowOuterWidth 0;
73
- border-top-color: $popoverArrowOuterColor;
74
- bottom: -1px;
75
- left: -$popoverArrowOuterWidth;
79
+ bottom: 1px;
80
+ margin-left: -$popoverArrowWidth;
81
+ border-bottom-width: 0;
82
+ border-top-color: $popoverArrowColor;
76
83
  }
77
84
  }
78
85
  &.right .arrow {
79
86
  top: 50%;
80
- left: -$popoverArrowWidth;
81
- margin-top: -$popoverArrowWidth;
82
- border-width: $popoverArrowWidth $popoverArrowWidth $popoverArrowWidth 0;
83
- border-right-color: $popoverArrowColor;
87
+ left: -$popoverArrowOuterWidth;
88
+ margin-top: -$popoverArrowOuterWidth;
89
+ border-left-width: 0;
90
+ border-right-color: #999; // IE8 fallback
91
+ border-right-color: $popoverArrowOuterColor;
84
92
  &:after {
85
- border-width: $popoverArrowOuterWidth $popoverArrowOuterWidth $popoverArrowOuterWidth 0;
86
- border-right-color: $popoverArrowOuterColor;
87
- bottom: -$popoverArrowOuterWidth;
88
- left: -1px;
93
+ left: 1px;
94
+ bottom: -$popoverArrowWidth;
95
+ border-left-width: 0;
96
+ border-right-color: $popoverArrowColor;
89
97
  }
90
98
  }
91
99
  &.bottom .arrow {
92
- top: -$popoverArrowWidth;
93
100
  left: 50%;
94
- margin-left: -$popoverArrowWidth;
95
- border-width: 0 $popoverArrowWidth $popoverArrowWidth;
96
- border-bottom-color: $popoverArrowColor;
101
+ margin-left: -$popoverArrowOuterWidth;
102
+ border-top-width: 0;
103
+ border-bottom-color: #999; // IE8 fallback
104
+ border-bottom-color: $popoverArrowOuterColor;
105
+ top: -$popoverArrowOuterWidth;
97
106
  &:after {
98
- border-width: 0 $popoverArrowOuterWidth $popoverArrowOuterWidth;
99
- border-bottom-color: $popoverArrowOuterColor;
100
- top: -1px;
101
- left: -$popoverArrowOuterWidth;
107
+ top: 1px;
108
+ margin-left: -$popoverArrowWidth;
109
+ border-top-width: 0;
110
+ border-bottom-color: $popoverArrowColor;
102
111
  }
103
112
  }
113
+
104
114
  &.left .arrow {
105
115
  top: 50%;
106
- right: -$popoverArrowWidth;
107
- margin-top: -$popoverArrowWidth;
108
- border-width: $popoverArrowWidth 0 $popoverArrowWidth $popoverArrowWidth;
109
- border-left-color: $popoverArrowColor;
116
+ right: -$popoverArrowOuterWidth;
117
+ margin-top: -$popoverArrowOuterWidth;
118
+ border-right-width: 0;
119
+ border-left-color: #999; // IE8 fallback
120
+ border-left-color: $popoverArrowOuterColor;
110
121
  &:after {
111
- border-width: $popoverArrowOuterWidth 0 $popoverArrowOuterWidth $popoverArrowOuterWidth;
112
- border-left-color: $popoverArrowOuterColor;
113
- bottom: -$popoverArrowOuterWidth;
114
- right: -1px;
122
+ right: 1px;
123
+ border-right-width: 0;
124
+ border-left-color: $popoverArrowColor;
125
+ bottom: -$popoverArrowWidth;
115
126
  }
116
127
  }
128
+
117
129
  }
@@ -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
 
@@ -122,10 +122,18 @@ input[type="submit"] {
122
122
  -webkit-appearance: button; // Corrects inability to style clickable `input` types in iOS.
123
123
  cursor: pointer; // Improves usability and consistency of cursor style between image-type `input` and others.
124
124
  }
125
+ label,
126
+ select,
127
+ button,
128
+ input[type="button"],
129
+ input[type="reset"],
130
+ input[type="submit"],
131
+ input[type="radio"],
132
+ input[type="checkbox"] {
133
+ cursor: pointer; // Improves usability and consistency of cursor style between image-type `input` and others.
134
+ }
125
135
  input[type="search"] { // Appearance in Safari/Chrome
126
- -webkit-box-sizing: content-box;
127
- -moz-box-sizing: content-box;
128
- box-sizing: content-box;
136
+ @include box-sizing(content-box);
129
137
  -webkit-appearance: textfield;
130
138
  }
131
139
  input[type="search"]::-webkit-search-decoration,
@@ -136,3 +144,73 @@ textarea {
136
144
  overflow: auto; // Remove vertical scrollbar in IE6-9
137
145
  vertical-align: top; // Readability and alignment cross-browser
138
146
  }
147
+
148
+
149
+ // Printing
150
+ // -------------------------
151
+ // Source: https://github.com/h5bp/html5-boilerplate/blob/master/css/main.css
152
+
153
+ @media print {
154
+
155
+ * {
156
+ text-shadow: none !important;
157
+ color: #000 !important; // Black prints faster: h5bp.com/s
158
+ background: transparent !important;
159
+ box-shadow: none !important;
160
+ }
161
+
162
+ a,
163
+ a:visited {
164
+ text-decoration: underline;
165
+ }
166
+
167
+ a[href]:after {
168
+ content: " (" attr(href) ")";
169
+ }
170
+
171
+ abbr[title]:after {
172
+ content: " (" attr(title) ")";
173
+ }
174
+
175
+ // Don't show links for images, or javascript/internal links
176
+ .ir a:after,
177
+ a[href^="javascript:"]:after,
178
+ a[href^="#"]:after {
179
+ content: "";
180
+ }
181
+
182
+ pre,
183
+ blockquote {
184
+ border: 1px solid #999;
185
+ page-break-inside: avoid;
186
+ }
187
+
188
+ thead {
189
+ display: table-header-group; // h5bp.com/t
190
+ }
191
+
192
+ tr,
193
+ img {
194
+ page-break-inside: avoid;
195
+ }
196
+
197
+ img {
198
+ max-width: 100% !important;
199
+ }
200
+
201
+ @page {
202
+ margin: 0.5cm;
203
+ }
204
+
205
+ p,
206
+ h2,
207
+ h3 {
208
+ orphans: 3;
209
+ widows: 3;
210
+ }
211
+
212
+ h2,
213
+ h3 {
214
+ page-break-after: avoid;
215
+ }
216
+ }
@@ -48,6 +48,11 @@ table {
48
48
  tbody + tbody {
49
49
  border-top: 2px solid $tableBorder;
50
50
  }
51
+
52
+ // Nesting
53
+ .table {
54
+ background-color: $bodyBackground;
55
+ }
51
56
  }
52
57
 
53
58
 
@@ -89,51 +94,47 @@ table {
89
94
  border-top: 0;
90
95
  }
91
96
  // For first th or td in the first row in the first thead or tbody
92
- thead:first-child tr:first-child th:first-child,
93
- tbody:first-child tr:first-child td:first-child {
94
- -webkit-border-top-left-radius: 4px;
95
- border-top-left-radius: 4px;
96
- -moz-border-radius-topleft: 4px;
97
- }
98
- thead:first-child tr:first-child th:last-child,
99
- tbody:first-child tr:first-child td:last-child {
100
- -webkit-border-top-right-radius: 4px;
101
- border-top-right-radius: 4px;
102
- -moz-border-radius-topright: 4px;
97
+ thead:first-child tr:first-child > th:first-child,
98
+ tbody:first-child tr:first-child > td:first-child {
99
+ @include border-top-left-radius($baseBorderRadius);
103
100
  }
104
- // For first th or td in the first row in the first thead or tbody
105
- thead:last-child tr:last-child th:first-child,
106
- tbody:last-child tr:last-child td:first-child,
107
- tfoot:last-child tr:last-child td:first-child {
108
- @include border-radius(0 0 0 4px);
109
- -webkit-border-bottom-left-radius: 4px;
110
- border-bottom-left-radius: 4px;
111
- -moz-border-radius-bottomleft: 4px;
112
- }
113
- thead:last-child tr:last-child th:last-child,
114
- tbody:last-child tr:last-child td:last-child,
115
- tfoot:last-child tr:last-child td:last-child {
116
- -webkit-border-bottom-right-radius: 4px;
117
- border-bottom-right-radius: 4px;
118
- -moz-border-radius-bottomright: 4px;
101
+ thead:first-child tr:first-child > th:last-child,
102
+ tbody:first-child tr:first-child > td:last-child {
103
+ @include border-top-right-radius($baseBorderRadius);
104
+ }
105
+ // For first th or td in the last row in the last thead or tbody
106
+ thead:last-child tr:last-child > th:first-child,
107
+ tbody:last-child tr:last-child > td:first-child,
108
+ tfoot:last-child tr:last-child > td:first-child {
109
+ @include border-bottom-left-radius($baseBorderRadius);
110
+ }
111
+ thead:last-child tr:last-child > th:last-child,
112
+ tbody:last-child tr:last-child > td:last-child,
113
+ tfoot:last-child tr:last-child > td:last-child {
114
+ @include border-bottom-right-radius($baseBorderRadius);
119
115
  }
120
116
 
117
+ // Clear border-radius for first and last td in the last row in the last tbody for table with tfoot
118
+ tfoot + tbody:last-child tr:last-child td:first-child {
119
+ @include border-bottom-left-radius(0);
120
+ }
121
+ tfoot + tbody:last-child tr:last-child td:last-child {
122
+ @include border-bottom-right-radius(0);
123
+ }
124
+
125
+
121
126
  // Special fixes to round the left border on the first td/th
122
127
  caption + thead tr:first-child th:first-child,
123
128
  caption + tbody tr:first-child td:first-child,
124
129
  colgroup + thead tr:first-child th:first-child,
125
130
  colgroup + tbody tr:first-child td:first-child {
126
- -webkit-border-top-left-radius: 4px;
127
- border-top-left-radius: 4px;
128
- -moz-border-radius-topleft: 4px;
131
+ @include border-top-left-radius($baseBorderRadius);
129
132
  }
130
133
  caption + thead tr:first-child th:last-child,
131
134
  caption + tbody tr:first-child td:last-child,
132
135
  colgroup + thead tr:first-child th:last-child,
133
136
  colgroup + tbody tr:first-child td:last-child {
134
- -webkit-border-top-right-radius: 4px;
135
- border-top-right-radius: 4px;
136
- -moz-border-radius-topright: 4px;
137
+ @include border-top-right-radius($baseBorderRadius);
137
138
  }
138
139
 
139
140
  }
@@ -147,8 +148,8 @@ table {
147
148
  // Default zebra-stripe styles (alternating gray and transparent backgrounds)
148
149
  .table-striped {
149
150
  tbody {
150
- tr:nth-child(odd) td,
151
- tr:nth-child(odd) th {
151
+ > tr:nth-child(odd) > td,
152
+ > tr:nth-child(odd) > th {
152
153
  background-color: $tableBackgroundAccent;
153
154
  }
154
155
  }
@@ -224,4 +225,4 @@ table th[class*="span"],
224
225
  &.info:hover td {
225
226
  background-color: darken($infoBackground, 5%);
226
227
  }
227
- }
228
+ }
@@ -20,33 +20,27 @@ p {
20
20
  // Emphasis & misc
21
21
  // -------------------------
22
22
 
23
- small {
24
- font-size: 85%; // Ex: 14px base font * 85% = about 12px
25
- }
26
- strong {
27
- font-weight: bold;
28
- }
29
- em {
30
- font-style: italic;
31
- }
32
- cite {
33
- font-style: normal;
34
- }
23
+ // Ex: 14px base font * 85% = about 12px
24
+ small { font-size: 85%; }
25
+
26
+ strong { font-weight: bold; }
27
+ em { font-style: italic; }
28
+ cite { font-style: normal; }
35
29
 
36
30
  // Utility classes
37
- .muted {
38
- color: $grayLight;
39
- }
40
- .text-warning { color: $warningText; }
31
+ .muted { color: $grayLight; }
32
+ a.muted:hover { color: darken($grayLight, 10%); }
33
+
34
+ .text-warning { color: $warningText; }
41
35
  a.text-warning:hover { color: darken($warningText, 10%); }
42
36
 
43
- .text-error { color: $errorText; }
44
- a.text-error:hover { color: darken($errorText, 10%); }
37
+ .text-error { color: $errorText; }
38
+ a.text-error:hover { color: darken($errorText, 10%); }
45
39
 
46
- .text-info { color: $infoText; }
47
- a.text-info:hover { color: darken($infoText, 10%); }
40
+ .text-info { color: $infoText; }
41
+ a.text-info:hover { color: darken($infoText, 10%); }
48
42
 
49
- .text-success { color: $successText; }
43
+ .text-success { color: $successText; }
50
44
  a.text-success:hover { color: darken($successText, 10%); }
51
45
 
52
46
 
@@ -112,12 +106,26 @@ ol ul {
112
106
  li {
113
107
  line-height: $baseLineHeight;
114
108
  }
109
+
110
+ // Remove default list styles
115
111
  ul.unstyled,
116
112
  ol.unstyled {
117
113
  margin-left: 0;
118
114
  list-style: none;
119
115
  }
120
116
 
117
+ // Single-line list items
118
+ ul.inline,
119
+ ol.inline {
120
+ margin-left: 0;
121
+ list-style: none;
122
+ & > li {
123
+ display: inline-block;
124
+ padding-left: 5px;
125
+ padding-right: 5px;
126
+ }
127
+ }
128
+
121
129
  // Description Lists
122
130
  dl {
123
131
  margin-bottom: $baseLineHeight;
@@ -66,13 +66,13 @@ $fontSizeLarge: $baseFontSize * 1.25; // ~18px
66
66
  $fontSizeSmall: $baseFontSize * 0.85; // ~12px
67
67
  $fontSizeMini: $baseFontSize * 0.75; // ~11px
68
68
 
69
- $paddingLarge: 11px 19px; // 44px
70
- $paddingSmall: 2px 10px; // 26px
71
- $paddingMini: 1px 6px; // 24px
69
+ $paddingLarge: 11px 19px !default; // 44px
70
+ $paddingSmall: 2px 10px !default; // 26px
71
+ $paddingMini: 0px 6px !default; // 22px
72
72
 
73
- $baseBorderRadius: 4px;
74
- $borderRadiusLarge: 6px;
75
- $borderRadiusSmall: 3px;
73
+ $baseBorderRadius: 4px !default;
74
+ $borderRadiusLarge: 6px !default;
75
+ $borderRadiusSmall: 3px !default;
76
76
 
77
77
 
78
78
  // Tables
@@ -167,7 +167,7 @@ $hrBorder: $grayLighter !default;
167
167
 
168
168
  // Horizontal forms & lists
169
169
  // -------------------------
170
- $horizontalComponentOffset: 180px;
170
+ $horizontalComponentOffset: 180px !default;
171
171
 
172
172
 
173
173
  // Wells