bootstrap-on-rails 0.0.2 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/README.md +16 -7
  4. data/app/assets/fonts/bootstrap/glyphicons-halflings-regular.eot +0 -0
  5. data/app/assets/fonts/bootstrap/glyphicons-halflings-regular.svg +47 -47
  6. data/app/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf +0 -0
  7. data/app/assets/fonts/bootstrap/glyphicons-halflings-regular.woff +0 -0
  8. data/app/assets/javascripts/bootstrap/affix.js +48 -32
  9. data/app/assets/javascripts/bootstrap/alert.js +14 -20
  10. data/app/assets/javascripts/bootstrap/button.js +34 -33
  11. data/app/assets/javascripts/bootstrap/carousel.js +60 -54
  12. data/app/assets/javascripts/bootstrap/collapse.js +27 -36
  13. data/app/assets/javascripts/bootstrap/dropdown.js +36 -39
  14. data/app/assets/javascripts/bootstrap/modal.js +90 -56
  15. data/app/assets/javascripts/bootstrap/popover.js +21 -25
  16. data/app/assets/javascripts/bootstrap/scrollspy.js +56 -44
  17. data/app/assets/javascripts/bootstrap/tab.js +17 -24
  18. data/app/assets/javascripts/bootstrap/tooltip.js +158 -87
  19. data/app/assets/javascripts/bootstrap/transition.js +24 -21
  20. data/app/assets/stylesheets/bootstrap/alerts.less +4 -3
  21. data/app/assets/stylesheets/bootstrap/badges.less +27 -23
  22. data/app/assets/stylesheets/bootstrap/bootstrap.less +3 -2
  23. data/app/assets/stylesheets/bootstrap/breadcrumbs.less +4 -1
  24. data/app/assets/stylesheets/bootstrap/button-groups.less +36 -49
  25. data/app/assets/stylesheets/bootstrap/buttons.less +16 -17
  26. data/app/assets/stylesheets/bootstrap/carousel.less +18 -6
  27. data/app/assets/stylesheets/bootstrap/close.less +0 -0
  28. data/app/assets/stylesheets/bootstrap/code.less +16 -1
  29. data/app/assets/stylesheets/bootstrap/component-animations.less +6 -4
  30. data/app/assets/stylesheets/bootstrap/dropdowns.less +33 -10
  31. data/app/assets/stylesheets/bootstrap/forms.less +236 -60
  32. data/app/assets/stylesheets/bootstrap/glyphicons.less +5 -9
  33. data/app/assets/stylesheets/bootstrap/grid.less +40 -49
  34. data/app/assets/stylesheets/bootstrap/input-groups.less +51 -21
  35. data/app/assets/stylesheets/bootstrap/jumbotron.less +15 -7
  36. data/app/assets/stylesheets/bootstrap/labels.less +7 -1
  37. data/app/assets/stylesheets/bootstrap/list-group.less +47 -4
  38. data/app/assets/stylesheets/bootstrap/media.less +0 -0
  39. data/app/assets/stylesheets/bootstrap/mixins.less +35 -854
  40. data/app/assets/stylesheets/bootstrap/mixins/alerts.less +14 -0
  41. data/app/assets/stylesheets/bootstrap/mixins/background-variant.less +8 -0
  42. data/app/assets/stylesheets/bootstrap/mixins/border-radius.less +18 -0
  43. data/app/assets/stylesheets/bootstrap/mixins/buttons.less +50 -0
  44. data/app/assets/stylesheets/bootstrap/mixins/center-block.less +7 -0
  45. data/app/assets/stylesheets/bootstrap/mixins/clearfix.less +22 -0
  46. data/app/assets/stylesheets/bootstrap/mixins/forms.less +81 -0
  47. data/app/assets/stylesheets/bootstrap/mixins/gradients.less +59 -0
  48. data/app/assets/stylesheets/bootstrap/mixins/grid-framework.less +91 -0
  49. data/app/assets/stylesheets/bootstrap/mixins/grid.less +122 -0
  50. data/app/assets/stylesheets/bootstrap/mixins/hide-text.less +21 -0
  51. data/app/assets/stylesheets/bootstrap/mixins/image.less +34 -0
  52. data/app/assets/stylesheets/bootstrap/mixins/labels.less +12 -0
  53. data/app/assets/stylesheets/bootstrap/mixins/list-group.less +29 -0
  54. data/app/assets/stylesheets/bootstrap/mixins/nav-divider.less +10 -0
  55. data/app/assets/stylesheets/bootstrap/mixins/nav-vertical-align.less +9 -0
  56. data/app/assets/stylesheets/bootstrap/mixins/opacity.less +8 -0
  57. data/app/assets/stylesheets/bootstrap/mixins/pagination.less +23 -0
  58. data/app/assets/stylesheets/bootstrap/mixins/panels.less +24 -0
  59. data/app/assets/stylesheets/bootstrap/mixins/progress-bar.less +10 -0
  60. data/app/assets/stylesheets/bootstrap/mixins/reset-filter.less +8 -0
  61. data/app/assets/stylesheets/bootstrap/mixins/resize.less +6 -0
  62. data/app/assets/stylesheets/bootstrap/mixins/responsive-visibility.less +15 -0
  63. data/app/assets/stylesheets/bootstrap/mixins/size.less +10 -0
  64. data/app/assets/stylesheets/bootstrap/mixins/tab-focus.less +9 -0
  65. data/app/assets/stylesheets/bootstrap/mixins/table-row.less +28 -0
  66. data/app/assets/stylesheets/bootstrap/mixins/text-emphasis.less +8 -0
  67. data/app/assets/stylesheets/bootstrap/mixins/text-overflow.less +8 -0
  68. data/app/assets/stylesheets/bootstrap/mixins/vendor-prefixes.less +224 -0
  69. data/app/assets/stylesheets/bootstrap/modals.less +38 -20
  70. data/app/assets/stylesheets/bootstrap/navbar.less +103 -72
  71. data/app/assets/stylesheets/bootstrap/navs.less +3 -23
  72. data/app/assets/stylesheets/bootstrap/normalize.less +153 -134
  73. data/app/assets/stylesheets/bootstrap/pager.less +5 -5
  74. data/app/assets/stylesheets/bootstrap/pagination.less +6 -3
  75. data/app/assets/stylesheets/bootstrap/panels.less +117 -46
  76. data/app/assets/stylesheets/bootstrap/popovers.less +12 -12
  77. data/app/assets/stylesheets/bootstrap/print.less +0 -4
  78. data/app/assets/stylesheets/bootstrap/progress-bars.less +27 -14
  79. data/app/assets/stylesheets/bootstrap/responsive-embed.less +34 -0
  80. data/app/assets/stylesheets/bootstrap/responsive-utilities.less +109 -124
  81. data/app/assets/stylesheets/bootstrap/scaffolding.less +34 -3
  82. data/app/assets/stylesheets/bootstrap/tables.less +23 -26
  83. data/app/assets/stylesheets/bootstrap/theme.less +12 -1
  84. data/app/assets/stylesheets/bootstrap/thumbnails.less +10 -4
  85. data/app/assets/stylesheets/bootstrap/tooltip.less +1 -1
  86. data/app/assets/stylesheets/bootstrap/type.less +151 -117
  87. data/app/assets/stylesheets/bootstrap/utilities.less +1 -0
  88. data/app/assets/stylesheets/bootstrap/variables.less +399 -190
  89. data/app/assets/stylesheets/bootstrap/wells.less +1 -1
  90. data/bootstrap-on-rails.gemspec +1 -1
  91. data/lib/bootstrap-on-rails/version.rb +1 -1
  92. metadata +33 -3
@@ -0,0 +1,34 @@
1
+ // Embeds responsive
2
+ //
3
+ // Credit: Nicolas Gallagher and SUIT CSS.
4
+
5
+ .embed-responsive {
6
+ position: relative;
7
+ display: block;
8
+ height: 0;
9
+ padding: 0;
10
+ overflow: hidden;
11
+
12
+ .embed-responsive-item,
13
+ iframe,
14
+ embed,
15
+ object {
16
+ position: absolute;
17
+ top: 0;
18
+ left: 0;
19
+ bottom: 0;
20
+ height: 100%;
21
+ width: 100%;
22
+ border: 0;
23
+ }
24
+
25
+ // Modifier class for 16:9 aspect ratio
26
+ &.embed-responsive-16by9 {
27
+ padding-bottom: 56.25%;
28
+ }
29
+
30
+ // Modifier class for 4:3 aspect ratio
31
+ &.embed-responsive-4by3 {
32
+ padding-bottom: 75%;
33
+ }
34
+ }
@@ -14,7 +14,8 @@
14
14
  // For more information, see the following:
15
15
  //
16
16
  // Issue: https://github.com/twbs/bootstrap/issues/10497
17
- // Docs: http://getbootstrap.com/getting-started/#browsers
17
+ // Docs: http://getbootstrap.com/getting-started/#support-ie10-width
18
+ // Source: http://timkadlec.com/2013/01/windows-phone-8-and-device-width/
18
19
  // Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/
19
20
 
20
21
  @-ms-viewport {
@@ -23,187 +24,171 @@
23
24
 
24
25
 
25
26
  // Visibility utilities
27
+ // Note: Deprecated .visible-xs, .visible-sm, .visible-md, and .visible-lg as of v3.2.0
28
+ .visible-xs,
29
+ .visible-sm,
30
+ .visible-md,
31
+ .visible-lg {
32
+ .responsive-invisibility();
33
+ }
34
+
35
+ .visible-xs-block,
36
+ .visible-xs-inline,
37
+ .visible-xs-inline-block,
38
+ .visible-sm-block,
39
+ .visible-sm-inline,
40
+ .visible-sm-inline-block,
41
+ .visible-md-block,
42
+ .visible-md-inline,
43
+ .visible-md-inline-block,
44
+ .visible-lg-block,
45
+ .visible-lg-inline,
46
+ .visible-lg-inline-block {
47
+ display: none !important;
48
+ }
26
49
 
27
50
  .visible-xs {
28
- .responsive-invisibility();
29
51
  @media (max-width: @screen-xs-max) {
30
52
  .responsive-visibility();
31
53
  }
32
- &.visible-sm {
33
- @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
34
- .responsive-visibility();
35
- }
54
+ }
55
+ .visible-xs-block {
56
+ @media (max-width: @screen-xs-max) {
57
+ display: block !important;
36
58
  }
37
- &.visible-md {
38
- @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
39
- .responsive-visibility();
40
- }
59
+ }
60
+ .visible-xs-inline {
61
+ @media (max-width: @screen-xs-max) {
62
+ display: inline !important;
41
63
  }
42
- &.visible-lg {
43
- @media (min-width: @screen-lg-min) {
44
- .responsive-visibility();
45
- }
64
+ }
65
+ .visible-xs-inline-block {
66
+ @media (max-width: @screen-xs-max) {
67
+ display: inline-block !important;
46
68
  }
47
69
  }
70
+
48
71
  .visible-sm {
49
- .responsive-invisibility();
50
- &.visible-xs {
51
- @media (max-width: @screen-xs-max) {
52
- .responsive-visibility();
53
- }
54
- }
55
72
  @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
56
73
  .responsive-visibility();
57
74
  }
58
- &.visible-md {
59
- @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
60
- .responsive-visibility();
61
- }
75
+ }
76
+ .visible-sm-block {
77
+ @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
78
+ display: block !important;
79
+ }
80
+ }
81
+ .visible-sm-inline {
82
+ @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
83
+ display: inline !important;
62
84
  }
63
- &.visible-lg {
64
- @media (min-width: @screen-lg-min) {
65
- .responsive-visibility();
66
- }
85
+ }
86
+ .visible-sm-inline-block {
87
+ @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
88
+ display: inline-block !important;
67
89
  }
68
90
  }
91
+
69
92
  .visible-md {
70
- .responsive-invisibility();
71
- &.visible-xs {
72
- @media (max-width: @screen-xs-max) {
73
- .responsive-visibility();
74
- }
93
+ @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
94
+ .responsive-visibility();
75
95
  }
76
- &.visible-sm {
77
- @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
78
- .responsive-visibility();
79
- }
96
+ }
97
+ .visible-md-block {
98
+ @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
99
+ display: block !important;
80
100
  }
101
+ }
102
+ .visible-md-inline {
81
103
  @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
82
- .responsive-visibility();
104
+ display: inline !important;
83
105
  }
84
- &.visible-lg {
85
- @media (min-width: @screen-lg-min) {
86
- .responsive-visibility();
87
- }
106
+ }
107
+ .visible-md-inline-block {
108
+ @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
109
+ display: inline-block !important;
88
110
  }
89
111
  }
112
+
90
113
  .visible-lg {
91
- .responsive-invisibility();
92
- &.visible-xs {
93
- @media (max-width: @screen-xs-max) {
94
- .responsive-visibility();
95
- }
114
+ @media (min-width: @screen-lg-min) {
115
+ .responsive-visibility();
96
116
  }
97
- &.visible-sm {
98
- @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
99
- .responsive-visibility();
100
- }
117
+ }
118
+ .visible-lg-block {
119
+ @media (min-width: @screen-lg-min) {
120
+ display: block !important;
101
121
  }
102
- &.visible-md {
103
- @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
104
- .responsive-visibility();
105
- }
122
+ }
123
+ .visible-lg-inline {
124
+ @media (min-width: @screen-lg-min) {
125
+ display: inline !important;
106
126
  }
127
+ }
128
+ .visible-lg-inline-block {
107
129
  @media (min-width: @screen-lg-min) {
108
- .responsive-visibility();
130
+ display: inline-block !important;
109
131
  }
110
132
  }
111
133
 
112
134
  .hidden-xs {
113
- .responsive-visibility();
114
135
  @media (max-width: @screen-xs-max) {
115
136
  .responsive-invisibility();
116
137
  }
117
- &.hidden-sm {
118
- @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
119
- .responsive-invisibility();
120
- }
121
- }
122
- &.hidden-md {
123
- @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
124
- .responsive-invisibility();
125
- }
126
- }
127
- &.hidden-lg {
128
- @media (min-width: @screen-lg-min) {
129
- .responsive-invisibility();
130
- }
131
- }
132
138
  }
133
139
  .hidden-sm {
134
- .responsive-visibility();
135
- &.hidden-xs {
136
- @media (max-width: @screen-xs-max) {
137
- .responsive-invisibility();
138
- }
139
- }
140
140
  @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
141
141
  .responsive-invisibility();
142
142
  }
143
- &.hidden-md {
144
- @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
145
- .responsive-invisibility();
146
- }
147
- }
148
- &.hidden-lg {
149
- @media (min-width: @screen-lg-min) {
150
- .responsive-invisibility();
151
- }
152
- }
153
143
  }
154
144
  .hidden-md {
155
- .responsive-visibility();
156
- &.hidden-xs {
157
- @media (max-width: @screen-xs-max) {
158
- .responsive-invisibility();
159
- }
160
- }
161
- &.hidden-sm {
162
- @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
163
- .responsive-invisibility();
164
- }
165
- }
166
145
  @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
167
146
  .responsive-invisibility();
168
147
  }
169
- &.hidden-lg {
170
- @media (min-width: @screen-lg-min) {
171
- .responsive-invisibility();
172
- }
173
- }
174
148
  }
175
149
  .hidden-lg {
176
- .responsive-visibility();
177
- &.hidden-xs {
178
- @media (max-width: @screen-xs-max) {
179
- .responsive-invisibility();
180
- }
181
- }
182
- &.hidden-sm {
183
- @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
184
- .responsive-invisibility();
185
- }
186
- }
187
- &.hidden-md {
188
- @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
189
- .responsive-invisibility();
190
- }
191
- }
192
150
  @media (min-width: @screen-lg-min) {
193
151
  .responsive-invisibility();
194
152
  }
195
153
  }
196
154
 
155
+
197
156
  // Print utilities
157
+ //
158
+ // Media queries are placed on the inside to be mixin-friendly.
159
+
160
+ // Note: Deprecated .visible-print as of v3.2.0
198
161
  .visible-print {
199
162
  .responsive-invisibility();
200
- }
201
163
 
202
- @media print {
203
- .visible-print {
164
+ @media print {
204
165
  .responsive-visibility();
205
166
  }
206
- .hidden-print {
167
+ }
168
+ .visible-print-block {
169
+ display: none !important;
170
+
171
+ @media print {
172
+ display: block !important;
173
+ }
174
+ }
175
+ .visible-print-inline {
176
+ display: none !important;
177
+
178
+ @media print {
179
+ display: inline !important;
180
+ }
181
+ }
182
+ .visible-print-inline-block {
183
+ display: none !important;
184
+
185
+ @media print {
186
+ display: inline-block !important;
187
+ }
188
+ }
189
+
190
+ .hidden-print {
191
+ @media print {
207
192
  .responsive-invisibility();
208
193
  }
209
194
  }
@@ -4,8 +4,13 @@
4
4
 
5
5
 
6
6
  // Reset the box-sizing
7
-
8
- *,
7
+ //
8
+ // Heads up! This reset may cause conflicts with some third-party widgets.
9
+ // For recommendations on resolving such conflicts, see
10
+ // http://getbootstrap.com/getting-started/#third-box-sizing
11
+ * {
12
+ .box-sizing(border-box);
13
+ }
9
14
  *:before,
10
15
  *:after {
11
16
  .box-sizing(border-box);
@@ -15,7 +20,7 @@
15
20
  // Body reset
16
21
 
17
22
  html {
18
- font-size: 62.5%;
23
+ font-size: 10px;
19
24
  -webkit-tap-highlight-color: rgba(0,0,0,0);
20
25
  }
21
26
 
@@ -56,6 +61,16 @@ a {
56
61
  }
57
62
 
58
63
 
64
+ // Figures
65
+ //
66
+ // We reset this here because previously Normalize had no `figure` margins. This
67
+ // ensures we don't break anyone's use of the element.
68
+
69
+ figure {
70
+ margin: 0;
71
+ }
72
+
73
+
59
74
  // Images
60
75
 
61
76
  img {
@@ -117,3 +132,19 @@ hr {
117
132
  clip: rect(0,0,0,0);
118
133
  border: 0;
119
134
  }
135
+
136
+ // Use in conjunction with .sr-only to only display content when it's focused.
137
+ // Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1
138
+ // Credit: HTML5 Boilerplate
139
+
140
+ .sr-only-focusable {
141
+ &:active,
142
+ &:focus {
143
+ position: static;
144
+ width: auto;
145
+ height: auto;
146
+ margin: 0;
147
+ overflow: visible;
148
+ clip: auto;
149
+ }
150
+ }
@@ -4,7 +4,6 @@
4
4
 
5
5
 
6
6
  table {
7
- max-width: 100%;
8
7
  background-color: @table-bg;
9
8
  }
10
9
  th {
@@ -16,6 +15,7 @@ th {
16
15
 
17
16
  .table {
18
17
  width: 100%;
18
+ max-width: 100%;
19
19
  margin-bottom: @line-height-computed;
20
20
  // Cells
21
21
  > thead,
@@ -104,10 +104,12 @@ th {
104
104
  //
105
105
  // Default zebra-stripe styles (alternating gray and transparent backgrounds)
106
106
 
107
- .table-striped > tbody > tr:nth-child(odd) {
108
- > td,
109
- > th {
110
- background-color: @table-bg-accent;
107
+ .table-striped {
108
+ > tbody > tr:nth-child(odd) {
109
+ > td,
110
+ > th {
111
+ background-color: @table-bg-accent;
112
+ }
111
113
  }
112
114
  }
113
115
 
@@ -116,10 +118,12 @@ th {
116
118
  //
117
119
  // Placed here since it has to come after the potential zebra striping
118
120
 
119
- .table-hover > tbody > tr:hover {
120
- > td,
121
- > th {
122
- background-color: @table-bg-hover;
121
+ .table-hover {
122
+ > tbody > tr:hover {
123
+ > td,
124
+ > th {
125
+ background-color: @table-bg-hover;
126
+ }
123
127
  }
124
128
  }
125
129
 
@@ -129,6 +133,7 @@ th {
129
133
  // Reset default table behavior
130
134
 
131
135
  table col[class*="col-"] {
136
+ position: static; // Prevent border hiding in Firefox and IE9/10 (see https://github.com/twbs/bootstrap/issues/11623)
132
137
  float: none;
133
138
  display: table-column;
134
139
  }
@@ -136,6 +141,7 @@ table {
136
141
  td,
137
142
  th {
138
143
  &[class*="col-"] {
144
+ position: static; // Prevent border hiding in Firefox and IE9/10 (see https://github.com/twbs/bootstrap/issues/11623)
139
145
  float: none;
140
146
  display: table-cell;
141
147
  }
@@ -148,21 +154,12 @@ table {
148
154
  // Exact selectors below required to override `.table-striped` and prevent
149
155
  // inheritance to nested tables.
150
156
 
151
- .table > thead > tr,
152
- .table > tbody > tr,
153
- .table > tfoot > tr {
154
- > td.active,
155
- > th.active,
156
- &.active > td,
157
- &.active > th {
158
- background-color: @table-bg-active;
159
- }
160
- }
161
-
162
157
  // Generate the contextual variants
163
- .table-row-variant(success; @state-success-bg; @state-success-border);
164
- .table-row-variant(danger; @state-danger-bg; @state-danger-border);
165
- .table-row-variant(warning; @state-warning-bg; @state-warning-border);
158
+ .table-row-variant(active; @table-bg-active);
159
+ .table-row-variant(success; @state-success-bg);
160
+ .table-row-variant(info; @state-info-bg);
161
+ .table-row-variant(warning; @state-warning-bg);
162
+ .table-row-variant(danger; @state-danger-bg);
166
163
 
167
164
 
168
165
  // Responsive tables
@@ -171,12 +168,12 @@ table {
171
168
  // by enabling horizontal scrolling. Only applies <768px. Everything above that
172
169
  // will display normally.
173
170
 
174
- @media (max-width: @screen-xs-max) {
175
- .table-responsive {
171
+ .table-responsive {
172
+ @media screen and (max-width: @screen-xs-max) {
176
173
  width: 100%;
177
174
  margin-bottom: (@line-height-computed * 0.75);
178
175
  overflow-y: hidden;
179
- overflow-x: scroll;
176
+ overflow-x: auto;
180
177
  -ms-overflow-style: -ms-autohiding-scrollbar;
181
178
  border: 1px solid @table-border-color;
182
179
  -webkit-overflow-scrolling: touch;