sass-twitter-bootstrap 2.1.1 → 2.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. data/lib/_media.scss +55 -0
  2. data/lib/sass/twitter/bootstrap/version.rb +1 -1
  3. data/lib/tests/buttons.html +139 -0
  4. data/lib/tests/forms-responsive.html +71 -0
  5. data/lib/tests/navbar-fixed-top.html +104 -0
  6. data/lib/tests/navbar-static-top.html +107 -0
  7. data/vendor/assets/javascripts/twitter/bootstrap-affix.js +4 -2
  8. data/vendor/assets/javascripts/twitter/bootstrap-alert.js +2 -4
  9. data/vendor/assets/javascripts/twitter/bootstrap-button.js +5 -7
  10. data/vendor/assets/javascripts/twitter/bootstrap-carousel.js +12 -12
  11. data/vendor/assets/javascripts/twitter/bootstrap-collapse.js +9 -11
  12. data/vendor/assets/javascripts/twitter/bootstrap-dropdown.js +9 -11
  13. data/vendor/assets/javascripts/twitter/bootstrap-modal.js +20 -25
  14. data/vendor/assets/javascripts/twitter/bootstrap-popover.js +1 -1
  15. data/vendor/assets/javascripts/twitter/bootstrap-scrollspy.js +1 -1
  16. data/vendor/assets/javascripts/twitter/bootstrap-tab.js +5 -7
  17. data/vendor/assets/javascripts/twitter/bootstrap-tooltip.js +12 -11
  18. data/vendor/assets/javascripts/twitter/bootstrap-transition.js +5 -5
  19. data/vendor/assets/javascripts/twitter/bootstrap-typeahead.js +19 -9
  20. data/vendor/assets/javascripts/twitter/bootstrap.js +1 -0
  21. data/vendor/assets/stylesheets/tests/navbar.html +35 -36
  22. data/vendor/assets/stylesheets/twitter/_accordion.scss +1 -1
  23. data/vendor/assets/stylesheets/twitter/_alerts.scss +1 -1
  24. data/vendor/assets/stylesheets/twitter/_breadcrumbs.scss +1 -1
  25. data/vendor/assets/stylesheets/twitter/_button-groups.scss +5 -8
  26. data/vendor/assets/stylesheets/twitter/_buttons.scss +18 -17
  27. data/vendor/assets/stylesheets/twitter/_code.scss +1 -1
  28. data/vendor/assets/stylesheets/twitter/_component-animations.scss +2 -2
  29. data/vendor/assets/stylesheets/twitter/_dropdowns.scss +32 -5
  30. data/vendor/assets/stylesheets/twitter/_forms.scss +46 -14
  31. data/vendor/assets/stylesheets/twitter/_hero-unit.scss +6 -5
  32. data/vendor/assets/stylesheets/twitter/_labels-badges.scss +4 -2
  33. data/vendor/assets/stylesheets/twitter/_mixins.scss +12 -7
  34. data/vendor/assets/stylesheets/twitter/_modals.scss +8 -11
  35. data/vendor/assets/stylesheets/twitter/_navbar.scss +8 -10
  36. data/vendor/assets/stylesheets/twitter/_navs.scss +5 -4
  37. data/vendor/assets/stylesheets/twitter/_pager.scss +10 -9
  38. data/vendor/assets/stylesheets/twitter/_pagination.scss +69 -12
  39. data/vendor/assets/stylesheets/twitter/_popovers.scss +2 -2
  40. data/vendor/assets/stylesheets/twitter/_progress-bars.scss +2 -2
  41. data/vendor/assets/stylesheets/twitter/_reset.scss +6 -4
  42. data/vendor/assets/stylesheets/twitter/_responsive-767px-max.scss +20 -1
  43. data/vendor/assets/stylesheets/twitter/_responsive-navbar.scss +12 -4
  44. data/vendor/assets/stylesheets/twitter/_scaffolding.scss +1 -3
  45. data/vendor/assets/stylesheets/twitter/_sprites.scss +3 -3
  46. data/vendor/assets/stylesheets/twitter/_tables.scss +12 -8
  47. data/vendor/assets/stylesheets/twitter/_thumbnails.scss +1 -1
  48. data/vendor/assets/stylesheets/twitter/_tooltip.scss +1 -1
  49. data/vendor/assets/stylesheets/twitter/_type.scss +30 -24
  50. data/vendor/assets/stylesheets/twitter/_variables.scss +25 -2
  51. data/vendor/assets/stylesheets/twitter/_wells.scss +3 -3
  52. data/vendor/assets/stylesheets/twitter/bootstrap.scss +2 -1
  53. data/vendor/assets/stylesheets/twitter/responsive.scss +1 -1
  54. metadata +7 -2
@@ -48,7 +48,7 @@
48
48
  margin-bottom: $baseLineHeight;
49
49
  @include gradient-vertical(#f5f5f5, #f9f9f9);
50
50
  @include box-shadow(inset 0 1px 2px rgba(0,0,0,.1));
51
- @include border-radius(4px);
51
+ @include border-radius($baseBorderRadius);
52
52
  }
53
53
 
54
54
  // Bar of progress
@@ -66,7 +66,7 @@
66
66
  @include transition(width .6s ease);
67
67
  }
68
68
  .progress .bar + .bar {
69
- @include box-shadow(#{inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15)});
69
+ @include box-shadow(inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15));
70
70
  }
71
71
 
72
72
  // Striped bars
@@ -3,6 +3,7 @@
3
3
  // Adapted from http://github.com/necolas/normalize.css
4
4
  // --------------------------------------------------
5
5
 
6
+
6
7
  // Display in IE6-9 and FF3
7
8
  // -------------------------
8
9
 
@@ -87,7 +88,8 @@ img {
87
88
  }
88
89
 
89
90
  // Prevent max-width from affecting Google Maps
90
- #map_canvas img {
91
+ #map_canvas img,
92
+ .google-maps img {
91
93
  max-width: none;
92
94
  }
93
95
 
@@ -114,11 +116,11 @@ input::-moz-focus-inner { // Inner padding and border oddities in FF3/4
114
116
  border: 0;
115
117
  }
116
118
  button,
117
- input[type="button"],
119
+ html input[type="button"], // Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` and `video` controls.
118
120
  input[type="reset"],
119
121
  input[type="submit"] {
120
- cursor: pointer; // Cursors on all buttons applied consistently
121
- -webkit-appearance: button; // Style clickable inputs in iOS
122
+ -webkit-appearance: button; // Corrects inability to style clickable `input` types in iOS.
123
+ cursor: pointer; // Improves usability and consistency of cursor style between image-type `input` and others.
122
124
  }
123
125
  input[type="search"] { // Appearance in Safari/Chrome
124
126
  -webkit-box-sizing: content-box;
@@ -58,6 +58,7 @@
58
58
  }
59
59
  // Make all grid-sized elements block level again
60
60
  [class*="span"],
61
+ .uneditable-input[class*="span"], // Makes uneditable inputs full-width when using grid sizing
61
62
  .row-fluid [class*="span"] {
62
63
  float: none;
63
64
  display: block;
@@ -70,6 +71,9 @@
70
71
  width: 100%;
71
72
  @include box-sizing(border-box);
72
73
  }
74
+ .row-fluid [class*="offset"]:first-child {
75
+ margin-left: 0;
76
+ }
73
77
 
74
78
  // FORM FIELDS
75
79
  // -----------
@@ -103,7 +107,8 @@
103
107
  right: 20px;
104
108
  width: auto;
105
109
  margin: 0;
106
- &.fade.in { top: auto; }
110
+ &.fade { top: -100px; }
111
+ &.fade.in { top: 20px; }
107
112
  }
108
113
 
109
114
  }
@@ -155,6 +160,20 @@
155
160
  }
156
161
  }
157
162
 
163
+ // Medias
164
+ // Reset float and spacing to stack
165
+ .media .pull-left,
166
+ .media .pull-right {
167
+ float: none;
168
+ display: block;
169
+ margin-bottom: 10px;
170
+ }
171
+ // Remove side margins since we stack instead of indent
172
+ .media-object {
173
+ margin-right: 0;
174
+ margin-left: 0;
175
+ }
176
+
158
177
  // Modals
159
178
  .modal {
160
179
  top: 10px;
@@ -75,7 +75,7 @@
75
75
  .nav-collapse .btn {
76
76
  padding: 4px 10px 4px;
77
77
  font-weight: normal;
78
- @include border-radius(4px);
78
+ @include border-radius($baseBorderRadius);
79
79
  }
80
80
  .nav-collapse .dropdown-menu li + li a {
81
81
  margin-bottom: 2px;
@@ -84,6 +84,10 @@
84
84
  .nav-collapse .dropdown-menu a:hover {
85
85
  background-color: $navbarBackground;
86
86
  }
87
+ .navbar-inverse .nav-collapse .nav > li > a,
88
+ .navbar-inverse .nav-collapse .dropdown-menu a {
89
+ color: $navbarInverseLinkColor;
90
+ }
87
91
  .navbar-inverse .nav-collapse .nav > li > a:hover,
88
92
  .navbar-inverse .nav-collapse .dropdown-menu a:hover {
89
93
  background-color: $navbarInverseBackground;
@@ -99,7 +103,7 @@
99
103
  top: auto;
100
104
  left: auto;
101
105
  float: none;
102
- display: block;
106
+ display: none;
103
107
  max-width: none;
104
108
  margin: 0 15px;
105
109
  padding: 0;
@@ -108,6 +112,10 @@
108
112
  @include border-radius(0);
109
113
  @include box-shadow(none);
110
114
  }
115
+ .nav-collapse .open > .dropdown-menu {
116
+ display: block;
117
+ }
118
+
111
119
  .nav-collapse .dropdown-menu:before,
112
120
  .nav-collapse .dropdown-menu:after {
113
121
  display: none;
@@ -129,7 +137,7 @@
129
137
  margin: ($baseLineHeight / 2) 0;
130
138
  border-top: 1px solid $navbarBackground;
131
139
  border-bottom: 1px solid $navbarBackground;
132
- @include box-shadow(#{inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1)});
140
+ @include box-shadow(inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1));
133
141
  }
134
142
  .navbar-inverse .nav-collapse .navbar-form,
135
143
  .navbar-inverse .nav-collapse .navbar-search {
@@ -166,7 +174,7 @@
166
174
  // DEFAULT DESKTOP
167
175
  // ---------------
168
176
 
169
- @media (min-width: 980px) {
177
+ @media (min-width: $navbarCollapseDesktopWidth) {
170
178
 
171
179
  // Required to make the collapsing navbar work on regular desktops
172
180
  .nav-collapse.collapse {
@@ -43,9 +43,7 @@ a:hover {
43
43
  background-color: #fff;
44
44
  border: 1px solid #ccc;
45
45
  border: 1px solid rgba(0,0,0,.2);
46
- -webkit-box-shadow: 0 1px 3px rgba(0,0,0,.1);
47
- -moz-box-shadow: 0 1px 3px rgba(0,0,0,.1);
48
- box-shadow: 0 1px 3px rgba(0,0,0,.1);
46
+ @include box-shadow(0 1px 3px rgba(0,0,0,.1));
49
47
  }
50
48
 
51
49
  // Perfect circle
@@ -30,8 +30,6 @@
30
30
 
31
31
  /* White icons with optional class, or on hover/active states of certain elements */
32
32
  .icon-white,
33
- .nav-tabs > .active > a > [class^="icon-"],
34
- .nav-tabs > .active > a > [class*=" icon-"],
35
33
  .nav-pills > .active > a > [class^="icon-"],
36
34
  .nav-pills > .active > a > [class*=" icon-"],
37
35
  .nav-list > .active > a > [class^="icon-"],
@@ -41,7 +39,9 @@
41
39
  .dropdown-menu > li > a:hover > [class^="icon-"],
42
40
  .dropdown-menu > li > a:hover > [class*=" icon-"],
43
41
  .dropdown-menu > .active > a > [class^="icon-"],
44
- .dropdown-menu > .active > a > [class*=" icon-"] {
42
+ .dropdown-menu > .active > a > [class*=" icon-"],
43
+ .dropdown-submenu:hover > a > [class^="icon-"],
44
+ .dropdown-submenu:hover > a > [class*=" icon-"] {
45
45
  background-image: url($iconWhiteSpritePath);
46
46
  }
47
47
 
@@ -71,7 +71,7 @@ table {
71
71
  border-collapse: separate; // Done so we can round those corners!
72
72
  *border-collapse: collapse; // IE7 can't round corners anyway
73
73
  border-left: 0;
74
- @include border-radius(4px);
74
+ @include border-radius($baseBorderRadius);
75
75
  th,
76
76
  td {
77
77
  border-left: 1px solid $tableBorder;
@@ -133,12 +133,14 @@ table {
133
133
  colgroup + tbody tr:first-child td:last-child {
134
134
  -webkit-border-top-right-radius: 4px;
135
135
  border-top-right-radius: 4px;
136
- -moz-border-radius-topleft: 4px;
136
+ -moz-border-radius-topright: 4px;
137
137
  }
138
138
 
139
139
  }
140
140
 
141
141
 
142
+
143
+
142
144
  // ZEBRA-STRIPING
143
145
  // --------------
144
146
 
@@ -170,17 +172,20 @@ table {
170
172
  // -----------------
171
173
 
172
174
  // Reset default grid behavior
173
- table [class*=span],
174
- .row-fluid table [class*=span] {
175
+ table td[class*="span"],
176
+ table th[class*="span"],
177
+ .row-fluid table td[class*="span"],
178
+ .row-fluid table th[class*="span"] {
175
179
  display: table-cell;
176
180
  float: none; // undo default grid column styles
177
181
  margin-left: 0; // undo default grid column styles
178
182
  }
179
183
 
180
184
  // Change the column widths to account for td/th padding
181
- .table {
182
- @for $i from 1 through 24 {
183
- .span#{$i} { @include tableColumns($i); }
185
+ .table td,
186
+ .table th {
187
+ @for $i from 1 through 12 {
188
+ &.span#{$i} { @include tableColumns($i); }
184
189
  }
185
190
  }
186
191
 
@@ -205,7 +210,6 @@ table [class*=span],
205
210
  }
206
211
  }
207
212
 
208
-
209
213
  // Hover states for .table-hover
210
214
  .table-hover tbody tr {
211
215
  &.success:hover td {
@@ -29,7 +29,7 @@
29
29
  padding: 4px;
30
30
  line-height: $baseLineHeight;
31
31
  border: 1px solid #ddd;
32
- @include border-radius(4px);
32
+ @include border-radius($baseBorderRadius);
33
33
  @include box-shadow(0 1px 3px rgba(0,0,0,.055));
34
34
  @include transition(all .2s ease-in-out);
35
35
  }
@@ -27,7 +27,7 @@
27
27
  text-align: center;
28
28
  text-decoration: none;
29
29
  background-color: $tooltipBackground;
30
- @include border-radius(4px);
30
+ @include border-radius($baseBorderRadius);
31
31
  }
32
32
 
33
33
  // Arrows
@@ -37,18 +37,17 @@ cite {
37
37
  .muted {
38
38
  color: $grayLight;
39
39
  }
40
- .text-warning {
41
- color: $warningText;
42
- }
43
- .text-error {
44
- color: $errorText;
45
- }
46
- .text-info {
47
- color: $infoText;
48
- }
49
- .text-success {
50
- color: $successText;
51
- }
40
+ .text-warning { color: $warningText; }
41
+ a.text-warning:hover { color: darken($warningText, 10%); }
42
+
43
+ .text-error { color: $errorText; }
44
+ a.text-error:hover { color: darken($errorText, 10%); }
45
+
46
+ .text-info { color: $infoText; }
47
+ a.text-info:hover { color: darken($infoText, 10%); }
48
+
49
+ .text-success { color: $successText; }
50
+ a.text-success:hover { color: darken($successText, 10%); }
52
51
 
53
52
 
54
53
  // Headings
@@ -58,7 +57,7 @@ h1, h2, h3, h4, h5, h6 {
58
57
  margin: ($baseLineHeight / 2) 0;
59
58
  font-family: $headingsFontFamily;
60
59
  font-weight: $headingsFontWeight;
61
- line-height: 1;
60
+ line-height: $baseLineHeight;
62
61
  color: $headingsColor;
63
62
  text-rendering: optimizelegibility; // Fix the character spacing for headings
64
63
  small {
@@ -67,17 +66,22 @@ h1, h2, h3, h4, h5, h6 {
67
66
  color: $grayLight;
68
67
  }
69
68
  }
70
- h1 { font-size: 36px; line-height: 40px; }
71
- h2 { font-size: 30px; line-height: 40px; }
72
- h3 { font-size: 24px; line-height: 40px; }
73
- h4 { font-size: 18px; line-height: 20px; }
74
- h5 { font-size: 14px; line-height: 20px; }
75
- h6 { font-size: 12px; line-height: 20px; }
76
69
 
77
- h1 small { font-size: 24px; }
78
- h2 small { font-size: 18px; }
79
- h3 small { font-size: 14px; }
80
- h4 small { font-size: 14px; }
70
+ h1,
71
+ h2,
72
+ h3 { line-height: $baseLineHeight * 2; }
73
+
74
+ h1 { font-size: $baseFontSize * 2.75; } // ~38px
75
+ h2 { font-size: $baseFontSize * 2.25; } // ~32px
76
+ h3 { font-size: $baseFontSize * 1.75; } // ~24px
77
+ h4 { font-size: $baseFontSize * 1.25; } // ~18px
78
+ h5 { font-size: $baseFontSize; }
79
+ h6 { font-size: $baseFontSize * 0.85; } // ~12px
80
+
81
+ h1 small { font-size: $baseFontSize * 1.75; } // ~24px
82
+ h2 small { font-size: $baseFontSize * 1.25; } // ~18px
83
+ h3 small { font-size: $baseFontSize; }
84
+ h4 small { font-size: $baseFontSize; }
81
85
 
82
86
 
83
87
  // Page header
@@ -155,7 +159,9 @@ hr {
155
159
  }
156
160
 
157
161
  // Abbreviations and acronyms
158
- abbr[title] {
162
+ abbr[title],
163
+ // Added data-* attribute to help out our tooltip plugin, per https://github.com/twitter/bootstrap/issues/5257
164
+ abbr[data-original-title] {
159
165
  cursor: help;
160
166
  border-bottom: 1px dotted $grayLight;
161
167
  }
@@ -57,6 +57,24 @@ $headingsFontFamily: inherit !default; // empty to use BS default, $baseFontF
57
57
  $headingsFontWeight: bold !default; // instead of browser default, bold
58
58
  $headingsColor: inherit !default; // empty to use BS default, $textColor
59
59
 
60
+
61
+ // Component sizing
62
+ // -------------------------
63
+ // Based on 14px font-size and 20px line-height
64
+
65
+ $fontSizeLarge: $baseFontSize * 1.25; // ~18px
66
+ $fontSizeSmall: $baseFontSize * 0.85; // ~12px
67
+ $fontSizeMini: $baseFontSize * 0.75; // ~11px
68
+
69
+ $paddingLarge: 11px 19px; // 44px
70
+ $paddingSmall: 2px 10px; // 26px
71
+ $paddingMini: 1px 6px; // 24px
72
+
73
+ $baseBorderRadius: 4px;
74
+ $borderRadiusLarge: 6px;
75
+ $borderRadiusSmall: 3px;
76
+
77
+
60
78
  // Tables
61
79
  // -------------------------
62
80
  $tableBackground: transparent !default; // overall background-color
@@ -93,9 +111,11 @@ $btnInverseBackgroundHighlight: $grayDarker !default;
93
111
  // -------------------------
94
112
  $inputBackground: $white !default;
95
113
  $inputBorder: #ccc !default;
96
- $inputBorderRadius: 3px !default;
114
+ $inputBorderRadius: $baseBorderRadius !default;
97
115
  $inputDisabledBackground: $grayLighter !default;
98
116
  $formActionsBackground: #f5f5f5 !default;
117
+ $inputHeight: $baseLineHeight + 10px; // base line-height + 8px vertical padding + 2px top/bottom border
118
+
99
119
 
100
120
  // Dropdowns
101
121
  // -------------------------
@@ -116,6 +136,7 @@ $dropdownLinkBackgroundHover: $dropdownLinkBackgroundActive !default;
116
136
  // COMPONENT VARIABLES
117
137
  // --------------------------------------------------
118
138
 
139
+
119
140
  // Z-index master list
120
141
  // -------------------------
121
142
  // Used for a bird's eye view of components dependent on the z-axis
@@ -157,6 +178,7 @@ $wellBackground: #f5f5f5 !default;
157
178
  // Navbar
158
179
  // -------------------------
159
180
  $navbarCollapseWidth: 979px !default;
181
+ $navbarCollapseDesktopWidth: $navbarCollapseWidth + 1;
160
182
 
161
183
  $navbarHeight: 40px !default;
162
184
  $navbarBackgroundHighlight: #ffffff !default;
@@ -168,7 +190,7 @@ $navbarLinkColor: #777 !default;
168
190
  $navbarLinkColorHover: $grayDark !default;
169
191
  $navbarLinkColorActive: $gray !default;
170
192
  $navbarLinkBackgroundHover: transparent !default;
171
- $navbarLinkBackgroundActive: darken($navbarBackground, 5.25%) !default;
193
+ $navbarLinkBackgroundActive: darken($navbarBackground, 5%) !default;
172
194
 
173
195
  $navbarBrandColor: $navbarLinkColor !default;
174
196
 
@@ -246,6 +268,7 @@ $popoverArrowOuterColor: rgba(0,0,0,.25) !default;
246
268
  // GRID
247
269
  // --------------------------------------------------
248
270
 
271
+
249
272
  // Default 940px grid
250
273
  // -------------------------
251
274
  $gridColumns: 12 !default;
@@ -10,7 +10,7 @@
10
10
  margin-bottom: 20px;
11
11
  background-color: $wellBackground;
12
12
  border: 1px solid darken($wellBackground, 7%);
13
- @include border-radius(4px);
13
+ @include border-radius($baseBorderRadius);
14
14
  @include box-shadow(inset 0 1px 1px rgba(0,0,0,.05));
15
15
  blockquote {
16
16
  border-color: #ddd;
@@ -21,9 +21,9 @@
21
21
  // Sizes
22
22
  .well-large {
23
23
  padding: 24px;
24
- @include border-radius(6px);
24
+ @include border-radius($borderRadiusLarge);
25
25
  }
26
26
  .well-small {
27
27
  padding: 9px;
28
- @include border-radius(3px);
28
+ @include border-radius($borderRadiusSmall);
29
29
  }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap v2.1.0
2
+ * Bootstrap v2.2.1
3
3
  *
4
4
  * Copyright 2012 Twitter, Inc
5
5
  * Licensed under the Apache License v2.0
@@ -52,6 +52,7 @@
52
52
 
53
53
  // Components: Misc
54
54
  @import "thumbnails";
55
+ @import "media";
55
56
  @import "labels-badges";
56
57
  @import "progress-bars";
57
58
  @import "accordion";