twitter-bootswatch-rails 2.3.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. data/README.md +259 -0
  2. data/Rakefile +57 -0
  3. data/lib/generators/bootswatch/import/import_generator.rb +50 -0
  4. data/lib/generators/bootswatch/install/install_generator.rb +120 -0
  5. data/lib/generators/bootswatch/install/templates/application.css.tt +6 -0
  6. data/lib/generators/bootswatch/install/templates/application.js.tt +5 -0
  7. data/lib/generators/bootswatch/install/templates/base.less.tt +8 -0
  8. data/lib/generators/bootswatch/install/templates/bootstrap.less +63 -0
  9. data/lib/generators/bootswatch/install/templates/bootswatch.coffee.tt +9 -0
  10. data/lib/generators/bootswatch/install/templates/bootswatch.less.tt +8 -0
  11. data/lib/generators/bootswatch/install/templates/loader.coffee.tt +25 -0
  12. data/lib/generators/bootswatch/install/templates/loader.css.less.tt +22 -0
  13. data/lib/generators/bootswatch/install/templates/mixins.less.tt +704 -0
  14. data/lib/generators/bootswatch/install/templates/variables.less.tt +303 -0
  15. data/lib/generators/bootswatch/layout/layout_generator.rb +23 -0
  16. data/lib/generators/bootswatch/layout/templates/layout.html.erb +50 -0
  17. data/lib/generators/bootswatch/layout/templates/layout.html.haml +30 -0
  18. data/lib/generators/bootswatch/themed/templates/_form.html.erb +16 -0
  19. data/lib/generators/bootswatch/themed/templates/_form.html.haml +10 -0
  20. data/lib/generators/bootswatch/themed/templates/edit.html.erb +6 -0
  21. data/lib/generators/bootswatch/themed/templates/edit.html.haml +4 -0
  22. data/lib/generators/bootswatch/themed/templates/index.html.erb +40 -0
  23. data/lib/generators/bootswatch/themed/templates/index.html.haml +25 -0
  24. data/lib/generators/bootswatch/themed/templates/new.html.erb +6 -0
  25. data/lib/generators/bootswatch/themed/templates/new.html.haml +4 -0
  26. data/lib/generators/bootswatch/themed/templates/show.html.erb +23 -0
  27. data/lib/generators/bootswatch/themed/templates/show.html.haml +15 -0
  28. data/lib/generators/bootswatch/themed/templates/simple_form/_form.html.erb +14 -0
  29. data/lib/generators/bootswatch/themed/templates/simple_form/_form.html.haml +11 -0
  30. data/lib/generators/bootswatch/themed/themed_generator.rb +99 -0
  31. data/lib/tasks/setup.thor +90 -0
  32. data/lib/twitter-bootswatch-rails.rb +10 -0
  33. data/lib/twitter/bootswatch/rails/bootswatch.rb +2 -0
  34. data/lib/twitter/bootswatch/rails/engine.rb +32 -0
  35. data/lib/twitter/bootswatch/rails/version.rb +7 -0
  36. data/vendor/assets/fonts/font-awesome/FontAwesome.otf +0 -0
  37. data/vendor/assets/fonts/font-awesome/fontawesome-webfont.eot +0 -0
  38. data/vendor/assets/fonts/font-awesome/fontawesome-webfont.svg +284 -0
  39. data/vendor/assets/fonts/font-awesome/fontawesome-webfont.ttf +0 -0
  40. data/vendor/assets/fonts/font-awesome/fontawesome-webfont.woff +0 -0
  41. data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings-white.png +0 -0
  42. data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings.png +0 -0
  43. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-affix.js +117 -0
  44. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-alert.js +99 -0
  45. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-button.js +105 -0
  46. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js +207 -0
  47. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-collapse.js +167 -0
  48. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js +165 -0
  49. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-modal.js +247 -0
  50. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-popover.js +114 -0
  51. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js +162 -0
  52. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tab.js +144 -0
  53. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tooltip.js +361 -0
  54. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-transition.js +60 -0
  55. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-typeahead.js +335 -0
  56. data/vendor/toolkit/font-awesome/font-awesome-ie7.less +350 -0
  57. data/vendor/toolkit/font-awesome/font-awesome.less +537 -0
  58. data/vendor/toolkit/twitter/bootstrap/accordion.less +34 -0
  59. data/vendor/toolkit/twitter/bootstrap/alerts.less +79 -0
  60. data/vendor/toolkit/twitter/bootstrap/bootstrap.less +63 -0
  61. data/vendor/toolkit/twitter/bootstrap/breadcrumbs.less +24 -0
  62. data/vendor/toolkit/twitter/bootstrap/button-groups.less +229 -0
  63. data/vendor/toolkit/twitter/bootstrap/buttons.less +228 -0
  64. data/vendor/toolkit/twitter/bootstrap/carousel.less +158 -0
  65. data/vendor/toolkit/twitter/bootstrap/close.less +32 -0
  66. data/vendor/toolkit/twitter/bootstrap/code.less +61 -0
  67. data/vendor/toolkit/twitter/bootstrap/component-animations.less +22 -0
  68. data/vendor/toolkit/twitter/bootstrap/dropdowns.less +237 -0
  69. data/vendor/toolkit/twitter/bootstrap/forms.less +690 -0
  70. data/vendor/toolkit/twitter/bootstrap/grid.less +21 -0
  71. data/vendor/toolkit/twitter/bootstrap/hero-unit.less +25 -0
  72. data/vendor/toolkit/twitter/bootstrap/labels-badges.less +84 -0
  73. data/vendor/toolkit/twitter/bootstrap/layouts.less +16 -0
  74. data/vendor/toolkit/twitter/bootstrap/media.less +55 -0
  75. data/vendor/toolkit/twitter/bootstrap/mixins.less +702 -0
  76. data/vendor/toolkit/twitter/bootstrap/modals.less +95 -0
  77. data/vendor/toolkit/twitter/bootstrap/navbar.less +497 -0
  78. data/vendor/toolkit/twitter/bootstrap/navs.less +409 -0
  79. data/vendor/toolkit/twitter/bootstrap/pager.less +43 -0
  80. data/vendor/toolkit/twitter/bootstrap/pagination.less +123 -0
  81. data/vendor/toolkit/twitter/bootstrap/popovers.less +133 -0
  82. data/vendor/toolkit/twitter/bootstrap/progress-bars.less +122 -0
  83. data/vendor/toolkit/twitter/bootstrap/reset.less +216 -0
  84. data/vendor/toolkit/twitter/bootstrap/responsive-1200px-min.less +28 -0
  85. data/vendor/toolkit/twitter/bootstrap/responsive-767px-max.less +193 -0
  86. data/vendor/toolkit/twitter/bootstrap/responsive-768px-979px.less +19 -0
  87. data/vendor/toolkit/twitter/bootstrap/responsive-navbar.less +189 -0
  88. data/vendor/toolkit/twitter/bootstrap/responsive-utilities.less +59 -0
  89. data/vendor/toolkit/twitter/bootstrap/responsive.less +48 -0
  90. data/vendor/toolkit/twitter/bootstrap/scaffolding.less +53 -0
  91. data/vendor/toolkit/twitter/bootstrap/sprites.less +197 -0
  92. data/vendor/toolkit/twitter/bootstrap/tables.less +244 -0
  93. data/vendor/toolkit/twitter/bootstrap/thumbnails.less +53 -0
  94. data/vendor/toolkit/twitter/bootstrap/tooltip.less +70 -0
  95. data/vendor/toolkit/twitter/bootstrap/type.less +247 -0
  96. data/vendor/toolkit/twitter/bootstrap/utilities.less +30 -0
  97. data/vendor/toolkit/twitter/bootstrap/variables.less +301 -0
  98. data/vendor/toolkit/twitter/bootstrap/wells.less +29 -0
  99. metadata +269 -0
@@ -0,0 +1,6 @@
1
+ /* <%= config[:theme_info] %>
2
+ * Bootswatch
3
+ *= require_self
4
+ *= require <%= config[:theme_name] %>/loader
5
+ *= require font-awesome/font-awesome
6
+ */
@@ -0,0 +1,5 @@
1
+ // <%= config[:theme_info] %>
2
+ // Bootswatch
3
+ //= require jquery
4
+ //= require jquery_ujs
5
+ //= require <%= config[:theme_name] %>/loader
@@ -0,0 +1,8 @@
1
+ // <%= config[:theme_info] %>
2
+ // Bootswatch
3
+ // base.less
4
+ // allows access to less variables in bootswatch.less
5
+ @import "twitter/bootstrap/variables";
6
+ @import "<%= config[:theme_name] %>/variables";
7
+ @import "twitter/bootstrap/mixins";
8
+ @import "<%= config[:theme_name] %>/mixins";
@@ -0,0 +1,63 @@
1
+ /*!
2
+ * Bootstrap v2.3.1
3
+ *
4
+ * Copyright 2012 Twitter, Inc
5
+ * Licensed under the Apache License v2.0
6
+ * http://www.apache.org/licenses/LICENSE-2.0
7
+ *
8
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
9
+ */
10
+
11
+ // Core variables and mixins
12
+ @import "variables.less"; // Modify this for custom colors, font-sizes, etc
13
+ @import "mixins.less";
14
+
15
+ // CSS Reset
16
+ @import "reset.less";
17
+
18
+ // Grid system and page structure
19
+ @import "scaffolding.less";
20
+ @import "grid.less";
21
+ @import "layouts.less";
22
+
23
+ // Base CSS
24
+ @import "type.less";
25
+ @import "code.less";
26
+ @import "forms.less";
27
+ @import "tables.less";
28
+
29
+ // Components: common
30
+ @import "sprites.less";
31
+ @import "dropdowns.less";
32
+ @import "wells.less";
33
+ @import "component-animations.less";
34
+ @import "close.less";
35
+
36
+ // Components: Buttons & Alerts
37
+ @import "buttons.less";
38
+ @import "button-groups.less";
39
+ @import "alerts.less"; // Note: alerts share common CSS with buttons and thus have styles in buttons.less
40
+
41
+ // Components: Nav
42
+ @import "navs.less";
43
+ @import "navbar.less";
44
+ @import "breadcrumbs.less";
45
+ @import "pagination.less";
46
+ @import "pager.less";
47
+
48
+ // Components: Popovers
49
+ @import "modals.less";
50
+ @import "tooltip.less";
51
+ @import "popovers.less";
52
+
53
+ // Components: Misc
54
+ @import "thumbnails.less";
55
+ @import "media.less";
56
+ @import "labels-badges.less";
57
+ @import "progress-bars.less";
58
+ @import "accordion.less";
59
+ @import "carousel.less";
60
+ @import "hero-unit.less";
61
+
62
+ // Utility classes
63
+ @import "utilities.less"; // Has to be last to override when necessary
@@ -0,0 +1,9 @@
1
+ # <%= config[:theme_info] %>
2
+ # Bootswatch
3
+ # bootswatch.coffee
4
+ # http://coffeescriptcookbook.com/chapters/syntax/embedding_javascript
5
+
6
+ #jQuery ->
7
+ # $("a[rel=popover]").popover()
8
+ # $(".tooltip").tooltip()
9
+ # $("a[rel=tooltip]").tooltip()
@@ -0,0 +1,8 @@
1
+ @import "base";
2
+ // <%= config[:theme_info] %>
3
+ // Bootswatch
4
+ // bootswatch.less
5
+
6
+ //body {
7
+ // padding-top: 10px;
8
+ //}
@@ -0,0 +1,25 @@
1
+ # <%= config[:theme_info] %>
2
+ # Bootswatch
3
+ # loader.coffee
4
+
5
+ <%
6
+ js_files = %w[
7
+ bootstrap-transition
8
+ bootstrap-alert
9
+ bootstrap-button
10
+ bootstrap-carousel
11
+ bootstrap-collapse
12
+ bootstrap-dropdown
13
+ bootstrap-modal
14
+ bootstrap-tooltip
15
+ bootstrap-popover
16
+ bootstrap-scrollspy
17
+ bootstrap-tab
18
+ bootstrap-typeahead
19
+ bootstrap-affix]
20
+
21
+ js_files.each do |js_file|
22
+ %>#= require twitter/bootstrap/<%= js_file %>
23
+ <% end %>
24
+
25
+ #= require <%= config[:theme_name] %>/bootswatch
@@ -0,0 +1,22 @@
1
+ // <%= config[:theme_info] %>
2
+ // Bootswatch
3
+ // loader.css.less
4
+ // customize the modules loaded here
5
+ <%
6
+ config[:less_imports].map{|item| item.gsub(/.less/, '')}.each do |less_file|
7
+ %>@import "twitter/bootstrap/<%= less_file %>";
8
+ <%
9
+ if less_file == 'variables'
10
+ %>@import "<%= config[:theme_name] %>/<%= less_file %>";
11
+ <%
12
+ end
13
+ if less_file == 'mixins'
14
+ %>@import "<%= config[:theme_name] %>/<%= less_file %>";
15
+ <%
16
+ end
17
+ end
18
+ %>
19
+
20
+ // @import "twitter/bootstrap/responsive";
21
+
22
+ @import "<%= config[:theme_name] %>/bootswatch";
@@ -0,0 +1,704 @@
1
+ // <%= config[:theme_info] %>
2
+ // Bootswatch
3
+ //
4
+ // Mixins
5
+ // --------------------------------------------------
6
+
7
+
8
+ // UTILITY MIXINS
9
+ // --------------------------------------------------
10
+
11
+ // Clearfix
12
+ // --------
13
+ // For clearing floats like a boss h5bp.com/q
14
+ .clearfix {
15
+ *zoom: 1;
16
+ &:before,
17
+ &:after {
18
+ display: table;
19
+ content: "";
20
+ // Fixes Opera/contenteditable bug:
21
+ // http://nicolasgallagher.com/micro-clearfix-hack/#comment-36952
22
+ line-height: 0;
23
+ }
24
+ &:after {
25
+ clear: both;
26
+ }
27
+ }
28
+
29
+ // Webkit-style focus
30
+ // ------------------
31
+ .tab-focus() {
32
+ // Default
33
+ outline: thin dotted #333;
34
+ // Webkit
35
+ outline: 5px auto -webkit-focus-ring-color;
36
+ outline-offset: -2px;
37
+ }
38
+
39
+ // Center-align a block level element
40
+ // ----------------------------------
41
+ .center-block() {
42
+ display: block;
43
+ margin-left: auto;
44
+ margin-right: auto;
45
+ }
46
+
47
+ // IE7 inline-block
48
+ // ----------------
49
+ .ie7-inline-block() {
50
+ *display: inline; /* IE7 inline-block hack */
51
+ *zoom: 1;
52
+ }
53
+
54
+ // IE7 likes to collapse whitespace on either side of the inline-block elements.
55
+ // Ems because we're attempting to match the width of a space character. Left
56
+ // version is for form buttons, which typically come after other elements, and
57
+ // right version is for icons, which come before. Applying both is ok, but it will
58
+ // mean that space between those elements will be .6em (~2 space characters) in IE7,
59
+ // instead of the 1 space in other browsers.
60
+ .ie7-restore-left-whitespace() {
61
+ *margin-left: .3em;
62
+
63
+ &:first-child {
64
+ *margin-left: 0;
65
+ }
66
+ }
67
+
68
+ .ie7-restore-right-whitespace() {
69
+ *margin-right: .3em;
70
+ }
71
+
72
+ // Sizing shortcuts
73
+ // -------------------------
74
+ .size(@height, @width) {
75
+ width: @width;
76
+ height: @height;
77
+ }
78
+ .square(@size) {
79
+ .size(@size, @size);
80
+ }
81
+
82
+ // Placeholder text
83
+ // -------------------------
84
+ .placeholder(@color: @placeholderText) {
85
+ &:-moz-placeholder {
86
+ color: @color;
87
+ }
88
+ &:-ms-input-placeholder {
89
+ color: @color;
90
+ }
91
+ &::-webkit-input-placeholder {
92
+ color: @color;
93
+ }
94
+ }
95
+
96
+ // Text overflow
97
+ // -------------------------
98
+ // Requires inline-block or block for proper styling
99
+ .text-overflow() {
100
+ overflow: hidden;
101
+ text-overflow: ellipsis;
102
+ white-space: nowrap;
103
+ }
104
+
105
+ // CSS image replacement
106
+ // -------------------------
107
+ // Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757
108
+ .hide-text {
109
+ font: 0/0 a;
110
+ color: transparent;
111
+ text-shadow: none;
112
+ background-color: transparent;
113
+ border: 0;
114
+ }
115
+
116
+
117
+ // FONTS
118
+ // --------------------------------------------------
119
+
120
+ #font {
121
+ #family {
122
+ .serif() {
123
+ font-family: @serifFontFamily;
124
+ }
125
+ .sans-serif() {
126
+ font-family: @sansFontFamily;
127
+ }
128
+ .monospace() {
129
+ font-family: @monoFontFamily;
130
+ }
131
+ }
132
+ .shorthand(@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight) {
133
+ font-size: @size;
134
+ font-weight: @weight;
135
+ line-height: @lineHeight;
136
+ }
137
+ .serif(@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight) {
138
+ #font > #family > .serif;
139
+ #font > .shorthand(@size, @weight, @lineHeight);
140
+ }
141
+ .sans-serif(@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight) {
142
+ #font > #family > .sans-serif;
143
+ #font > .shorthand(@size, @weight, @lineHeight);
144
+ }
145
+ .monospace(@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight) {
146
+ #font > #family > .monospace;
147
+ #font > .shorthand(@size, @weight, @lineHeight);
148
+ }
149
+ }
150
+
151
+
152
+ // FORMS
153
+ // --------------------------------------------------
154
+
155
+ // Block level inputs
156
+ .input-block-level {
157
+ display: block;
158
+ width: 100%;
159
+ min-height: @inputHeight; // Make inputs at least the height of their button counterpart (base line-height + padding + border)
160
+ .box-sizing(border-box); // Makes inputs behave like true block-level elements
161
+ }
162
+
163
+
164
+
165
+ // Mixin for form field states
166
+ .formFieldState(@textColor: #555, @borderColor: #ccc, @backgroundColor: #f5f5f5) {
167
+ // Set the text color
168
+ .control-label,
169
+ .help-block,
170
+ .help-inline {
171
+ color: @textColor;
172
+ }
173
+ // Style inputs accordingly
174
+ .checkbox,
175
+ .radio,
176
+ input,
177
+ select,
178
+ textarea {
179
+ color: @textColor;
180
+ }
181
+ input,
182
+ select,
183
+ textarea {
184
+ border-color: @borderColor;
185
+ .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work
186
+ &:focus {
187
+ border-color: darken(@borderColor, 10%);
188
+ @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@borderColor, 20%);
189
+ .box-shadow(@shadow);
190
+ }
191
+ }
192
+ // Give a small background color for input-prepend/-append
193
+ .input-prepend .add-on,
194
+ .input-append .add-on {
195
+ color: @textColor;
196
+ background-color: @backgroundColor;
197
+ border-color: @textColor;
198
+ }
199
+ }
200
+
201
+
202
+
203
+ // CSS3 PROPERTIES
204
+ // --------------------------------------------------
205
+
206
+ // Border Radius
207
+ .border-radius(@radius) {
208
+ -webkit-border-radius: @radius;
209
+ -moz-border-radius: @radius;
210
+ border-radius: @radius;
211
+ }
212
+
213
+ // Single Corner Border Radius
214
+ .border-top-left-radius(@radius) {
215
+ -webkit-border-top-left-radius: @radius;
216
+ -moz-border-radius-topleft: @radius;
217
+ border-top-left-radius: @radius;
218
+ }
219
+ .border-top-right-radius(@radius) {
220
+ -webkit-border-top-right-radius: @radius;
221
+ -moz-border-radius-topright: @radius;
222
+ border-top-right-radius: @radius;
223
+ }
224
+ .border-bottom-right-radius(@radius) {
225
+ -webkit-border-bottom-right-radius: @radius;
226
+ -moz-border-radius-bottomright: @radius;
227
+ border-bottom-right-radius: @radius;
228
+ }
229
+ .border-bottom-left-radius(@radius) {
230
+ -webkit-border-bottom-left-radius: @radius;
231
+ -moz-border-radius-bottomleft: @radius;
232
+ border-bottom-left-radius: @radius;
233
+ }
234
+
235
+ // Single Side Border Radius
236
+ .border-top-radius(@radius) {
237
+ .border-top-right-radius(@radius);
238
+ .border-top-left-radius(@radius);
239
+ }
240
+ .border-right-radius(@radius) {
241
+ .border-top-right-radius(@radius);
242
+ .border-bottom-right-radius(@radius);
243
+ }
244
+ .border-bottom-radius(@radius) {
245
+ .border-bottom-right-radius(@radius);
246
+ .border-bottom-left-radius(@radius);
247
+ }
248
+ .border-left-radius(@radius) {
249
+ .border-top-left-radius(@radius);
250
+ .border-bottom-left-radius(@radius);
251
+ }
252
+
253
+ // Drop shadows
254
+ .box-shadow(@shadow) {
255
+ -webkit-box-shadow: @shadow;
256
+ -moz-box-shadow: @shadow;
257
+ box-shadow: @shadow;
258
+ }
259
+
260
+ // Transitions
261
+ .transition(@transition) {
262
+ -webkit-transition: @transition;
263
+ -moz-transition: @transition;
264
+ -o-transition: @transition;
265
+ transition: @transition;
266
+ }
267
+ .transition-delay(@transition-delay) {
268
+ -webkit-transition-delay: @transition-delay;
269
+ -moz-transition-delay: @transition-delay;
270
+ -o-transition-delay: @transition-delay;
271
+ transition-delay: @transition-delay;
272
+ }
273
+ .transition-duration(@transition-duration) {
274
+ -webkit-transition-duration: @transition-duration;
275
+ -moz-transition-duration: @transition-duration;
276
+ -o-transition-duration: @transition-duration;
277
+ transition-duration: @transition-duration;
278
+ }
279
+
280
+ // Transformations
281
+ .rotate(@degrees) {
282
+ -webkit-transform: rotate(@degrees);
283
+ -moz-transform: rotate(@degrees);
284
+ -ms-transform: rotate(@degrees);
285
+ -o-transform: rotate(@degrees);
286
+ transform: rotate(@degrees);
287
+ }
288
+ .scale(@ratio) {
289
+ -webkit-transform: scale(@ratio);
290
+ -moz-transform: scale(@ratio);
291
+ -ms-transform: scale(@ratio);
292
+ -o-transform: scale(@ratio);
293
+ transform: scale(@ratio);
294
+ }
295
+ .translate(@x, @y) {
296
+ -webkit-transform: translate(@x, @y);
297
+ -moz-transform: translate(@x, @y);
298
+ -ms-transform: translate(@x, @y);
299
+ -o-transform: translate(@x, @y);
300
+ transform: translate(@x, @y);
301
+ }
302
+ .skew(@x, @y) {
303
+ -webkit-transform: skew(@x, @y);
304
+ -moz-transform: skew(@x, @y);
305
+ -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twitter/bootstrap/issues/4885
306
+ -o-transform: skew(@x, @y);
307
+ transform: skew(@x, @y);
308
+ -webkit-backface-visibility: hidden; // See https://github.com/twitter/bootstrap/issues/5319
309
+ }
310
+ .translate3d(@x, @y, @z) {
311
+ -webkit-transform: translate3d(@x, @y, @z);
312
+ -moz-transform: translate3d(@x, @y, @z);
313
+ -o-transform: translate3d(@x, @y, @z);
314
+ transform: translate3d(@x, @y, @z);
315
+ }
316
+
317
+ // Backface visibility
318
+ // Prevent browsers from flickering when using CSS 3D transforms.
319
+ // Default value is `visible`, but can be changed to `hidden
320
+ // See git pull https://github.com/dannykeane/bootstrap.git backface-visibility for examples
321
+ .backface-visibility(@visibility){
322
+ -webkit-backface-visibility: @visibility;
323
+ -moz-backface-visibility: @visibility;
324
+ backface-visibility: @visibility;
325
+ }
326
+
327
+ // Background clipping
328
+ // Heads up: FF 3.6 and under need "padding" instead of "padding-box"
329
+ .background-clip(@clip) {
330
+ -webkit-background-clip: @clip;
331
+ -moz-background-clip: @clip;
332
+ background-clip: @clip;
333
+ }
334
+
335
+ // Background sizing
336
+ .background-size(@size) {
337
+ -webkit-background-size: @size;
338
+ -moz-background-size: @size;
339
+ -o-background-size: @size;
340
+ background-size: @size;
341
+ }
342
+
343
+
344
+ // Box sizing
345
+ .box-sizing(@boxmodel) {
346
+ -webkit-box-sizing: @boxmodel;
347
+ -moz-box-sizing: @boxmodel;
348
+ box-sizing: @boxmodel;
349
+ }
350
+
351
+ // User select
352
+ // For selecting text on the page
353
+ .user-select(@select) {
354
+ -webkit-user-select: @select;
355
+ -moz-user-select: @select;
356
+ -ms-user-select: @select;
357
+ -o-user-select: @select;
358
+ user-select: @select;
359
+ }
360
+
361
+ // Resize anything
362
+ .resizable(@direction) {
363
+ resize: @direction; // Options: horizontal, vertical, both
364
+ overflow: auto; // Safari fix
365
+ }
366
+
367
+ // CSS3 Content Columns
368
+ .content-columns(@columnCount, @columnGap: @gridGutterWidth) {
369
+ -webkit-column-count: @columnCount;
370
+ -moz-column-count: @columnCount;
371
+ column-count: @columnCount;
372
+ -webkit-column-gap: @columnGap;
373
+ -moz-column-gap: @columnGap;
374
+ column-gap: @columnGap;
375
+ }
376
+
377
+ // Optional hyphenation
378
+ .hyphens(@mode: auto) {
379
+ word-wrap: break-word;
380
+ -webkit-hyphens: @mode;
381
+ -moz-hyphens: @mode;
382
+ -ms-hyphens: @mode;
383
+ -o-hyphens: @mode;
384
+ hyphens: @mode;
385
+ }
386
+
387
+ // Opacity
388
+ .opacity(@opacity) {
389
+ opacity: @opacity / 100;
390
+ filter: ~"alpha(opacity=@{opacity})";
391
+ }
392
+
393
+
394
+
395
+ // BACKGROUNDS
396
+ // --------------------------------------------------
397
+
398
+ // Add an alphatransparency value to any background or border color (via Elyse Holladay)
399
+ #translucent {
400
+ .background(@color: @white, @alpha: 1) {
401
+ background-color: hsla(hue(@color), saturation(@color), lightness(@color), @alpha);
402
+ }
403
+ .border(@color: @white, @alpha: 1) {
404
+ border-color: hsla(hue(@color), saturation(@color), lightness(@color), @alpha);
405
+ .background-clip(padding-box);
406
+ }
407
+ }
408
+
409
+ // Gradient Bar Colors for buttons and alerts
410
+ .gradientBar(@primaryColor, @secondaryColor, @textColor: #fff, @textShadow: 0 -1px 0 rgba(0,0,0,.25)) {
411
+ color: @textColor;
412
+ text-shadow: @textShadow;
413
+ #gradient > .vertical(@primaryColor, @secondaryColor);
414
+ border-color: @secondaryColor @secondaryColor darken(@secondaryColor, 15%);
415
+ border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) fadein(rgba(0,0,0,.1), 15%);
416
+ }
417
+
418
+ // Gradients
419
+ #gradient {
420
+ .horizontal(@startColor: #555, @endColor: #333) {
421
+ background-color: @endColor;
422
+ background-image: -moz-linear-gradient(left, @startColor, @endColor); // FF 3.6+
423
+ background-image: -webkit-gradient(linear, 0 0, 100% 0, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+
424
+ background-image: -webkit-linear-gradient(left, @startColor, @endColor); // Safari 5.1+, Chrome 10+
425
+ background-image: -o-linear-gradient(left, @startColor, @endColor); // Opera 11.10
426
+ background-image: linear-gradient(to right, @startColor, @endColor); // Standard, IE10
427
+ background-repeat: repeat-x;
428
+ filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@startColor),argb(@endColor))); // IE9 and down
429
+ }
430
+ .vertical(@startColor: #555, @endColor: #333) {
431
+ background-color: mix(@startColor, @endColor, 60%);
432
+ background-image: -moz-linear-gradient(top, @startColor, @endColor); // FF 3.6+
433
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+
434
+ background-image: -webkit-linear-gradient(top, @startColor, @endColor); // Safari 5.1+, Chrome 10+
435
+ background-image: -o-linear-gradient(top, @startColor, @endColor); // Opera 11.10
436
+ background-image: linear-gradient(to bottom, @startColor, @endColor); // Standard, IE10
437
+ background-repeat: repeat-x;
438
+ filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@startColor),argb(@endColor))); // IE9 and down
439
+ }
440
+ .directional(@startColor: #555, @endColor: #333, @deg: 45deg) {
441
+ background-color: @endColor;
442
+ background-repeat: repeat-x;
443
+ background-image: -moz-linear-gradient(@deg, @startColor, @endColor); // FF 3.6+
444
+ background-image: -webkit-linear-gradient(@deg, @startColor, @endColor); // Safari 5.1+, Chrome 10+
445
+ background-image: -o-linear-gradient(@deg, @startColor, @endColor); // Opera 11.10
446
+ background-image: linear-gradient(@deg, @startColor, @endColor); // Standard, IE10
447
+ }
448
+ .horizontal-three-colors(@startColor: #00b3ee, @midColor: #7a43b6, @colorStop: 50%, @endColor: #c3325f) {
449
+ background-color: mix(@midColor, @endColor, 80%);
450
+ background-image: -webkit-gradient(left, linear, 0 0, 0 100%, from(@startColor), color-stop(@colorStop, @midColor), to(@endColor));
451
+ background-image: -webkit-linear-gradient(left, @startColor, @midColor @colorStop, @endColor);
452
+ background-image: -moz-linear-gradient(left, @startColor, @midColor @colorStop, @endColor);
453
+ background-image: -o-linear-gradient(left, @startColor, @midColor @colorStop, @endColor);
454
+ background-image: linear-gradient(to right, @startColor, @midColor @colorStop, @endColor);
455
+ background-repeat: no-repeat;
456
+ filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@startColor),argb(@endColor))); // IE9 and down, gets no color-stop at all for proper fallback
457
+ }
458
+
459
+ .vertical-three-colors(@startColor: #00b3ee, @midColor: #7a43b6, @colorStop: 50%, @endColor: #c3325f) {
460
+ background-color: mix(@midColor, @endColor, 80%);
461
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), color-stop(@colorStop, @midColor), to(@endColor));
462
+ background-image: -webkit-linear-gradient(@startColor, @midColor @colorStop, @endColor);
463
+ background-image: -moz-linear-gradient(top, @startColor, @midColor @colorStop, @endColor);
464
+ background-image: -o-linear-gradient(@startColor, @midColor @colorStop, @endColor);
465
+ background-image: linear-gradient(@startColor, @midColor @colorStop, @endColor);
466
+ background-repeat: no-repeat;
467
+ filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@startColor),argb(@endColor))); // IE9 and down, gets no color-stop at all for proper fallback
468
+ }
469
+ .radial(@innerColor: #555, @outerColor: #333) {
470
+ background-color: @outerColor;
471
+ background-image: -webkit-gradient(radial, center center, 0, center center, 460, from(@innerColor), to(@outerColor));
472
+ background-image: -webkit-radial-gradient(circle, @innerColor, @outerColor);
473
+ background-image: -moz-radial-gradient(circle, @innerColor, @outerColor);
474
+ background-image: -o-radial-gradient(circle, @innerColor, @outerColor);
475
+ background-repeat: no-repeat;
476
+ }
477
+ .striped(@color: #555, @angle: 45deg) {
478
+ background-color: @color;
479
+ background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(.25, rgba(255,255,255,.15)), color-stop(.25, transparent), color-stop(.5, transparent), color-stop(.5, rgba(255,255,255,.15)), color-stop(.75, rgba(255,255,255,.15)), color-stop(.75, transparent), to(transparent));
480
+ background-image: -webkit-linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
481
+ background-image: -moz-linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
482
+ background-image: -o-linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
483
+ background-image: linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
484
+ }
485
+ }
486
+ // Reset filters for IE
487
+ .reset-filter() {
488
+ filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)"));
489
+ }
490
+
491
+
492
+
493
+ // COMPONENT MIXINS
494
+ // --------------------------------------------------
495
+
496
+ // Horizontal dividers
497
+ // -------------------------
498
+ // Dividers (basically an hr) within dropdowns and nav lists
499
+ .nav-divider(@top: #e5e5e5, @bottom: @white) {
500
+ // IE7 needs a set width since we gave a height. Restricting just
501
+ // to IE7 to keep the 1px left/right space in other browsers.
502
+ // It is unclear where IE is getting the extra space that we need
503
+ // to negative-margin away, but so it goes.
504
+ *width: 100%;
505
+ height: 1px;
506
+ margin: ((@baseLineHeight / 2) - 1) 1px; // 8px 1px
507
+ *margin: -5px 0 5px;
508
+ overflow: hidden;
509
+ background-color: @top;
510
+ border-bottom: 1px solid @bottom;
511
+ }
512
+
513
+ // Button backgrounds
514
+ // ------------------
515
+ .buttonBackground(@startColor, @endColor, @textColor: #fff, @textShadow: 0 -1px 0 rgba(0,0,0,.25)) {
516
+ // gradientBar will set the background to a pleasing blend of these, to support IE<=9
517
+ .gradientBar(@startColor, @endColor, @textColor, @textShadow);
518
+ *background-color: @endColor; /* Darken IE7 buttons by default so they stand out more given they won't have borders */
519
+ .reset-filter();
520
+
521
+ // in these cases the gradient won't cover the background, so we override
522
+ &:hover, &:focus, &:active, &.active, &.disabled, &[disabled] {
523
+ color: @textColor;
524
+ background-color: @endColor;
525
+ *background-color: darken(@endColor, 5%);
526
+ }
527
+
528
+ // IE 7 + 8 can't handle box-shadow to show active, so we darken a bit ourselves
529
+ &:active,
530
+ &.active {
531
+ background-color: darken(@endColor, 10%) e("\9");
532
+ }
533
+ }
534
+
535
+ // Navbar vertical align
536
+ // -------------------------
537
+ // Vertically center elements in the navbar.
538
+ // Example: an element has a height of 30px, so write out `.navbarVerticalAlign(30px);` to calculate the appropriate top margin.
539
+ .navbarVerticalAlign(@elementHeight) {
540
+ margin-top: (@navbarHeight - @elementHeight) / 2;
541
+ }
542
+
543
+
544
+
545
+ // Grid System
546
+ // -----------
547
+
548
+ // Centered container element
549
+ .container-fixed() {
550
+ margin-right: auto;
551
+ margin-left: auto;
552
+ .clearfix();
553
+ }
554
+
555
+ // Table columns
556
+ .tableColumns(@columnSpan: 1) {
557
+ float: none; // undo default grid column styles
558
+ width: ((@gridColumnWidth) * @columnSpan) + (@gridGutterWidth * (@columnSpan - 1)) - 16; // 16 is total padding on left and right of table cells
559
+ margin-left: 0; // undo default grid column styles
560
+ }
561
+
562
+ // Make a Grid
563
+ // Use .makeRow and .makeColumn to assign semantic layouts grid system behavior
564
+ .makeRow() {
565
+ margin-left: @gridGutterWidth * -1;
566
+ .clearfix();
567
+ }
568
+ .makeColumn(@columns: 1, @offset: 0) {
569
+ float: left;
570
+ margin-left: (@gridColumnWidth * @offset) + (@gridGutterWidth * (@offset - 1)) + (@gridGutterWidth * 2);
571
+ width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1));
572
+ }
573
+
574
+ // The Grid
575
+ #grid {
576
+
577
+ .core (@gridColumnWidth, @gridGutterWidth) {
578
+
579
+ .spanX (@index) when (@index > 0) {
580
+ .span@{index} { .span(@index); }
581
+ .spanX(@index - 1);
582
+ }
583
+ .spanX (0) {}
584
+
585
+ .offsetX (@index) when (@index > 0) {
586
+ .offset@{index} { .offset(@index); }
587
+ .offsetX(@index - 1);
588
+ }
589
+ .offsetX (0) {}
590
+
591
+ .offset (@columns) {
592
+ margin-left: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns + 1));
593
+ }
594
+
595
+ .span (@columns) {
596
+ width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1));
597
+ }
598
+
599
+ .row {
600
+ margin-left: @gridGutterWidth * -1;
601
+ .clearfix();
602
+ }
603
+
604
+ [class*="span"] {
605
+ float: left;
606
+ min-height: 1px; // prevent collapsing columns
607
+ margin-left: @gridGutterWidth;
608
+ }
609
+
610
+ // Set the container width, and override it for fixed navbars in media queries
611
+ .container,
612
+ .navbar-static-top .container,
613
+ .navbar-fixed-top .container,
614
+ .navbar-fixed-bottom .container { .span(@gridColumns); }
615
+
616
+ // generate .spanX and .offsetX
617
+ .spanX (@gridColumns);
618
+ .offsetX (@gridColumns);
619
+
620
+ }
621
+
622
+ .fluid (@fluidGridColumnWidth, @fluidGridGutterWidth) {
623
+
624
+ .spanX (@index) when (@index > 0) {
625
+ .span@{index} { .span(@index); }
626
+ .spanX(@index - 1);
627
+ }
628
+ .spanX (0) {}
629
+
630
+ .offsetX (@index) when (@index > 0) {
631
+ .offset@{index} { .offset(@index); }
632
+ .offset@{index}:first-child { .offsetFirstChild(@index); }
633
+ .offsetX(@index - 1);
634
+ }
635
+ .offsetX (0) {}
636
+
637
+ .offset (@columns) {
638
+ margin-left: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1)) + (@fluidGridGutterWidth*2);
639
+ *margin-left: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1)) - (.5 / @gridRowWidth * 100 * 1%) + (@fluidGridGutterWidth*2) - (.5 / @gridRowWidth * 100 * 1%);
640
+ }
641
+
642
+ .offsetFirstChild (@columns) {
643
+ margin-left: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1)) + (@fluidGridGutterWidth);
644
+ *margin-left: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1)) - (.5 / @gridRowWidth * 100 * 1%) + @fluidGridGutterWidth - (.5 / @gridRowWidth * 100 * 1%);
645
+ }
646
+
647
+ .span (@columns) {
648
+ width: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1));
649
+ *width: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1)) - (.5 / @gridRowWidth * 100 * 1%);
650
+ }
651
+
652
+ .row-fluid {
653
+ width: 100%;
654
+ .clearfix();
655
+ [class*="span"] {
656
+ .input-block-level();
657
+ float: left;
658
+ margin-left: @fluidGridGutterWidth;
659
+ *margin-left: @fluidGridGutterWidth - (.5 / @gridRowWidth * 100 * 1%);
660
+ }
661
+ [class*="span"]:first-child {
662
+ margin-left: 0;
663
+ }
664
+
665
+ // Space grid-sized controls properly if multiple per line
666
+ .controls-row [class*="span"] + [class*="span"] {
667
+ margin-left: @fluidGridGutterWidth;
668
+ }
669
+
670
+ // generate .spanX and .offsetX
671
+ .spanX (@gridColumns);
672
+ .offsetX (@gridColumns);
673
+ }
674
+
675
+ }
676
+
677
+ .input(@gridColumnWidth, @gridGutterWidth) {
678
+
679
+ .spanX (@index) when (@index > 0) {
680
+ input.span@{index}, textarea.span@{index}, .uneditable-input.span@{index} { .span(@index); }
681
+ .spanX(@index - 1);
682
+ }
683
+ .spanX (0) {}
684
+
685
+ .span(@columns) {
686
+ width: ((@gridColumnWidth) * @columns) + (@gridGutterWidth * (@columns - 1)) - 14;
687
+ }
688
+
689
+ input,
690
+ textarea,
691
+ .uneditable-input {
692
+ margin-left: 0; // override margin-left from core grid system
693
+ }
694
+
695
+ // Space grid-sized controls properly if multiple per line
696
+ .controls-row [class*="span"] + [class*="span"] {
697
+ margin-left: @gridGutterWidth;
698
+ }
699
+
700
+ // generate .spanX
701
+ .spanX (@gridColumns);
702
+
703
+ }
704
+ }