locomotivecms_wagon 2.0.0.rc3 → 2.0.0.rc4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/generators/blank/Gemfile.tt +8 -5
  4. data/generators/blank/Guardfile +22 -0
  5. data/generators/bootstrap/Gemfile.tt +7 -4
  6. data/generators/bootstrap/Guardfile +22 -0
  7. data/generators/bootstrap/public/stylesheets/bootstrap.css +1 -1
  8. data/generators/bootstrap/public/stylesheets/bootstrap.scss +1 -1
  9. data/generators/cloned/Gemfile.tt +7 -4
  10. data/generators/cloned/Guardfile +22 -0
  11. data/generators/foundation5/Gemfile.tt +7 -4
  12. data/generators/foundation5/Guardfile +22 -0
  13. data/lib/locomotive/wagon/cli.rb +1 -1
  14. data/lib/locomotive/wagon/commands/pull_sub_commands/concerns/assets_concern.rb +1 -1
  15. data/lib/locomotive/wagon/commands/push_sub_commands/push_theme_assets_command.rb +23 -3
  16. data/lib/locomotive/wagon/commands/serve_command.rb +2 -2
  17. data/lib/locomotive/wagon/version.rb +1 -1
  18. data/locomotivecms_wagon.gemspec +4 -3
  19. data/spec/fixtures/cassettes/authenticate.yml +27 -27
  20. data/spec/fixtures/cassettes/push.yml +1036 -1110
  21. data/spec/unit/commands/pull_sub_commands/concerns/assets_concern_spec.rb +24 -4
  22. data/spec/unit/commands/push_sub_commands/push_theme_assets_command_spec.rb +42 -0
  23. metadata +28 -99
  24. data/generators/foundation5/favicon.ico +0 -0
  25. data/generators/line_case/Gemfile.tt +0 -21
  26. data/generators/line_case/app/content_types/categories.yml +0 -56
  27. data/generators/line_case/app/content_types/emails.yml +0 -35
  28. data/generators/line_case/app/content_types/projects.yml +0 -58
  29. data/generators/line_case/app/views/pages/404.liquid.haml +0 -11
  30. data/generators/line_case/app/views/pages/email-registered.liquid.haml +0 -13
  31. data/generators/line_case/app/views/pages/index.liquid.haml +0 -110
  32. data/generators/line_case/app/views/pages/projects/content_type_template.liquid.haml +0 -32
  33. data/generators/line_case/app/views/snippets/newsletter_form.liquid.haml +0 -14
  34. data/generators/line_case/app/views/snippets/projects.liquid.haml +0 -17
  35. data/generators/line_case/app/views/snippets/social_links.liquid.haml +0 -19
  36. data/generators/line_case/config/deploy.yml +0 -15
  37. data/generators/line_case/config/site.yml.tt +0 -33
  38. data/generators/line_case/config/translations.yml +0 -8
  39. data/generators/line_case/data/categories.yml +0 -8
  40. data/generators/line_case/data/emails.yml +0 -2
  41. data/generators/line_case/data/projects.yml +0 -39
  42. data/generators/line_case/icon.png +0 -0
  43. data/generators/line_case/public/images/banner-header.png +0 -0
  44. data/generators/line_case/public/javascripts/foundation.min.js +0 -15
  45. data/generators/line_case/public/javascripts/foundation/foundation.abide.js +0 -194
  46. data/generators/line_case/public/javascripts/foundation/foundation.alerts.js +0 -57
  47. data/generators/line_case/public/javascripts/foundation/foundation.clearing.js +0 -516
  48. data/generators/line_case/public/javascripts/foundation/foundation.cookie.js +0 -74
  49. data/generators/line_case/public/javascripts/foundation/foundation.dropdown.js +0 -183
  50. data/generators/line_case/public/javascripts/foundation/foundation.forms.js +0 -556
  51. data/generators/line_case/public/javascripts/foundation/foundation.interchange.js +0 -280
  52. data/generators/line_case/public/javascripts/foundation/foundation.joyride.js +0 -852
  53. data/generators/line_case/public/javascripts/foundation/foundation.js +0 -464
  54. data/generators/line_case/public/javascripts/foundation/foundation.magellan.js +0 -136
  55. data/generators/line_case/public/javascripts/foundation/foundation.orbit.js +0 -432
  56. data/generators/line_case/public/javascripts/foundation/foundation.placeholder.js +0 -426
  57. data/generators/line_case/public/javascripts/foundation/foundation.reveal.js +0 -353
  58. data/generators/line_case/public/javascripts/foundation/foundation.section.js +0 -430
  59. data/generators/line_case/public/javascripts/foundation/foundation.tooltips.js +0 -209
  60. data/generators/line_case/public/javascripts/foundation/foundation.topbar.js +0 -370
  61. data/generators/line_case/public/javascripts/vendor/custom.modernizr.js +0 -4
  62. data/generators/line_case/public/javascripts/vendor/jquery.js +0 -9789
  63. data/generators/line_case/public/javascripts/vendor/zepto.js +0 -2000
  64. data/generators/line_case/public/samples/projects/sample.jpeg +0 -0
  65. data/generators/line_case/public/samples/projects/sample2.jpeg +0 -0
  66. data/generators/line_case/public/samples/projects/sample3.jpeg +0 -0
  67. data/generators/line_case/public/samples/projects/sample4.jpeg +0 -0
  68. data/generators/line_case/public/samples/projects/sample5.jpeg +0 -0
  69. data/generators/line_case/public/samples/projects/sample6.jpeg +0 -0
  70. data/generators/line_case/public/samples/projects/sample7.jpeg +0 -0
  71. data/generators/line_case/public/samples/projects/sample8.jpeg +0 -0
  72. data/generators/line_case/public/stylesheets/_variables.css.sass +0 -20
  73. data/generators/line_case/public/stylesheets/foundation.css.scss +0 -43
  74. data/generators/line_case/public/stylesheets/foundation.min.css +0 -1
  75. data/generators/line_case/public/stylesheets/foundation/_variables.scss +0 -1290
  76. data/generators/line_case/public/stylesheets/foundation/components/_alert-boxes.scss +0 -107
  77. data/generators/line_case/public/stylesheets/foundation/components/_block-grid.scss +0 -71
  78. data/generators/line_case/public/stylesheets/foundation/components/_breadcrumbs.scss +0 -124
  79. data/generators/line_case/public/stylesheets/foundation/components/_button-groups.scss +0 -89
  80. data/generators/line_case/public/stylesheets/foundation/components/_buttons.scss +0 -230
  81. data/generators/line_case/public/stylesheets/foundation/components/_clearing.scss +0 -227
  82. data/generators/line_case/public/stylesheets/foundation/components/_custom-forms.scss +0 -278
  83. data/generators/line_case/public/stylesheets/foundation/components/_dropdown-buttons.scss +0 -115
  84. data/generators/line_case/public/stylesheets/foundation/components/_dropdown.scss +0 -151
  85. data/generators/line_case/public/stylesheets/foundation/components/_flex-video.scss +0 -46
  86. data/generators/line_case/public/stylesheets/foundation/components/_forms.scss +0 -411
  87. data/generators/line_case/public/stylesheets/foundation/components/_global.scss +0 -366
  88. data/generators/line_case/public/stylesheets/foundation/components/_grid-5.scss +0 -214
  89. data/generators/line_case/public/stylesheets/foundation/components/_grid.scss +0 -188
  90. data/generators/line_case/public/stylesheets/foundation/components/_inline-lists.scss +0 -53
  91. data/generators/line_case/public/stylesheets/foundation/components/_joyride.scss +0 -217
  92. data/generators/line_case/public/stylesheets/foundation/components/_keystrokes.scss +0 -57
  93. data/generators/line_case/public/stylesheets/foundation/components/_labels.scss +0 -85
  94. data/generators/line_case/public/stylesheets/foundation/components/_magellan.scss +0 -23
  95. data/generators/line_case/public/stylesheets/foundation/components/_orbit.scss +0 -340
  96. data/generators/line_case/public/stylesheets/foundation/components/_pagination.scss +0 -140
  97. data/generators/line_case/public/stylesheets/foundation/components/_panels.scss +0 -83
  98. data/generators/line_case/public/stylesheets/foundation/components/_pricing-tables.scss +0 -131
  99. data/generators/line_case/public/stylesheets/foundation/components/_progress-bars.scss +0 -71
  100. data/generators/line_case/public/stylesheets/foundation/components/_reveal.scss +0 -136
  101. data/generators/line_case/public/stylesheets/foundation/components/_section.scss +0 -391
  102. data/generators/line_case/public/stylesheets/foundation/components/_side-nav.scss +0 -69
  103. data/generators/line_case/public/stylesheets/foundation/components/_split-buttons.scss +0 -167
  104. data/generators/line_case/public/stylesheets/foundation/components/_sub-nav.scss +0 -84
  105. data/generators/line_case/public/stylesheets/foundation/components/_switch.scss +0 -266
  106. data/generators/line_case/public/stylesheets/foundation/components/_tables.scss +0 -84
  107. data/generators/line_case/public/stylesheets/foundation/components/_thumbs.scss +0 -53
  108. data/generators/line_case/public/stylesheets/foundation/components/_tooltips.scss +0 -117
  109. data/generators/line_case/public/stylesheets/foundation/components/_top-bar.scss +0 -576
  110. data/generators/line_case/public/stylesheets/foundation/components/_type.scss +0 -435
  111. data/generators/line_case/public/stylesheets/foundation/components/_visibility.scss +0 -322
  112. data/generators/line_case/public/stylesheets/normalize.css.scss +0 -410
  113. data/generators/line_case/public/stylesheets/pages.css.sass +0 -163
  114. data/lib/locomotive/wagon/tools/livereload.rb +0 -45
@@ -1,366 +0,0 @@
1
- //
2
- // Global Foundation Mixins
3
- //
4
-
5
- $experimental: true !default;
6
-
7
- // We use this to control border radius.
8
- @mixin radius($radius:$global-radius) {
9
- @if $radius {
10
- @if $experimental {
11
- -webkit-border-radius: $radius;
12
- }
13
- border-radius: $radius;
14
- }
15
- }
16
-
17
- // We use this to create equal side border radius on elements.
18
- @mixin side-radius($side, $radius:$global-radius) {
19
- @if $side == left {
20
- @if $experimental {
21
- -moz-border-radius-bottomleft: $radius;
22
- -moz-border-radius-topleft: $radius;
23
- -webkit-border-bottom-left-radius: $radius;
24
- -webkit-border-top-left-radius: $radius;
25
- }
26
- border-bottom-left-radius: $radius;
27
- border-top-left-radius: $radius;
28
- }
29
- @else if $side == right {
30
- @if $experimental {
31
- -moz-border-radius-topright: $radius;
32
- -moz-border-radius-bottomright: $radius;
33
- -webkit-border-top-right-radius: $radius;
34
- -webkit-border-bottom-right-radius: $radius;
35
- }
36
- border-top-right-radius: $radius;
37
- border-bottom-right-radius: $radius;
38
- }
39
- @else if $side == top {
40
- @if $experimental {
41
- -moz-border-radius-topright: $radius;
42
- -moz-border-radius-topleft: $radius;
43
- -webkit-border-top-right-radius: $radius;
44
- -webkit-border-top-left-radius: $radius;
45
- }
46
- border-top-right-radius: $radius;
47
- border-top-left-radius: $radius;
48
- }
49
- @else if $side == bottom {
50
- @if $experimental {
51
- -moz-border-radius-bottomright: $radius;
52
- -moz-border-radius-bottomleft: $radius;
53
- -webkit-border-bottom-right-radius: $radius;
54
- -webkit-border-bottom-left-radius: $radius;
55
- }
56
- border-bottom-right-radius: $radius;
57
- border-bottom-left-radius: $radius;
58
- }
59
- }
60
-
61
- // We can control whether or not we have inset shadows edges.
62
- @mixin inset-shadow($active:true) {
63
- @if $experimental {
64
- -webkit-box-shadow: $shiny-edge-size $shiny-edge-color inset;
65
- }
66
- box-shadow: $shiny-edge-size $shiny-edge-color inset;
67
-
68
- @if $active { &:active {
69
- @if $experimental {
70
- -webkit-box-shadow: $shiny-edge-size $shiny-edge-active-color inset;
71
- }
72
- box-shadow: $shiny-edge-size $shiny-edge-active-color inset; } }
73
- }
74
-
75
- // We use this to add transitions to elements
76
- @mixin single-transition($property:all, $speed:300ms, $ease:ease-out) {
77
- @if $experimental {
78
- -webkit-transition: $property $speed $ease;
79
- -moz-transition: $property $speed $ease;
80
- }
81
- transition: $property $speed $ease;
82
- }
83
-
84
- // We use this to add box-sizing across browser prefixes
85
- @mixin box-sizing($type:border-box) {
86
- @if $experimental {
87
- -moz-box-sizing: $type;
88
- -webkit-box-sizing: $type;
89
- }
90
- box-sizing: $type;
91
- }
92
-
93
- // We use this to create equilateral triangles
94
- @mixin css-triangle($triangle-size, $triangle-color, $triangle-direction) {
95
- content: "";
96
- display: block;
97
- width: 0;
98
- height: 0;
99
- border: inset $triangle-size;
100
- @if ($triangle-direction == top) {
101
- border-color: $triangle-color transparent transparent transparent;
102
- border-top-style: solid;
103
- }
104
- @if ($triangle-direction == bottom) {
105
- border-color: transparent transparent $triangle-color transparent;
106
- border-bottom-style: solid;
107
- }
108
- @if ($triangle-direction == left) {
109
- border-color: transparent transparent transparent $triangle-color;
110
- border-left-style: solid;
111
- }
112
- @if ($triangle-direction == right) {
113
- border-color: transparent $triangle-color transparent transparent;
114
- border-right-style: solid;
115
- }
116
- }
117
-
118
- // We use this to do clear floats
119
- @mixin clearfix() {
120
- *zoom:1;
121
- &:before, &:after { content: " "; display: table; }
122
- &:after { clear: both; }
123
- }
124
-
125
-
126
- // We use this to add a glowing effect to block elements
127
- @mixin block-glowing-effect($selector:focus, $fade-time:300ms, $glowing-effect-color:fade-out($primary-color, .25)) {
128
- @if $experimental {
129
- -webkit-transition: -webkit-box-shadow $fade-time, border-color $fade-time ease-in-out;
130
- -moz-transition: -moz-box-shadow $fade-time, border-color $fade-time ease-in-out;
131
- }
132
- transition: box-shadow $fade-time, border-color $fade-time ease-in-out;
133
-
134
- &:#{$selector} {
135
- @if $experimental {
136
- -webkit-box-shadow: 0 0 5px $glowing-effect-color;
137
- -moz-box-shadow: 0 0 5px $glowing-effect-color;
138
- }
139
- box-shadow: 0 0 5px $glowing-effect-color;
140
- border-color: $glowing-effect-color;
141
- }
142
- }
143
-
144
- //
145
- // Foundation Variables
146
- //
147
-
148
- // The default font-size is set to 100% of the browser style sheet (usually 16px)
149
- // for compatibility with brower-based text zoom or user-set defaults.
150
-
151
- // Since the typical default browser font-size is 16px, that makes the calculation for grid size.
152
- // If you want your base font-size to be different and not have it effect the grid breakpoints,
153
- // set $em-base to $base-font-size and make sure $base-font-size is a px value.
154
- $base-font-size: 100% !default;
155
-
156
- // $base-line-height is 24px while $base-font-size is 16px
157
- $base-line-height: 150% !default;
158
-
159
- // This is the default html and body font-size for the base em value.
160
- $em-base: 16px !default;
161
-
162
- // It strips the unit of measure and returns it
163
- @function strip-unit($num) {
164
- @return $num / ($num * 0 + 1);
165
- }
166
-
167
- // New Syntax, allows to optionally calculate on a different base value to counter compounding effect of em's.
168
- // Call with 1, 2, 3 or 4 parameters, 'px' is not required but supported
169
- // em-calc(10 20 30px 40);
170
- // Space delimited, if you want to delimit using comma's, wrap it in another pair of brackets
171
- // em-calc((10, 20, 30, 40px));
172
- // Optionally call with a different base (eg: 8px) to calculate em.
173
- // em-calc(16px 32px 48px, 8px);
174
- // If you require to comma separate your list
175
- // em-calc((16px, 32px, 48), 8px);
176
-
177
- @function convert-to-em($value, $base-value: $em-base) {
178
- $value: strip-unit($value) / strip-unit($base-value) * 1em;
179
- @if ($value == 0em) { $value: 0; } // Turn 0em into 0
180
- @return $value;
181
- }
182
-
183
- @function em-calc($values, $base-value: $em-base) {
184
- $max: length($values);
185
-
186
- @if $max == 1 { @return convert-to-em(nth($values, 1), $base-value); }
187
-
188
- $emValues: ();
189
- @for $i from 1 through $max {
190
- $emValues: append($emValues, convert-to-em(nth($values, $i), $base-value));
191
- }
192
- @return $emValues;
193
- }
194
-
195
- // Support for the old syntax
196
-
197
- @function emCalc($values){
198
- @return em-calc($values);
199
- }
200
-
201
- // Maybe you want to create rems with pixels
202
- // $rem-base: 0.625 !default; //Set the value corresponding to body font size. In this case, you should set as: body {font-size: 62.5%;}
203
- // @function remCalc($pxWidth) {
204
- // @return $pxWidth / $rem-base * 1rem;
205
- // }
206
-
207
- // We use these to control various global styles
208
- $body-bg: #fff !default;
209
- $body-font-color: #222 !default;
210
- $body-font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif !default;
211
- $body-font-weight: normal !default;
212
- $body-font-style: normal !default;
213
-
214
- // We use this to control font-smoothing
215
- $font-smoothing: subpixel-antialiased !default;
216
-
217
- // We use these to control text direction settings
218
- $text-direction: ltr !default;
219
-
220
- // NOTE: No need to change this conditional statement, $text-direction variable controls it all.
221
- $default-float: left !default;
222
- $opposite-direction: right !default;
223
- @if $text-direction == ltr {
224
- $default-float: left;
225
- $opposite-direction: right;
226
- } @else {
227
- $default-float: right;
228
- $opposite-direction: left;
229
- }
230
-
231
- // We use these as default colors throughout
232
- $primary-color: #2ba6cb !default;
233
- $secondary-color: #e9e9e9 !default;
234
- $alert-color: #c60f13 !default;
235
- $success-color: #5da423 !default;
236
-
237
- // We use these to make sure border radius matches unless we want it different.
238
- $global-radius: 3px !default;
239
- $global-rounded: 1000px !default;
240
-
241
- // We use these to control inset shadow shiny edges and depressions.
242
- $shiny-edge-size: 0 1px 0 !default;
243
- $shiny-edge-color: rgba(#fff, .5) !default;
244
- $shiny-edge-active-color: rgba(#000, .2) !default;
245
-
246
- // We use this to control whether or not CSS classes come through in the gem files.
247
- $include-html-classes: true !default;
248
- $include-print-styles: true !default;
249
- $include-html-global-classes: $include-html-classes !default;
250
-
251
- // Media Queries
252
- $small-screen: 768px !default;
253
- $medium-screen: 1280px !default;
254
- $large-screen: 1440px !default;
255
-
256
- $screen: "only screen" !default;
257
- $small: "only screen and (min-width: #{$small-screen})" !default;
258
- $medium: "only screen and (min-width:#{$medium-screen})" !default;
259
- $large: "only screen and (min-width:#{$large-screen})" !default;
260
- $landscape: "only screen and (orientation: landscape)" !default;
261
- $portrait: "only screen and (orientation: portrait)" !default;
262
-
263
- // Used to provide media query values for javascript components.
264
- // Single quotes placed around everything to convince PhantomJS to read the value.
265
- meta.foundation-mq-small {
266
- font-family: "'" + unquote($small) + "'";
267
- width: $small-screen;
268
- }
269
-
270
- meta.foundation-mq-medium {
271
- font-family: "'" + unquote($medium) + "'";
272
- width: $medium-screen;
273
- }
274
-
275
- meta.foundation-mq-large {
276
- font-family: "'" + unquote($large) + "'";
277
- width: $large-screen;
278
- }
279
-
280
- //We use this as cursors values for enabling the option of having custom cursors in the whole site's stylesheet
281
- $cursor-crosshair-value: crosshair !default;
282
- $cursor-default-value: default !default;
283
- $cursor-pointer-value: pointer !default;
284
- $cursor-help-value: help !default;
285
- $cursor-text-value: text !default;
286
-
287
-
288
- @if $include-html-global-classes {
289
-
290
- // Set box-sizing globally to handle padding and border widths
291
- *,
292
- *:before,
293
- *:after {
294
- @include box-sizing(border-box);
295
- }
296
-
297
- html,
298
- body {
299
- background: $body-bg;
300
- font-size: $base-font-size;
301
- }
302
-
303
- // Default body styles
304
- body {
305
- color: $body-font-color;
306
- padding: 0;
307
- margin: 0;
308
- font-family: $body-font-family;
309
- font-weight: $body-font-weight;
310
- font-style: $body-font-style;
311
- line-height: 1; // Set to $base-line-height to take on browser default of 150%
312
- position: relative;
313
- cursor: $cursor-default-value;
314
- }
315
-
316
- a:hover { cursor: $cursor-pointer-value; }
317
-
318
- // Grid Defaults to get images and embeds to work properly
319
- img,
320
- object,
321
- embed { max-width: 100%; height: auto; }
322
-
323
- object,
324
- embed { height: 100%; }
325
- img { -ms-interpolation-mode: bicubic; }
326
-
327
- #map_canvas,
328
- .map_canvas {
329
- img,
330
- embed,
331
- object { max-width: none !important;
332
- }
333
- }
334
-
335
- // Miscellaneous useful HTML classes
336
- .left { float: left !important; }
337
- .right { float: right !important; }
338
- .text-left { text-align: left !important; }
339
- .text-right { text-align: right !important; }
340
- .text-center { text-align: center !important; }
341
- .text-justify { text-align: justify !important; }
342
- .hide { display: none; }
343
-
344
- // Font smoothing
345
- // Antialiased font smoothing works best for light text on a dark background.
346
- // Apply to single elements instead of globally to body.
347
- // Note this only applies to webkit-based desktop browsers on the Mac.
348
- .antialiased { -webkit-font-smoothing: antialiased; }
349
-
350
- // Get rid of gap under images by making them display: inline-block; by default
351
- img {
352
- display: inline-block;
353
- vertical-align: middle;
354
- }
355
-
356
- //
357
- // Global resets for forms
358
- //
359
-
360
- // Make sure textarea takes on height automatically
361
- textarea { height: auto; min-height: 50px; }
362
-
363
- // Make select elements 100% width by default
364
- select { width: 100%; }
365
-
366
- }
@@ -1,214 +0,0 @@
1
- //
2
- // @version
3
- // 4.3.0
4
- //
5
- // @title
6
- // Grid
7
- //
8
- // @description
9
- // With a default "small-#" grid, a 640-1024px "medium-#" grid, and a 1024+ "large-#" grid, we've got you covered for any layout you can think of.
10
- //
11
-
12
- //
13
- // Grid Variables
14
- //
15
- $include-html-grid-classes: true !default;
16
- $row-width: em-calc(1000) !default;
17
- $column-gutter: em-calc(30) !default;
18
- $total-columns: 12 !default;
19
-
20
- //
21
- // Grid Calc Function
22
- //
23
- @function gridCalc($colNumber, $totalColumns) {
24
- @return percentage(($colNumber / $totalColumns));
25
- }
26
-
27
- // Right and Left "auto" for grid
28
- %right-auto { #{$opposite-direction}: auto; }
29
- %left-auto { #{$default-float}: auto; }
30
-
31
- //
32
- // Grid Mixins
33
- //
34
-
35
- // Create default, nested, and collapsed rows
36
- @mixin grid-row($behavior: false) {
37
-
38
- // use @include grid-row(nest); to include a nested row
39
- @if $behavior == nest {
40
- margin-#{$default-float}: -($column-gutter/2);
41
- margin-#{$opposite-direction}: -($column-gutter/2);
42
- max-width: none;
43
- width: auto;
44
- }
45
-
46
- // use @include grid-row(collapse); to collapsed a container row margins
47
- @else if $behavior == collapse {
48
- margin-#{$default-float}: 0;
49
- margin-#{$opposite-direction}: 0;
50
- max-width: $row-width;
51
- width: 100%;
52
- }
53
-
54
- // use @include grid-row(nest-collapse); to collapse outer margins on a nested row
55
- @else if $behavior == nest-collapse {
56
- margin-#{$default-float}: 0;
57
- margin-#{$opposite-direction}: 0;
58
- max-width: none;
59
- width: auto;
60
- }
61
-
62
- // use @include grid-row; to use a container row
63
- @else {
64
- margin-#{$default-float}: auto;
65
- margin-#{$opposite-direction}: auto;
66
- margin-top: 0;
67
- margin-bottom: 0;
68
- max-width: $row-width;
69
- width: 100%;
70
- }
71
-
72
- @include clearfix;
73
- }
74
-
75
-
76
- // For creating columns - @include these inside a media query to control small vs. large grid layouts
77
- @mixin grid-column($columns:false, $last-column:false, $center:false, $offset:false, $push:false, $pull:false, $collapse:false, $float:true, $include-position-relative: false) {
78
-
79
- // If collapsed, get rid of gutter padding
80
- @if $collapse {
81
- padding-left: 0;
82
- padding-right: 0;
83
- }
84
-
85
- // Gutter padding whenever a column isn't set to collapse
86
- // (use $collapse:null to do nothing)
87
- @else if $collapse == false {
88
- padding-left: $column-gutter / 2;
89
- padding-right: $column-gutter / 2;
90
- }
91
-
92
- // If a column number is given, calculate width
93
- @if $columns {
94
- width: gridCalc($columns, $total-columns);
95
-
96
- // If last column, float naturally instead of to the right
97
- @if $last-column { float: $opposite-direction; }
98
- }
99
-
100
- // If offset, calculate appropriate margins
101
- @if $offset { margin-#{$default-float}: gridCalc($offset, $total-columns); }
102
-
103
- // Source Ordering, adds left/right depending on which you use.
104
- @if $push { #{$default-float}: gridCalc($push, $total-columns); #{$opposite-direction}: auto; }
105
- @if $pull { #{$opposite-direction}: gridCalc($pull, $total-columns); #{$default-float}: auto; }
106
-
107
- // If centered, get rid of float and add appropriate margins
108
- @if $center {
109
- margin-#{$default-float}: auto;
110
- margin-#{$opposite-direction}: auto;
111
- float: none !important;
112
- }
113
-
114
- @if $float {
115
- @if $float == left or $float == true { float: $default-float; }
116
- @else if $float == right { float: $opposite-direction; }
117
- @else { float: none; }
118
- }
119
-
120
- // This helps us not need to repeat "position:relative" everywehere
121
- @if $include-position-relative { position: relative; }
122
- }
123
-
124
-
125
- @if $include-html-grid-classes != false {
126
- /* Grid HTML Classes */
127
- .row {
128
- @include grid-row;
129
-
130
- &.collapse {
131
- .column,
132
- .columns { @include grid-column($collapse:true); }
133
- }
134
-
135
- .row { @include grid-row($behavior:nest);
136
- &.collapse { @include grid-row($behavior:nest-collapse); }
137
- }
138
- }
139
-
140
- .column,
141
- .columns { @include grid-column($columns:$total-columns, $include-position-relative: true); }
142
-
143
- @media only screen {
144
-
145
- @for $i from 1 through $total-columns {
146
- .small#{-$i} { @include grid-column($columns:$i,$collapse:null,$float:false); }
147
- }
148
-
149
- @for $i from 0 through $total-columns - 2 {
150
- .small-offset-#{$i} { @include grid-column($offset:$i, $collapse:null,$float:false); }
151
- }
152
-
153
- [class*="column"] + [class*="column"]:last-child { float: $opposite-direction; }
154
- [class*="column"] + [class*="column"].end { float: $default-float; }
155
-
156
- .column.small-centered,
157
- .columns.small-centered { @include grid-column($center:true, $collapse:null, $float:false); }
158
- }
159
-
160
- @media only screen and (min-width: $small-screen) {
161
-
162
- @for $i from 1 through $total-columns {
163
- .medium#{-$i} { @include grid-column($columns:$i,$collapse:null,$float:false); }
164
- }
165
-
166
- @for $i from 0 through $total-columns - 1 {
167
- .medium-offset-#{$i} { @include grid-column($offset:$i, $collapse:null,$float:false); }
168
- }
169
-
170
- @for $i from 1 through $total-columns - 1 {
171
- .medium-push#{-$i} { @include grid-column($push:$i, $collapse:null, $float:false); }
172
- .medium-pull#{-$i} { @include grid-column($pull:$i, $collapse:null, $float:false); }
173
- }
174
-
175
- .column.medium-centered,
176
- .columns.medium-centered { @include grid-column($center:true, $collapse:null, $float:false); }
177
-
178
- .column.medium-uncentered,
179
- .columns.medium-uncentered {
180
- margin-#{$default-float}: 0;
181
- margin-#{$opposite-direction}: 0;
182
- float: $default-float !important;
183
- }
184
-
185
- }
186
-
187
- @media only screen and (min-width: $medium-screen) {
188
-
189
- @for $i from 1 through $total-columns {
190
- .large#{-$i} { @include grid-column($columns:$i,$collapse:null,$float:false); }
191
- }
192
-
193
- @for $i from 0 through $total-columns - 1 {
194
- .large-offset-#{$i} { @include grid-column($offset:$i, $collapse:null,$float:false); }
195
- }
196
-
197
- @for $i from 1 through $total-columns - 1 {
198
- .large-push#{-$i} { @include grid-column($push:$i, $collapse:null, $float:false); }
199
- .large-pull#{-$i} { @include grid-column($pull:$i, $collapse:null, $float:false); }
200
- }
201
-
202
- .column.large-centered,
203
- .columns.large-centered { @include grid-column($center:true, $collapse:null, $float:false); }
204
-
205
- .column.large-uncentered,
206
- .columns.large-uncentered {
207
- margin-#{$default-float}: 0;
208
- margin-#{$opposite-direction}: 0;
209
- float: $default-float !important;
210
- }
211
-
212
- }
213
-
214
- }