less-rails-bootstrap 1.4.3 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. data/CHANGELOG.md +5 -0
  2. data/lib/less/rails/bootstrap/version.rb +1 -1
  3. data/test/cases/usage_css_spec.rb +2 -9
  4. data/test/cases/usage_js_spec.rb +5 -7
  5. data/vendor/assets/javascripts/twitter/bootstrap.js +12 -8
  6. data/vendor/assets/javascripts/twitter/bootstrap/alert.js +91 -0
  7. data/vendor/assets/javascripts/twitter/bootstrap/button.js +98 -0
  8. data/vendor/assets/javascripts/twitter/bootstrap/carousel.js +154 -0
  9. data/vendor/assets/javascripts/twitter/bootstrap/collapse.js +136 -0
  10. data/vendor/assets/javascripts/twitter/bootstrap/dropdown.js +58 -21
  11. data/vendor/assets/javascripts/twitter/bootstrap/modal.js +63 -114
  12. data/vendor/assets/javascripts/twitter/bootstrap/popover.js +39 -30
  13. data/vendor/assets/javascripts/twitter/bootstrap/scrollspy.js +62 -44
  14. data/vendor/assets/javascripts/twitter/bootstrap/tab.js +130 -0
  15. data/vendor/assets/javascripts/twitter/bootstrap/tooltip.js +270 -0
  16. data/vendor/assets/javascripts/twitter/bootstrap/transition.js +51 -0
  17. data/vendor/assets/javascripts/twitter/bootstrap/typeahead.js +271 -0
  18. data/vendor/frameworks/twitter/bootstrap/accordion.less +28 -0
  19. data/vendor/frameworks/twitter/bootstrap/alerts.less +70 -0
  20. data/vendor/frameworks/twitter/bootstrap/bootstrap.less +41 -5
  21. data/vendor/frameworks/twitter/bootstrap/breadcrumbs.less +22 -0
  22. data/vendor/frameworks/twitter/bootstrap/button-groups.less +147 -0
  23. data/vendor/frameworks/twitter/bootstrap/buttons.less +165 -0
  24. data/vendor/frameworks/twitter/bootstrap/carousel.less +121 -0
  25. data/vendor/frameworks/twitter/bootstrap/close.less +18 -0
  26. data/vendor/frameworks/twitter/bootstrap/code.less +44 -0
  27. data/vendor/frameworks/twitter/bootstrap/component-animations.less +18 -0
  28. data/vendor/frameworks/twitter/bootstrap/dropdowns.less +131 -0
  29. data/vendor/frameworks/twitter/bootstrap/forms.less +336 -300
  30. data/vendor/frameworks/twitter/bootstrap/grid.less +8 -0
  31. data/vendor/frameworks/twitter/bootstrap/hero-unit.less +20 -0
  32. data/vendor/frameworks/twitter/bootstrap/labels.less +16 -0
  33. data/vendor/frameworks/twitter/bootstrap/layouts.less +17 -0
  34. data/vendor/frameworks/twitter/bootstrap/mixins.less +391 -76
  35. data/vendor/frameworks/twitter/bootstrap/modals.less +72 -0
  36. data/vendor/frameworks/twitter/bootstrap/navbar.less +292 -0
  37. data/vendor/frameworks/twitter/bootstrap/navs.less +343 -0
  38. data/vendor/frameworks/twitter/bootstrap/pager.less +30 -0
  39. data/vendor/frameworks/twitter/bootstrap/pagination.less +55 -0
  40. data/vendor/frameworks/twitter/bootstrap/patterns.less +5 -1052
  41. data/vendor/frameworks/twitter/bootstrap/popovers.less +49 -0
  42. data/vendor/frameworks/twitter/bootstrap/print.less +18 -0
  43. data/vendor/frameworks/twitter/bootstrap/progress-bars.less +95 -0
  44. data/vendor/frameworks/twitter/bootstrap/reset.less +37 -52
  45. data/vendor/frameworks/twitter/bootstrap/responsive.less +323 -0
  46. data/vendor/frameworks/twitter/bootstrap/scaffolding.less +13 -121
  47. data/vendor/frameworks/twitter/bootstrap/sprites.less +156 -0
  48. data/vendor/frameworks/twitter/bootstrap/tables.less +75 -160
  49. data/vendor/frameworks/twitter/bootstrap/thumbnails.less +35 -0
  50. data/vendor/frameworks/twitter/bootstrap/tooltip.less +35 -0
  51. data/vendor/frameworks/twitter/bootstrap/type.less +100 -70
  52. data/vendor/frameworks/twitter/bootstrap/utilities.less +23 -0
  53. data/vendor/frameworks/twitter/bootstrap/variables.less +94 -55
  54. data/vendor/frameworks/twitter/bootstrap/wells.less +17 -0
  55. metadata +44 -11
  56. data/vendor/assets/javascripts/twitter/bootstrap/alerts.js +0 -113
  57. data/vendor/assets/javascripts/twitter/bootstrap/buttons.js +0 -62
  58. data/vendor/assets/javascripts/twitter/bootstrap/tabs.js +0 -80
  59. data/vendor/assets/javascripts/twitter/bootstrap/twipsy.js +0 -310
@@ -0,0 +1,35 @@
1
+ // THUMBNAILS
2
+ // ----------
3
+
4
+ .thumbnails {
5
+ margin-left: -20px;
6
+ list-style: none;
7
+ .clearfix();
8
+ }
9
+ .thumbnails > li {
10
+ float: left;
11
+ margin: 0 0 @baseLineHeight 20px;
12
+ }
13
+ .thumbnail {
14
+ display: block;
15
+ padding: 4px;
16
+ line-height: 1;
17
+ border: 1px solid #ddd;
18
+ .border-radius(4px);
19
+ .box-shadow(0 1px 1px rgba(0,0,0,.075));
20
+ }
21
+ // Add a hover state for linked versions only
22
+ a.thumbnail:hover {
23
+ border-color: @linkColor;
24
+ .box-shadow(0 1px 4px rgba(0,105,214,.25));
25
+ }
26
+ // Images and captions
27
+ .thumbnail > img {
28
+ display: block;
29
+ max-width: 100%;
30
+ margin-left: auto;
31
+ margin-right: auto;
32
+ }
33
+ .thumbnail .caption {
34
+ padding: 9px;
35
+ }
@@ -0,0 +1,35 @@
1
+ // TOOLTIP
2
+ // ------=
3
+
4
+ .tooltip {
5
+ position: absolute;
6
+ z-index: @zindexTooltip;
7
+ display: block;
8
+ visibility: visible;
9
+ padding: 5px;
10
+ font-size: 11px;
11
+ .opacity(0);
12
+ &.in { .opacity(80); }
13
+ &.top { margin-top: -2px; }
14
+ &.right { margin-left: 2px; }
15
+ &.bottom { margin-top: 2px; }
16
+ &.left { margin-left: -2px; }
17
+ &.top .tooltip-arrow { #popoverArrow > .top(); }
18
+ &.left .tooltip-arrow { #popoverArrow > .left(); }
19
+ &.bottom .tooltip-arrow { #popoverArrow > .bottom(); }
20
+ &.right .tooltip-arrow { #popoverArrow > .right(); }
21
+ }
22
+ .tooltip-inner {
23
+ max-width: 200px;
24
+ padding: 3px 8px;
25
+ color: @white;
26
+ text-align: center;
27
+ text-decoration: none;
28
+ background-color: @black;
29
+ .border-radius(4px);
30
+ }
31
+ .tooltip-arrow {
32
+ position: absolute;
33
+ width: 0;
34
+ height: 0;
35
+ }
@@ -1,77 +1,99 @@
1
- /* Typography.less
2
- * Headings, body text, lists, code, and more for a versatile and durable typography system
3
- * ---------------------------------------------------------------------------------------- */
1
+ // Typography.less
2
+ // Headings, body text, lists, code, and more for a versatile and durable typography system
3
+ // ----------------------------------------------------------------------------------------
4
4
 
5
5
 
6
6
  // BODY TEXT
7
7
  // ---------
8
8
 
9
9
  p {
10
- #font > .shorthand(normal,@basefont,@baseline);
11
- margin-bottom: @baseline / 2;
10
+ margin: 0 0 @baseLineHeight / 2;
11
+ font-family: @baseFontFamily;
12
+ font-size: @baseFontSize;
13
+ line-height: @baseLineHeight;
12
14
  small {
13
- font-size: @basefont - 2;
15
+ font-size: @baseFontSize - 2;
14
16
  color: @grayLight;
15
17
  }
16
18
  }
17
-
19
+ .lead {
20
+ margin-bottom: @baseLineHeight;
21
+ font-size: 20px;
22
+ font-weight: 200;
23
+ line-height: @baseLineHeight * 1.5;
24
+ }
18
25
 
19
26
  // HEADINGS
20
27
  // --------
21
28
 
22
29
  h1, h2, h3, h4, h5, h6 {
30
+ margin: 0;
23
31
  font-weight: bold;
24
32
  color: @grayDark;
33
+ text-rendering: optimizelegibility; // Fix the character spacing for headings
25
34
  small {
35
+ font-weight: normal;
26
36
  color: @grayLight;
27
37
  }
28
38
  }
29
39
  h1 {
30
- margin-bottom: @baseline;
31
40
  font-size: 30px;
32
- line-height: @baseline * 2;
41
+ line-height: @baseLineHeight * 2;
33
42
  small {
34
43
  font-size: 18px;
35
44
  }
36
45
  }
37
46
  h2 {
38
47
  font-size: 24px;
39
- line-height: @baseline * 2;
48
+ line-height: @baseLineHeight * 2;
40
49
  small {
41
- font-size: 14px;
50
+ font-size: 18px;
42
51
  }
43
52
  }
44
- h3, h4, h5, h6 {
45
- line-height: @baseline * 2;
46
- }
47
53
  h3 {
54
+ line-height: @baseLineHeight * 1.5;
48
55
  font-size: 18px;
49
56
  small {
50
57
  font-size: 14px;
51
58
  }
52
59
  }
60
+ h4, h5, h6 {
61
+ line-height: @baseLineHeight;
62
+ }
53
63
  h4 {
54
- font-size: 16px;
64
+ font-size: 14px;
55
65
  small {
56
66
  font-size: 12px;
57
67
  }
58
68
  }
59
69
  h5 {
60
- font-size: 14px;
70
+ font-size: 12px;
61
71
  }
62
72
  h6 {
63
- font-size: 13px;
73
+ font-size: 11px;
64
74
  color: @grayLight;
65
75
  text-transform: uppercase;
66
76
  }
67
77
 
78
+ // Page header
79
+ .page-header {
80
+ padding-bottom: @baseLineHeight - 1;
81
+ margin: @baseLineHeight 0;
82
+ border-bottom: 1px solid @grayLighter;
83
+ }
84
+ .page-header h1 {
85
+ line-height: 1;
86
+ }
87
+
88
+
68
89
 
69
- // COLORS
70
- // ------
90
+ // LISTS
91
+ // -----
71
92
 
72
93
  // Unordered and Ordered lists
73
94
  ul, ol {
74
- margin: 0 0 @baseline 25px;
95
+ padding: 0;
96
+ margin: 0 0 @baseLineHeight / 2 25px;
75
97
  }
76
98
  ul ul,
77
99
  ul ol,
@@ -86,26 +108,26 @@ ol {
86
108
  list-style: decimal;
87
109
  }
88
110
  li {
89
- line-height: @baseline;
90
- color: @gray;
111
+ line-height: @baseLineHeight;
91
112
  }
92
113
  ul.unstyled {
93
- list-style: none;
94
114
  margin-left: 0;
115
+ list-style: none;
95
116
  }
96
117
 
97
118
  // Description Lists
98
119
  dl {
99
- margin-bottom: @baseline;
100
- dt, dd {
101
- line-height: @baseline;
102
- }
103
- dt {
104
- font-weight: bold;
105
- }
106
- dd {
107
- margin-left: @baseline / 2;
108
- }
120
+ margin-bottom: @baseLineHeight;
121
+ }
122
+ dt,
123
+ dd {
124
+ line-height: @baseLineHeight;
125
+ }
126
+ dt {
127
+ font-weight: bold;
128
+ }
129
+ dd {
130
+ margin-left: @baseLineHeight / 2;
109
131
  }
110
132
 
111
133
  // MISC
@@ -113,75 +135,83 @@ dl {
113
135
 
114
136
  // Horizontal rules
115
137
  hr {
116
- margin: 20px 0 19px;
138
+ margin: @baseLineHeight 0;
117
139
  border: 0;
118
- border-bottom: 1px solid #eee;
140
+ border-top: 1px solid #e5e5e5;
141
+ border-bottom: 1px solid @white;
119
142
  }
120
143
 
121
144
  // Emphasis
122
145
  strong {
123
- font-style: inherit;
124
146
  font-weight: bold;
125
147
  }
126
148
  em {
127
149
  font-style: italic;
128
- font-weight: inherit;
129
- line-height: inherit;
130
150
  }
131
151
  .muted {
132
152
  color: @grayLight;
133
153
  }
134
154
 
155
+ // Abbreviations and acronyms
156
+ abbr {
157
+ font-size: 90%;
158
+ text-transform: uppercase;
159
+ border-bottom: 1px dotted #ddd;
160
+ cursor: help;
161
+ }
162
+
135
163
  // Blockquotes
136
164
  blockquote {
137
- margin-bottom: @baseline;
138
- border-left: 5px solid #eee;
139
- padding-left: 15px;
165
+ padding: 0 0 0 15px;
166
+ margin: 0 0 @baseLineHeight;
167
+ border-left: 5px solid @grayLighter;
140
168
  p {
141
- #font > .shorthand(300,14px,@baseline);
142
169
  margin-bottom: 0;
170
+ #font > .shorthand(16px,300,@baseLineHeight * 1.25);
143
171
  }
144
172
  small {
145
173
  display: block;
146
- #font > .shorthand(300,12px,@baseline);
174
+ line-height: @baseLineHeight;
147
175
  color: @grayLight;
148
176
  &:before {
149
177
  content: '\2014 \00A0';
150
178
  }
151
179
  }
180
+
181
+ // Float right with text-align: right
182
+ &.pull-right {
183
+ float: right;
184
+ padding-left: 0;
185
+ padding-right: 15px;
186
+ border-left: 0;
187
+ border-right: 5px solid @grayLighter;
188
+ p,
189
+ small {
190
+ text-align: right;
191
+ }
192
+ }
193
+ }
194
+
195
+ // Quotes
196
+ q:before,
197
+ q:after,
198
+ blockquote:before,
199
+ blockquote:after {
200
+ content: "";
152
201
  }
153
202
 
154
203
  // Addresses
155
204
  address {
156
205
  display: block;
157
- line-height: @baseline;
158
- margin-bottom: @baseline;
206
+ margin-bottom: @baseLineHeight;
207
+ line-height: @baseLineHeight;
208
+ font-style: normal;
159
209
  }
160
210
 
161
- // Inline and block code styles
162
- code, pre {
163
- padding: 0 3px 2px;
164
- font-family: Monaco, Andale Mono, Courier New, monospace;
165
- font-size: 12px;
166
- .border-radius(3px);
211
+ // Misc
212
+ small {
213
+ font-size: 100%;
167
214
  }
168
- code {
169
- background-color: lighten(@orange, 40%);
170
- color: rgba(0,0,0,.75);
171
- padding: 1px 3px;
215
+ cite {
216
+ font-style: normal;
172
217
  }
173
- pre {
174
- background-color: #f5f5f5;
175
- display: block;
176
- padding: (@baseline - 1) / 2;
177
- margin: 0 0 @baseline;
178
- line-height: @baseline;
179
- font-size: 12px;
180
- border: 1px solid #ccc;
181
- border: 1px solid rgba(0,0,0,.15);
182
- .border-radius(3px);
183
- white-space: pre;
184
- white-space: pre-wrap;
185
- word-wrap: break-word;
186
-
187
- }
@@ -0,0 +1,23 @@
1
+ // UTILITY CLASSES
2
+ // ---------------
3
+
4
+ // Quick floats
5
+ .pull-right {
6
+ float: right;
7
+ }
8
+ .pull-left {
9
+ float: left;
10
+ }
11
+
12
+ // Toggling content
13
+ .hide {
14
+ display: none;
15
+ }
16
+ .show {
17
+ display: block;
18
+ }
19
+
20
+ // Visibility
21
+ .invisible {
22
+ visibility: hidden;
23
+ }
@@ -1,60 +1,99 @@
1
- /* Variables.less
2
- * Variables to customize the look and feel of Bootstrap
3
- * ----------------------------------------------------- */
1
+ // Variables.less
2
+ // Variables to customize the look and feel of Bootstrap
3
+ // -----------------------------------------------------
4
4
 
5
5
 
6
+
7
+ // GLOBAL VALUES
8
+ // --------------------------------------------------
9
+
6
10
  // Links
7
- @linkColor: #0069d6;
8
- @linkColorHover: darken(@linkColor, 15);
11
+ @linkColor: #08c;
12
+ @linkColorHover: darken(@linkColor, 15%);
9
13
 
10
14
  // Grays
11
- @black: #000;
12
- @grayDark: lighten(@black, 25%);
13
- @gray: lighten(@black, 50%);
14
- @grayLight: lighten(@black, 75%);
15
- @grayLighter: lighten(@black, 90%);
16
- @white: #fff;
17
-
18
- // Accent Colors
19
- @blue: #049CDB;
20
- @blueDark: #0064CD;
21
- @green: #46a546;
22
- @red: #9d261d;
23
- @yellow: #ffc40d;
24
- @orange: #f89406;
25
- @pink: #c3325f;
26
- @purple: #7a43b6;
27
-
28
- // Baseline grid
29
- @basefont: 13px;
30
- @baseline: 18px;
31
-
32
- // Griditude
33
- // Modify the grid styles in mixins.less
34
- @gridColumns: 16;
35
- @gridColumnWidth: 40px;
36
- @gridGutterWidth: 20px;
37
- @extraSpace: (@gridGutterWidth * 2); // For our grid calculations
38
- @siteWidth: (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1));
39
-
40
- // Color Scheme
41
- // Use this to roll your own color schemes if you like (unused by Bootstrap by default)
42
- @baseColor: @blue; // Set a base color
43
- @complement: spin(@baseColor, 180); // Determine a complementary color
44
- @split1: spin(@baseColor, 158); // Split complements
45
- @split2: spin(@baseColor, -158);
46
- @triad1: spin(@baseColor, 135); // Triads colors
47
- @triad2: spin(@baseColor, -135);
48
- @tetra1: spin(@baseColor, 90); // Tetra colors
49
- @tetra2: spin(@baseColor, -90);
50
- @analog1: spin(@baseColor, 22); // Analogs colors
51
- @analog2: spin(@baseColor, -22);
52
-
53
-
54
-
55
- // More variables coming soon:
56
- // - @basefont to @baseFontSize
57
- // - @baseline to @baseLineHeight
58
- // - @baseFontFamily
59
- // - @primaryButtonColor
60
- // - anything else? File an issue on GitHub
15
+ @black: #000;
16
+ @grayDarker: #222;
17
+ @grayDark: #333;
18
+ @gray: #555;
19
+ @grayLight: #999;
20
+ @grayLighter: #eee;
21
+ @white: #fff;
22
+
23
+ // Accent colors
24
+ @blue: #049cdb;
25
+ @blueDark: #0064cd;
26
+ @green: #46a546;
27
+ @red: #9d261d;
28
+ @yellow: #ffc40d;
29
+ @orange: #f89406;
30
+ @pink: #c3325f;
31
+ @purple: #7a43b6;
32
+
33
+ // Typography
34
+ @baseFontSize: 13px;
35
+ @baseFontFamily: "Helvetica Neue", Helvetica, Arial, sans-serif;
36
+ @baseLineHeight: 18px;
37
+ @textColor: @grayDark;
38
+
39
+ // Buttons
40
+ @primaryButtonBackground: @linkColor;
41
+
42
+
43
+
44
+ // COMPONENT VARIABLES
45
+ // --------------------------------------------------
46
+
47
+ // Z-index master list
48
+ // Used for a bird's eye view of components dependent on the z-axis
49
+ // Try to avoid customizing these :)
50
+ @zindexDropdown: 1000;
51
+ @zindexPopover: 1010;
52
+ @zindexTooltip: 1020;
53
+ @zindexFixedNavbar: 1030;
54
+ @zindexModalBackdrop: 1040;
55
+ @zindexModal: 1050;
56
+
57
+ // Input placeholder text color
58
+ @placeholderText: @grayLight;
59
+
60
+ // Navbar
61
+ @navbarHeight: 40px;
62
+ @navbarBackground: @grayDarker;
63
+ @navbarBackgroundHighlight: @grayDark;
64
+
65
+ @navbarText: @grayLight;
66
+ @navbarLinkColor: @grayLight;
67
+ @navbarLinkColorHover: @white;
68
+
69
+ // Form states and alerts
70
+ @warningText: #c09853;
71
+ @warningBackground: #fcf8e3;
72
+ @warningBorder: darken(spin(@warningBackground, -10), 3%);
73
+
74
+ @errorText: #b94a48;
75
+ @errorBackground: #f2dede;
76
+ @errorBorder: darken(spin(@errorBackground, -10), 3%);
77
+
78
+ @successText: #468847;
79
+ @successBackground: #dff0d8;
80
+ @successBorder: darken(spin(@successBackground, -10), 5%);
81
+
82
+ @infoText: #3a87ad;
83
+ @infoBackground: #d9edf7;
84
+ @infoBorder: darken(spin(@infoBackground, -10), 7%);
85
+
86
+
87
+
88
+ // GRID
89
+ // --------------------------------------------------
90
+
91
+ // Default 940px grid
92
+ @gridColumns: 12;
93
+ @gridColumnWidth: 60px;
94
+ @gridGutterWidth: 20px;
95
+ @gridRowWidth: (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1));
96
+
97
+ // Fluid grid
98
+ @fluidGridColumnWidth: 6.382978723%;
99
+ @fluidGridGutterWidth: 2.127659574%;