sass-twitter-bootstrap 2.0.1 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. data/lib/sass/twitter/bootstrap/version.rb +1 -1
  2. data/vendor/assets/images/glyphicons-halflings-white.png +0 -0
  3. data/vendor/assets/images/glyphicons-halflings.png +0 -0
  4. data/vendor/assets/javascripts/twitter/bootstrap-affix.js +104 -0
  5. data/vendor/assets/javascripts/twitter/bootstrap-alert.js +28 -32
  6. data/vendor/assets/javascripts/twitter/bootstrap-button.js +29 -33
  7. data/vendor/assets/javascripts/twitter/bootstrap-carousel.js +43 -24
  8. data/vendor/assets/javascripts/twitter/bootstrap-collapse.js +50 -28
  9. data/vendor/assets/javascripts/twitter/bootstrap-dropdown.js +77 -19
  10. data/vendor/assets/javascripts/twitter/bootstrap-modal.js +113 -84
  11. data/vendor/assets/javascripts/twitter/bootstrap-popover.js +19 -11
  12. data/vendor/assets/javascripts/twitter/bootstrap-scrollspy.js +50 -24
  13. data/vendor/assets/javascripts/twitter/bootstrap-tab.js +13 -8
  14. data/vendor/assets/javascripts/twitter/bootstrap-tooltip.js +44 -39
  15. data/vendor/assets/javascripts/twitter/bootstrap-transition.js +29 -20
  16. data/vendor/assets/javascripts/twitter/bootstrap-typeahead.js +73 -44
  17. data/vendor/assets/javascripts/twitter/bootstrap.js +12 -0
  18. data/vendor/assets/stylesheets/tests/css-tests.css +1 -12
  19. data/vendor/assets/stylesheets/tests/css-tests.html +22 -125
  20. data/vendor/assets/stylesheets/tests/navbar.html +39 -38
  21. data/vendor/assets/stylesheets/twitter/_accordion.scss +8 -2
  22. data/vendor/assets/stylesheets/twitter/_alerts.scss +16 -21
  23. data/vendor/assets/stylesheets/twitter/_breadcrumbs.scss +12 -10
  24. data/vendor/assets/stylesheets/twitter/_button-groups.scss +137 -39
  25. data/vendor/assets/stylesheets/twitter/_buttons.scss +129 -81
  26. data/vendor/assets/stylesheets/twitter/_carousel.scss +13 -3
  27. data/vendor/assets/stylesheets/twitter/_close.scss +16 -3
  28. data/vendor/assets/stylesheets/twitter/_code.scss +11 -10
  29. data/vendor/assets/stylesheets/twitter/_component-animations.scss +12 -8
  30. data/vendor/assets/stylesheets/twitter/_dropdowns.scss +133 -53
  31. data/vendor/assets/stylesheets/twitter/_forms.scss +298 -170
  32. data/vendor/assets/stylesheets/twitter/_grid.scss +17 -4
  33. data/vendor/assets/stylesheets/twitter/_hero-unit.scss +7 -3
  34. data/vendor/assets/stylesheets/twitter/_labels-badges.scss +69 -0
  35. data/vendor/assets/stylesheets/twitter/_layouts.scss +2 -3
  36. data/vendor/assets/stylesheets/twitter/_mixins.scss +359 -258
  37. data/vendor/assets/stylesheets/twitter/_modals.scss +26 -12
  38. data/vendor/assets/stylesheets/twitter/_navbar.scss +318 -143
  39. data/vendor/assets/stylesheets/twitter/_navs.scss +87 -56
  40. data/vendor/assets/stylesheets/twitter/_pager.scss +16 -6
  41. data/vendor/assets/stylesheets/twitter/_pagination.scss +23 -14
  42. data/vendor/assets/stylesheets/twitter/_popovers.scss +101 -33
  43. data/vendor/assets/stylesheets/twitter/_progress-bars.scss +43 -16
  44. data/vendor/assets/stylesheets/twitter/_reset.scss +16 -6
  45. data/vendor/assets/stylesheets/twitter/_responsive-1200px-min.scss +28 -0
  46. data/vendor/assets/stylesheets/twitter/_responsive-767px-max.scss +174 -0
  47. data/vendor/assets/stylesheets/twitter/_responsive-768px-979px.scss +19 -0
  48. data/vendor/assets/stylesheets/twitter/_responsive-navbar.scss +177 -0
  49. data/vendor/assets/stylesheets/twitter/_responsive-utilities.scss +58 -0
  50. data/vendor/assets/stylesheets/twitter/_scaffolding.scss +32 -11
  51. data/vendor/assets/stylesheets/twitter/_sprites.scss +49 -14
  52. data/vendor/assets/stylesheets/twitter/_tables.scss +115 -42
  53. data/vendor/assets/stylesheets/twitter/_thumbnails.scss +23 -6
  54. data/vendor/assets/stylesheets/twitter/_tooltip.scss +47 -12
  55. data/vendor/assets/stylesheets/twitter/_type.scss +96 -93
  56. data/vendor/assets/stylesheets/twitter/_utilities.scss +24 -2
  57. data/vendor/assets/stylesheets/twitter/_variables.scss +202 -31
  58. data/vendor/assets/stylesheets/twitter/_wells.scss +17 -5
  59. data/vendor/assets/stylesheets/twitter/bootstrap.scss +3 -7
  60. data/vendor/assets/stylesheets/twitter/responsive.scss +15 -301
  61. metadata +10 -7
  62. data/vendor/assets/stylesheets/tests/buttons.html +0 -139
  63. data/vendor/assets/stylesheets/tests/forms-responsive.html +0 -71
  64. data/vendor/assets/stylesheets/tests/navbar-fixed-top.html +0 -104
  65. data/vendor/assets/stylesheets/tests/navbar-static-top.html +0 -107
  66. data/vendor/assets/stylesheets/twitter/_labels.scss +0 -32
@@ -0,0 +1,58 @@
1
+ //
2
+ // Responsive: Utility classes
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Clearing floats
7
+ .clearfix {
8
+ @include clearfix();
9
+ }
10
+
11
+ // Accessible yet invisible text
12
+ .hide-text {
13
+ @include hide-text();
14
+ }
15
+
16
+ // Uses box-sizing mixin, so must be defined here
17
+ .input-block-level {
18
+ @include input-block-level();
19
+ }
20
+
21
+ // Hide from screenreaders and browsers
22
+ // Credit: HTML5 Boilerplate
23
+ .hidden {
24
+ display: none;
25
+ visibility: hidden;
26
+ }
27
+
28
+ // Visibility utilities
29
+
30
+ // For desktops
31
+ .visible-phone { display: none !important; }
32
+ .visible-tablet { display: none !important; }
33
+ .hidden-phone { }
34
+ .hidden-tablet { }
35
+ .hidden-desktop { display: none !important; }
36
+ .visible-desktop { display: inherit !important; }
37
+
38
+ // Tablets & small desktops only
39
+ @media (min-width: 768px) and (max-width: 979px) {
40
+ // Hide everything else
41
+ .hidden-desktop { display: inherit !important; }
42
+ .visible-desktop { display: none !important ; }
43
+ // Show
44
+ .visible-tablet { display: inherit !important; }
45
+ // Hide
46
+ .hidden-tablet { display: none !important; }
47
+ }
48
+
49
+ // Phones only
50
+ @media (max-width: 767px) {
51
+ // Hide everything else
52
+ .hidden-desktop { display: inherit !important; }
53
+ .visible-desktop { display: none !important; }
54
+ // Show
55
+ .visible-phone { display: inherit !important; } // Use inherit to restore previous behavior
56
+ // Hide
57
+ .hidden-phone { display: none !important; }
58
+ }
@@ -1,14 +1,10 @@
1
+ //
1
2
  // Scaffolding
2
- // Basic and global styles for generating a grid system, structural layout, and page templates
3
- // -------------------------------------------------------------------------------------------
3
+ // --------------------------------------------------
4
4
 
5
5
 
6
- // STRUCTURAL LAYOUT
7
- // -----------------
8
-
9
- .clearfix {
10
- @include clearfix();
11
- }
6
+ // Body reset
7
+ // -------------------------
12
8
 
13
9
  body {
14
10
  margin: 0;
@@ -16,12 +12,12 @@ body {
16
12
  font-size: $baseFontSize;
17
13
  line-height: $baseLineHeight;
18
14
  color: $textColor;
19
- background-color: $white;
15
+ background-color: $bodyBackground;
20
16
  }
21
17
 
22
18
 
23
- // LINKS
24
- // -----
19
+ // Links
20
+ // -------------------------
25
21
 
26
22
  a {
27
23
  color: $linkColor;
@@ -31,3 +27,28 @@ a:hover {
31
27
  color: $linkColorHover;
32
28
  text-decoration: underline;
33
29
  }
30
+
31
+
32
+ // Images
33
+ // -------------------------
34
+
35
+ // Rounded corners
36
+ .img-rounded {
37
+ @include border-radius(6px);
38
+ }
39
+
40
+ // Add polaroid-esque trim
41
+ .img-polaroid {
42
+ padding: 4px;
43
+ background-color: #fff;
44
+ border: 1px solid #ccc;
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);
49
+ }
50
+
51
+ // Perfect circle
52
+ .img-circle {
53
+ @include border-radius(500px); // crank the border-radius so it works with most reasonably sized images
54
+ }
@@ -1,17 +1,17 @@
1
- // SPRITES
2
- // Glyphs and icons for buttons, nav, and more
3
- // -------------------------------------------
1
+ //
2
+ // Sprites
3
+ // --------------------------------------------------
4
4
 
5
5
 
6
6
  // ICONS
7
7
  // -----
8
8
 
9
- // All icons receive the styles of the <i> tag with a base class
10
- // of .i and are then given a unique class to add width, height,
9
+ // All icons receive the styles of the <i> tag with a base class
10
+ // of .i and are then given a unique class to add width, height,
11
11
  // and background-position. Your resulting HTML will look like
12
12
  // <i class="icon-inbox"></i>.
13
13
 
14
- // For the white version of the icons, just add the .icon-white class:
14
+ // For the white version of the icons, just add the .icon-white class:
15
15
  // <i class="icon-inbox icon-white"></i>
16
16
 
17
17
  [class^="icon-"],
@@ -19,15 +19,29 @@
19
19
  display: inline-block;
20
20
  width: 14px;
21
21
  height: 14px;
22
+ @include ie7-restore-right-whitespace();
22
23
  line-height: 14px;
23
24
  vertical-align: text-top;
24
25
  background-image: url($iconSpritePath);
25
26
  background-position: 14px 14px;
26
27
  background-repeat: no-repeat;
27
-
28
- @include ie7-restore-right-whitespace();
28
+ margin-top: 1px;
29
29
  }
30
- .icon-white {
30
+
31
+ /* White icons with optional class, or on hover/active states of certain elements */
32
+ .icon-white,
33
+ .nav-tabs > .active > a > [class^="icon-"],
34
+ .nav-tabs > .active > a > [class*=" icon-"],
35
+ .nav-pills > .active > a > [class^="icon-"],
36
+ .nav-pills > .active > a > [class*=" icon-"],
37
+ .nav-list > .active > a > [class^="icon-"],
38
+ .nav-list > .active > a > [class*=" icon-"],
39
+ .navbar-inverse .nav > .active > a > [class^="icon-"],
40
+ .navbar-inverse .nav > .active > a > [class*=" icon-"],
41
+ .dropdown-menu > li > a:hover > [class^="icon-"],
42
+ .dropdown-menu > li > a:hover > [class*=" icon-"],
43
+ .dropdown-menu > .active > a > [class^="icon-"],
44
+ .dropdown-menu > .active > a > [class*=" icon-"] {
31
45
  background-image: url($iconWhiteSpritePath);
32
46
  }
33
47
 
@@ -145,14 +159,35 @@
145
159
  .icon-warning-sign { background-position: -144px -120px; }
146
160
  .icon-plane { background-position: -168px -120px; }
147
161
  .icon-calendar { background-position: -192px -120px; }
148
- .icon-random { background-position: -216px -120px; }
162
+ .icon-random { background-position: -216px -120px; width: 16px; }
149
163
  .icon-comment { background-position: -240px -120px; }
150
164
  .icon-magnet { background-position: -264px -120px; }
151
165
  .icon-chevron-up { background-position: -288px -120px; }
152
- .icon-chevron-down { background-position: -313px -119px; } // 1px off
166
+ .icon-chevron-down { background-position: -313px -119px; } // 1px, 1px off
153
167
  .icon-retweet { background-position: -336px -120px; }
154
168
  .icon-shopping-cart { background-position: -360px -120px; }
155
169
  .icon-folder-close { background-position: -384px -120px; }
156
- .icon-folder-open { background-position: -408px -120px; }
157
- .icon-resize-vertical { background-position: -432px -119px; }
158
- .icon-resize-horizontal { background-position: -456px -118px; }
170
+ .icon-folder-open { background-position: -408px -120px; width: 16px; }
171
+ .icon-resize-vertical { background-position: -432px -119px; } // 1px, 1px off
172
+ .icon-resize-horizontal { background-position: -456px -118px; } // 1px, 2px off
173
+
174
+ .icon-hdd { background-position: 0 -144px; }
175
+ .icon-bullhorn { background-position: -24px -144px; }
176
+ .icon-bell { background-position: -48px -144px; }
177
+ .icon-certificate { background-position: -72px -144px; }
178
+ .icon-thumbs-up { background-position: -96px -144px; }
179
+ .icon-thumbs-down { background-position: -120px -144px; }
180
+ .icon-hand-right { background-position: -144px -144px; }
181
+ .icon-hand-left { background-position: -168px -144px; }
182
+ .icon-hand-up { background-position: -192px -144px; }
183
+ .icon-hand-down { background-position: -216px -144px; }
184
+ .icon-circle-arrow-right { background-position: -240px -144px; }
185
+ .icon-circle-arrow-left { background-position: -264px -144px; }
186
+ .icon-circle-arrow-up { background-position: -288px -144px; }
187
+ .icon-circle-arrow-down { background-position: -312px -144px; }
188
+ .icon-globe { background-position: -336px -144px; }
189
+ .icon-wrench { background-position: -360px -144px; }
190
+ .icon-tasks { background-position: -384px -144px; }
191
+ .icon-filter { background-position: -408px -144px; }
192
+ .icon-briefcase { background-position: -432px -144px; }
193
+ .icon-fullscreen { background-position: -456px -144px; }
@@ -1,7 +1,6 @@
1
1
  //
2
- // Tables.scss
3
- // Tables for, you guessed it, tabular data
4
- // ----------------------------------------
2
+ // Tables
3
+ // --------------------------------------------------
5
4
 
6
5
 
7
6
  // BASE TABLES
@@ -9,6 +8,7 @@
9
8
 
10
9
  table {
11
10
  max-width: 100%;
11
+ background-color: $tableBackground;
12
12
  border-collapse: collapse;
13
13
  border-spacing: 0;
14
14
  }
@@ -26,7 +26,7 @@ table {
26
26
  line-height: $baseLineHeight;
27
27
  text-align: left;
28
28
  vertical-align: top;
29
- border-top: 1px solid #ddd;
29
+ border-top: 1px solid $tableBorder;
30
30
  }
31
31
  th {
32
32
  font-weight: bold;
@@ -36,13 +36,17 @@ table {
36
36
  vertical-align: bottom;
37
37
  }
38
38
  // Remove top border from thead by default
39
- thead:first-child tr th,
40
- thead:first-child tr td {
39
+ caption + thead tr:first-child th,
40
+ caption + thead tr:first-child td,
41
+ colgroup + thead tr:first-child th,
42
+ colgroup + thead tr:first-child td,
43
+ thead:first-child tr:first-child th,
44
+ thead:first-child tr:first-child td {
41
45
  border-top: 0;
42
46
  }
43
47
  // Account for multiple tbody instances
44
48
  tbody + tbody {
45
- border-top: 2px solid #ddd;
49
+ border-top: 2px solid $tableBorder;
46
50
  }
47
51
  }
48
52
 
@@ -63,17 +67,22 @@ table {
63
67
  // ----------------
64
68
 
65
69
  .table-bordered {
66
- border: 1px solid #ddd;
70
+ border: 1px solid $tableBorder;
67
71
  border-collapse: separate; // Done so we can round those corners!
68
- *border-collapse: collapsed; // IE7 can't round corners anyway
72
+ *border-collapse: collapse; // IE7 can't round corners anyway
73
+ border-left: 0;
69
74
  @include border-radius(4px);
70
- th + th,
71
- td + td,
72
- th + td,
73
- td + th {
74
- border-left: 1px solid #ddd;
75
+ th,
76
+ td {
77
+ border-left: 1px solid $tableBorder;
75
78
  }
76
79
  // Prevent a double border
80
+ caption + thead tr:first-child th,
81
+ caption + tbody tr:first-child th,
82
+ caption + tbody tr:first-child td,
83
+ colgroup + thead tr:first-child th,
84
+ colgroup + tbody tr:first-child th,
85
+ colgroup + tbody tr:first-child td,
77
86
  thead:first-child tr:first-child th,
78
87
  tbody:first-child tr:first-child th,
79
88
  tbody:first-child tr:first-child td {
@@ -82,21 +91,51 @@ table {
82
91
  // For first th or td in the first row in the first thead or tbody
83
92
  thead:first-child tr:first-child th:first-child,
84
93
  tbody:first-child tr:first-child td:first-child {
85
- @include border-radius(4px 0 0 0);
94
+ -webkit-border-top-left-radius: 4px;
95
+ border-top-left-radius: 4px;
96
+ -moz-border-radius-topleft: 4px;
86
97
  }
87
98
  thead:first-child tr:first-child th:last-child,
88
99
  tbody:first-child tr:first-child td:last-child {
89
- @include border-radius(0 4px 0 0);
100
+ -webkit-border-top-right-radius: 4px;
101
+ border-top-right-radius: 4px;
102
+ -moz-border-radius-topright: 4px;
90
103
  }
91
104
  // For first th or td in the first row in the first thead or tbody
92
105
  thead:last-child tr:last-child th:first-child,
93
- tbody:last-child tr:last-child td:first-child {
106
+ tbody:last-child tr:last-child td:first-child,
107
+ tfoot:last-child tr:last-child td:first-child {
94
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;
95
112
  }
96
113
  thead:last-child tr:last-child th:last-child,
97
- tbody:last-child tr:last-child td:last-child {
98
- @include border-radius(0 0 4px 0);
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;
119
+ }
120
+
121
+ // Special fixes to round the left border on the first td/th
122
+ caption + thead tr:first-child th:first-child,
123
+ caption + tbody tr:first-child td:first-child,
124
+ colgroup + thead tr:first-child th:first-child,
125
+ 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;
129
+ }
130
+ caption + thead tr:first-child th:last-child,
131
+ caption + tbody tr:first-child td:last-child,
132
+ colgroup + thead tr:first-child th:last-child,
133
+ 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-topleft: 4px;
99
137
  }
138
+
100
139
  }
101
140
 
102
141
 
@@ -108,7 +147,7 @@ table {
108
147
  tbody {
109
148
  tr:nth-child(odd) td,
110
149
  tr:nth-child(odd) th {
111
- background-color: #f9f9f9;
150
+ background-color: $tableBackgroundAccent;
112
151
  }
113
152
  }
114
153
  }
@@ -117,10 +156,12 @@ table {
117
156
  // HOVER EFFECT
118
157
  // ------------
119
158
  // Placed here since it has to come after the potential zebra striping
120
- .table {
121
- tbody tr:hover td,
122
- tbody tr:hover th {
123
- background-color: #f5f5f5;
159
+ .table-hover {
160
+ tbody {
161
+ tr:hover td,
162
+ tr:hover th {
163
+ background-color: $tableBackgroundHover;
164
+ }
124
165
  }
125
166
  }
126
167
 
@@ -128,23 +169,55 @@ table {
128
169
  // TABLE CELL SIZING
129
170
  // -----------------
130
171
 
131
- // Change the columns
132
- @mixin tableColumns($columnSpan: 1) {
133
- float: none;
134
- width: (($gridColumnWidth) * $columnSpan) + ($gridGutterWidth * ($columnSpan - 1)) - 16;
135
- margin-left: 0;
172
+ // Reset default grid behavior
173
+ table [class*=span],
174
+ .row-fluid table [class*=span] {
175
+ display: table-cell;
176
+ float: none; // undo default grid column styles
177
+ margin-left: 0; // undo default grid column styles
136
178
  }
137
- table {
138
- .span1 { @include tableColumns(1); }
139
- .span2 { @include tableColumns(2); }
140
- .span3 { @include tableColumns(3); }
141
- .span4 { @include tableColumns(4); }
142
- .span5 { @include tableColumns(5); }
143
- .span6 { @include tableColumns(6); }
144
- .span7 { @include tableColumns(7); }
145
- .span8 { @include tableColumns(8); }
146
- .span9 { @include tableColumns(9); }
147
- .span10 { @include tableColumns(10); }
148
- .span11 { @include tableColumns(11); }
149
- .span12 { @include tableColumns(12); }
179
+
180
+ // 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); }
184
+ }
185
+ }
186
+
187
+
188
+
189
+ // TABLE BACKGROUNDS
190
+ // -----------------
191
+ // Exact selectors below required to override .table-striped
192
+
193
+ .table tbody tr {
194
+ &.success td {
195
+ background-color: $successBackground;
196
+ }
197
+ &.error td {
198
+ background-color: $errorBackground;
199
+ }
200
+ &.warning td {
201
+ background-color: $warningBackground;
202
+ }
203
+ &.info td {
204
+ background-color: $infoBackground;
205
+ }
150
206
  }
207
+
208
+
209
+ // Hover states for .table-hover
210
+ .table-hover tbody tr {
211
+ &.success:hover td {
212
+ background-color: darken($successBackground, 5%);
213
+ }
214
+ &.error:hover td {
215
+ background-color: darken($errorBackground, 5%);
216
+ }
217
+ &.warning:hover td {
218
+ background-color: darken($warningBackground, 5%);
219
+ }
220
+ &.info:hover td {
221
+ background-color: darken($infoBackground, 5%);
222
+ }
223
+ }