zurb-foundation-5 5.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. checksums.yaml +7 -0
  2. data/.bowerrc +3 -0
  3. data/.editorconfig +9 -0
  4. data/.gitignore +46 -0
  5. data/.travis.yml +34 -0
  6. data/CONTRIBUTING.md +55 -0
  7. data/Gemfile +3 -0
  8. data/Gemfile.lock +16 -0
  9. data/Gruntfile.js +222 -0
  10. data/LICENSE +22 -0
  11. data/README.md +44 -0
  12. data/bower.json +20 -0
  13. data/composer.json +9 -0
  14. data/foundation.gemspec +21 -0
  15. data/humans.txt +8 -0
  16. data/js/foundation/foundation.abide.js +299 -0
  17. data/js/foundation/foundation.accordion.js +54 -0
  18. data/js/foundation/foundation.alert.js +43 -0
  19. data/js/foundation/foundation.clearing.js +531 -0
  20. data/js/foundation/foundation.dropdown.js +306 -0
  21. data/js/foundation/foundation.equalizer.js +68 -0
  22. data/js/foundation/foundation.interchange.js +331 -0
  23. data/js/foundation/foundation.joyride.js +849 -0
  24. data/js/foundation/foundation.js +609 -0
  25. data/js/foundation/foundation.magellan.js +173 -0
  26. data/js/foundation/foundation.offcanvas.js +50 -0
  27. data/js/foundation/foundation.orbit.js +606 -0
  28. data/js/foundation/foundation.reveal.js +427 -0
  29. data/js/foundation/foundation.slider.js +200 -0
  30. data/js/foundation/foundation.tab.js +168 -0
  31. data/js/foundation/foundation.tooltip.js +272 -0
  32. data/js/foundation/foundation.topbar.js +422 -0
  33. data/karma.conf.js +114 -0
  34. data/lib/foundation/engine.rb +20 -0
  35. data/lib/foundation/generators/USAGE +15 -0
  36. data/lib/foundation/generators/install_generator.rb +54 -0
  37. data/lib/foundation/generators/templates/application.html.erb +47 -0
  38. data/lib/foundation/generators/templates/application.html.haml +31 -0
  39. data/lib/foundation/generators/templates/application.html.slim +35 -0
  40. data/lib/foundation/sprockets.rb +4 -0
  41. data/lib/foundation/version.rb +3 -0
  42. data/lib/scss.js +114 -0
  43. data/lib/zurb-foundation.rb +33 -0
  44. data/package.json +48 -0
  45. data/robots.txt +4 -0
  46. data/run-tests.sh +83 -0
  47. data/sache.json +5 -0
  48. data/scss/foundation.scss +45 -0
  49. data/scss/foundation/_functions.scss +101 -0
  50. data/scss/foundation/_settings.scss +1279 -0
  51. data/scss/foundation/components/_accordion.scss +52 -0
  52. data/scss/foundation/components/_alert-boxes.scss +126 -0
  53. data/scss/foundation/components/_block-grid.scss +132 -0
  54. data/scss/foundation/components/_breadcrumbs.scss +127 -0
  55. data/scss/foundation/components/_button-groups.scss +108 -0
  56. data/scss/foundation/components/_buttons.scss +222 -0
  57. data/scss/foundation/components/_clearing.scss +247 -0
  58. data/scss/foundation/components/_dropdown-buttons.scss +129 -0
  59. data/scss/foundation/components/_dropdown.scss +248 -0
  60. data/scss/foundation/components/_flex-video.scss +51 -0
  61. data/scss/foundation/components/_forms.scss +496 -0
  62. data/scss/foundation/components/_global.scss +365 -0
  63. data/scss/foundation/components/_grid.scss +261 -0
  64. data/scss/foundation/components/_inline-lists.scss +56 -0
  65. data/scss/foundation/components/_joyride.scss +220 -0
  66. data/scss/foundation/components/_keystrokes.scss +61 -0
  67. data/scss/foundation/components/_labels.scss +104 -0
  68. data/scss/foundation/components/_magellan.scss +34 -0
  69. data/scss/foundation/components/_offcanvas.scss +381 -0
  70. data/scss/foundation/components/_orbit.scss +415 -0
  71. data/scss/foundation/components/_pagination.scss +150 -0
  72. data/scss/foundation/components/_panels.scss +91 -0
  73. data/scss/foundation/components/_pricing-tables.scss +150 -0
  74. data/scss/foundation/components/_progress-bars.scss +79 -0
  75. data/scss/foundation/components/_range-slider.scss +148 -0
  76. data/scss/foundation/components/_reveal-new.scss +0 -0
  77. data/scss/foundation/components/_reveal.scss +216 -0
  78. data/scss/foundation/components/_side-nav.scss +93 -0
  79. data/scss/foundation/components/_split-buttons.scss +191 -0
  80. data/scss/foundation/components/_sub-nav.scss +125 -0
  81. data/scss/foundation/components/_switch.scss +294 -0
  82. data/scss/foundation/components/_tables.scss +97 -0
  83. data/scss/foundation/components/_tabs.scss +105 -0
  84. data/scss/foundation/components/_thumbs.scss +68 -0
  85. data/scss/foundation/components/_tooltips.scss +140 -0
  86. data/scss/foundation/components/_top-bar.scss +640 -0
  87. data/scss/foundation/components/_type.scss +493 -0
  88. data/scss/foundation/components/_visibility.scss +345 -0
  89. data/scss/foundation/test.html +0 -0
  90. data/scss/normalize.scss +423 -0
  91. data/spec/abide/abide.js +173 -0
  92. data/spec/abide/advanced.html +22 -0
  93. data/spec/abide/basic.html +13 -0
  94. data/spec/accordion/accordion.js +94 -0
  95. data/spec/accordion/basic.html +39 -0
  96. data/spec/accordion/grid.html +44 -0
  97. data/spec/accordion/multiexpand.html +20 -0
  98. data/spec/alert/alert.js +35 -0
  99. data/spec/alert/basic.html +4 -0
  100. data/spec/clearing/222.gif +0 -0
  101. data/spec/clearing/777.gif +0 -0
  102. data/spec/clearing/basic.html +5 -0
  103. data/spec/clearing/ccc.gif +0 -0
  104. data/spec/clearing/clearing.js +55 -0
  105. data/spec/dropdown/basic.html +10 -0
  106. data/spec/dropdown/dropdown.js +65 -0
  107. data/spec/equalizer/basic.html +24 -0
  108. data/spec/equalizer/equalizer.js +30 -0
  109. data/spec/framework/framework.js +14 -0
  110. data/spec/helpers.js +37 -0
  111. data/spec/interchange/basic.html +3 -0
  112. data/spec/interchange/interchange.js +60 -0
  113. data/spec/joyride/joyride.js +14 -0
  114. data/spec/magellan/magellan.js +14 -0
  115. data/spec/offcanvas/offcanvas.js +14 -0
  116. data/spec/orbit/orbit.js +14 -0
  117. data/spec/reveal/reveal.js +14 -0
  118. data/spec/tab/tab.js +14 -0
  119. data/spec/tooltip/tooltip.js +14 -0
  120. data/spec/topbar/multidropdown.html +60 -0
  121. data/spec/topbar/sticky.html +31 -0
  122. data/spec/topbar/topbar.js +96 -0
  123. metadata +238 -0
@@ -0,0 +1,365 @@
1
+ // Foundation by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ @import "../functions";
6
+ //
7
+ // Foundation Variables
8
+ //
9
+
10
+ // Data attribute namespace
11
+ // styles get applied to [data-mysite-plugin], etc
12
+ $namespace: false !default;
13
+
14
+ // The default font-size is set to 100% of the browser style sheet (usually 16px)
15
+ // for compatibility with browser-based text zoom or user-set defaults.
16
+
17
+ // Since the typical default browser font-size is 16px, that makes the calculation for grid size.
18
+ // If you want your base font-size to be different and not have it affect the grid breakpoints,
19
+ // set $rem-base to $base-font-size and make sure $base-font-size is a px value.
20
+ $base-font-size: 100% !default;
21
+
22
+ // $base-line-height is 24px while $base-font-size is 16px
23
+ $base-line-height: 150% !default;
24
+
25
+ //
26
+ // Global Foundation Mixins
27
+ //
28
+
29
+ // @mixins
30
+ //
31
+ // We use this to control border radius.
32
+ // $radius - Default: $global-radius || 4px
33
+ @mixin radius($radius:$global-radius) {
34
+ @if $radius {
35
+ border-radius: $radius;
36
+ }
37
+ }
38
+
39
+ // @mixins
40
+ //
41
+ // We use this to create equal side border radius on elements.
42
+ // $side - Options: left, right, top, bottom
43
+ @mixin side-radius($side, $radius:$global-radius) {
44
+ @if ($side == left or $side == right) {
45
+ border-bottom-#{$side}-radius: $radius;
46
+ border-top-#{$side}-radius: $radius;
47
+ } @else {
48
+ border-#{$side}-left-radius: $radius;
49
+ border-#{$side}-right-radius: $radius;
50
+ }
51
+ }
52
+
53
+ // @mixins
54
+ //
55
+ // We can control whether or not we have inset shadows edges.
56
+ // $active - Default: true, Options: false
57
+ @mixin inset-shadow($active:true) {
58
+ box-shadow: $shiny-edge-size $shiny-edge-color inset;
59
+
60
+ @if $active { &:active {
61
+ box-shadow: $shiny-edge-size $shiny-edge-active-color inset; } }
62
+ }
63
+
64
+ // @mixins
65
+ //
66
+ // We use this to add transitions to elements
67
+ // $property - Default: all, Options: http://www.w3.org/TR/css3-transitions/#animatable-properties
68
+ // $speed - Default: 300ms
69
+ // $ease - Default:ease-out, Options: http://css-tricks.com/almanac/properties/t/transition-timing-function/
70
+ @mixin single-transition($property:all, $speed:300ms, $ease:ease-out) {
71
+ transition: $property $speed $ease;
72
+ }
73
+
74
+ // @mixins
75
+ //
76
+ // We use this to add box-sizing across browser prefixes
77
+ @mixin box-sizing($type:border-box) {
78
+ -webkit-box-sizing: $type; // Android < 2.3, iOS < 4
79
+ -moz-box-sizing: $type; // Firefox < 29
80
+ box-sizing: $type; // Chrome, IE 8+, Opera, Safari 5.1
81
+ }
82
+
83
+ // @mixins
84
+ //
85
+ // We use this to create isosceles triangles
86
+ // $triangle-size - Used to set border-size. No default, set a px or em size.
87
+ // $triangle-color - Used to set border-color which makes up triangle. No default
88
+ // $triangle-direction - Used to determine which direction triangle points. Options: top, bottom, left, right
89
+ @mixin css-triangle($triangle-size, $triangle-color, $triangle-direction) {
90
+ content: "";
91
+ display: block;
92
+ width: 0;
93
+ height: 0;
94
+ border: inset $triangle-size;
95
+ @if ($triangle-direction == top) {
96
+ border-color: $triangle-color transparent transparent transparent;
97
+ border-top-style: solid;
98
+ }
99
+ @if ($triangle-direction == bottom) {
100
+ border-color: transparent transparent $triangle-color transparent;
101
+ border-bottom-style: solid;
102
+ }
103
+ @if ($triangle-direction == left) {
104
+ border-color: transparent transparent transparent $triangle-color;
105
+ border-left-style: solid;
106
+ }
107
+ @if ($triangle-direction == right) {
108
+ border-color: transparent $triangle-color transparent transparent;
109
+ border-right-style: solid;
110
+ }
111
+ }
112
+
113
+ // We use this to do clear floats
114
+ @mixin clearfix {
115
+ *zoom:1;
116
+ &:before, &:after { content: " "; display: table; }
117
+ &:after { clear: both; }
118
+ }
119
+
120
+ // @mixins
121
+ //
122
+ // We use this to add a glowing effect to block elements
123
+ // $selector - Used for selector state. Default: focus, Options: hover, active, visited
124
+ // $fade-time - Default: 300ms
125
+ // $glowing-effect-color - Default: fade-out($primary-color, .25)
126
+ @mixin block-glowing-effect($selector:focus, $fade-time:300ms, $glowing-effect-color:fade-out($primary-color, .25)) {
127
+ transition: box-shadow $fade-time, border-color $fade-time ease-in-out;
128
+
129
+ &:#{$selector} {
130
+ box-shadow: 0 0 5px $glowing-effect-color;
131
+ border-color: $glowing-effect-color;
132
+ }
133
+ }
134
+
135
+ // @mixins
136
+ //
137
+ // We use this to translate elements in 2D
138
+ // $horizontal: Default: 0
139
+ // $vertical: Default: 0
140
+ @mixin translate2d($horizontal:0, $vertical:0) {
141
+ transform: translate($horizontal,$vertical)
142
+ }
143
+
144
+ // @mixins
145
+ //
146
+ // Makes an element visually hidden, but accessible.
147
+ // @see http://snook.ca/archives/html_and_css/hiding-content-for-accessibility
148
+ @mixin element-invisible {
149
+ position: absolute !important;
150
+ height: 1px;
151
+ width: 1px;
152
+ overflow: hidden;
153
+ clip: rect(1px, 1px, 1px, 1px);
154
+ }
155
+
156
+ // @mixins
157
+ //
158
+ // Turns off the element-invisible effect.
159
+ @mixin element-invisible-off {
160
+ position: static !important;
161
+ height: auto;
162
+ width: auto;
163
+ overflow: visible;
164
+ clip: auto;
165
+ }
166
+
167
+ // We use these to control various global styles
168
+ $body-bg: #fff !default;
169
+ $body-font-color: #222 !default;
170
+ $body-font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif !default;
171
+ $body-font-weight: normal !default;
172
+ $body-font-style: normal !default;
173
+
174
+ // We use this to control font-smoothing
175
+ $font-smoothing: antialiased !default;
176
+
177
+ // We use these to control text direction settings
178
+ $text-direction: ltr !default;
179
+ $default-float: left !default;
180
+ $opposite-direction: right !default;
181
+ @if $text-direction == ltr {
182
+ $default-float: left;
183
+ $opposite-direction: right;
184
+ } @else {
185
+ $default-float: right;
186
+ $opposite-direction: left;
187
+ }
188
+ // We use these as default colors throughout
189
+ $primary-color: #008CBA !default;
190
+ $secondary-color: #e7e7e7 !default;
191
+ $alert-color: #f04124 !default;
192
+ $success-color: #43AC6A !default;
193
+ $warning-color: #f08a24 !default;
194
+ $info-color: #a0d3e8 !default;
195
+
196
+ // We use these to make sure border radius matches unless we want it different.
197
+ $global-radius: 3px !default;
198
+ $global-rounded: 1000px !default;
199
+
200
+ // We use these to control inset shadow shiny edges and depressions.
201
+ $shiny-edge-size: 0 1px 0 !default;
202
+ $shiny-edge-color: rgba(#fff, .5) !default;
203
+ $shiny-edge-active-color: rgba(#000, .2) !default;
204
+
205
+ // We use this to control whether or not CSS classes come through in the gem files.
206
+ $include-html-classes: true !default;
207
+ $include-print-styles: true !default;
208
+ $include-html-global-classes: $include-html-classes !default;
209
+
210
+ $column-gutter: rem-calc(30) !default;
211
+
212
+ // Media Query Ranges
213
+ $small-range: (0em, 40em) !default;
214
+ $medium-range: (40.063em, 64em) !default;
215
+ $large-range: (64.063em, 90em) !default;
216
+ $xlarge-range: (90.063em, 120em) !default;
217
+ $xxlarge-range: (120.063em, 99999999em) !default;
218
+
219
+
220
+ $screen: "only screen" !default;
221
+
222
+ $landscape: "#{$screen} and (orientation: landscape)" !default;
223
+ $portrait: "#{$screen} and (orientation: portrait)" !default;
224
+
225
+ $small-up: $screen !default;
226
+ $small-only: "#{$screen} and (max-width: #{upper-bound($small-range)})" !default;
227
+
228
+ $medium-up: "#{$screen} and (min-width:#{lower-bound($medium-range)})" !default;
229
+ $medium-only: "#{$screen} and (min-width:#{lower-bound($medium-range)}) and (max-width:#{upper-bound($medium-range)})" !default;
230
+
231
+ $large-up: "#{$screen} and (min-width:#{lower-bound($large-range)})" !default;
232
+ $large-only: "#{$screen} and (min-width:#{lower-bound($large-range)}) and (max-width:#{upper-bound($large-range)})" !default;
233
+
234
+ $xlarge-up: "#{$screen} and (min-width:#{lower-bound($xlarge-range)})" !default;
235
+ $xlarge-only: "#{$screen} and (min-width:#{lower-bound($xlarge-range)}) and (max-width:#{upper-bound($xlarge-range)})" !default;
236
+
237
+ $xxlarge-up: "#{$screen} and (min-width:#{lower-bound($xxlarge-range)})" !default;
238
+ $xxlarge-only: "#{$screen} and (min-width:#{lower-bound($xxlarge-range)}) and (max-width:#{upper-bound($xxlarge-range)})" !default;
239
+
240
+ // Legacy
241
+ $small: $medium-up;
242
+ $medium: $medium-up;
243
+ $large: $large-up;
244
+
245
+
246
+ //We use this as cursors values for enabling the option of having custom cursors in the whole site's stylesheet
247
+ $cursor-crosshair-value: crosshair !default;
248
+ $cursor-default-value: default !default;
249
+ $cursor-pointer-value: pointer !default;
250
+ $cursor-help-value: help !default;
251
+ $cursor-text-value: text !default;
252
+
253
+
254
+ @include exports("global") {
255
+
256
+ // Meta styles are included in all builds, as they are a dependancy of the Javascript.
257
+ // Used to provide media query values for javascript components.
258
+ // Forward slash placed around everything to convince PhantomJS to read the value.
259
+
260
+ meta.foundation-version {
261
+ font-family: "/5.2.2/";
262
+ }
263
+
264
+ meta.foundation-mq-small {
265
+ font-family: "/" + unquote($small-up) + "/";
266
+ width: lower-bound($small-range);
267
+ }
268
+
269
+ meta.foundation-mq-medium {
270
+ font-family: "/" + unquote($medium-up) + "/";
271
+ width: lower-bound($medium-range);
272
+ }
273
+
274
+ meta.foundation-mq-large {
275
+ font-family: "/" + unquote($large-up) + "/";
276
+ width: lower-bound($large-range);
277
+ }
278
+
279
+ meta.foundation-mq-xlarge {
280
+ font-family: "/" + unquote($xlarge-up) + "/";
281
+ width: lower-bound($xlarge-range);
282
+ }
283
+
284
+ meta.foundation-mq-xxlarge {
285
+ font-family: "/" + unquote($xxlarge-up) + "/";
286
+ width: lower-bound($xxlarge-range);
287
+ }
288
+
289
+ meta.foundation-data-attribute-namespace {
290
+ font-family: #{$namespace};
291
+ }
292
+
293
+ @if $include-html-global-classes {
294
+
295
+ // Must be 100% for off canvas to work
296
+ html, body { height: 100%; }
297
+
298
+ // Set box-sizing globally to handle padding and border widths
299
+ *,
300
+ *:before,
301
+ *:after {
302
+ @include box-sizing(border-box);
303
+ }
304
+
305
+ html,
306
+ body { font-size: $base-font-size; }
307
+
308
+ // Default body styles
309
+ body {
310
+ background: $body-bg;
311
+ color: $body-font-color;
312
+ padding: 0;
313
+ margin: 0;
314
+ font-family: $body-font-family;
315
+ font-weight: $body-font-weight;
316
+ font-style: $body-font-style;
317
+ line-height: 1; // Set to $base-line-height to take on browser default of 150%
318
+ position: relative;
319
+ cursor: $cursor-default-value;
320
+ }
321
+
322
+ a:hover { cursor: $cursor-pointer-value; }
323
+
324
+ // Grid Defaults to get images and embeds to work properly
325
+ img { max-width: 100%; height: auto; }
326
+
327
+ img { -ms-interpolation-mode: bicubic; }
328
+
329
+ #map_canvas,
330
+ .map_canvas {
331
+ img,
332
+ embed,
333
+ object { max-width: none !important;
334
+ }
335
+ }
336
+
337
+ // Miscellaneous useful HTML classes
338
+ .left { float: left !important; }
339
+ .right { float: right !important; }
340
+ .clearfix { @include clearfix; }
341
+ .hide { display: none; }
342
+
343
+ // Font smoothing
344
+ // Antialiased font smoothing works best for light text on a dark background.
345
+ // Apply to single elements instead of globally to body.
346
+ // Note this only applies to webkit-based desktop browsers and Firefox 25 (and later) on the Mac.
347
+ .antialiased { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
348
+
349
+ // Get rid of gap under images by making them display: inline-block; by default
350
+ img {
351
+ display: inline-block;
352
+ vertical-align: middle;
353
+ }
354
+
355
+ //
356
+ // Global resets for forms
357
+ //
358
+
359
+ // Make sure textarea takes on height automatically
360
+ textarea { height: auto; min-height: 50px; }
361
+
362
+ // Make select elements 100% width by default
363
+ select { width: 100%; }
364
+ }
365
+ }
@@ -0,0 +1,261 @@
1
+ // Foundation by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ @import "global";
6
+
7
+ //
8
+ // @variables
9
+ //
10
+ $include-html-grid-classes: $include-html-classes !default;
11
+ $include-xl-html-grid-classes: false !default;
12
+
13
+ $row-width: rem-calc(1000) !default;
14
+ $total-columns: 12 !default;
15
+
16
+ //
17
+ // Grid Functions
18
+ //
19
+
20
+ // Deprecated: We'll drop support for this in 5.1, use grid-calc()
21
+ @function gridCalc($colNumber, $totalColumns) {
22
+ @warn "gridCalc() is deprecated, use grid-calc()";
23
+ @return grid-calc($colNumber, $totalColumns);
24
+ }
25
+
26
+ // @FUNCTION
27
+ // $colNumber - Found in settings file
28
+ // $totalColumns - Found in settings file
29
+ @function grid-calc($colNumber, $totalColumns) {
30
+ @return percentage(($colNumber / $totalColumns));
31
+ }
32
+
33
+ //
34
+ // @mixins
35
+ //
36
+
37
+ // For creating container, nested, and collapsed rows.
38
+ //
39
+ //
40
+ // $behavior - Any special behavior for this row? Default: false. Options: nest, collapse, nest-collapse, false.
41
+ @mixin grid-row($behavior: false) {
42
+
43
+ // use @include grid-row(nest); to include a nested row
44
+ @if $behavior == nest {
45
+ width: auto;
46
+ margin-#{$default-float}: -($column-gutter/2);
47
+ margin-#{$opposite-direction}: -($column-gutter/2);
48
+ margin-top: 0;
49
+ margin-bottom: 0;
50
+ max-width: none;
51
+ }
52
+
53
+ // use @include grid-row(collapse); to collapsed a container row margins
54
+ @else if $behavior == collapse {
55
+ width: 100%;
56
+ margin: 0;
57
+ max-width: $row-width;
58
+ }
59
+
60
+ // use @include grid-row(nest-collapse); to collapse outer margins on a nested row
61
+ @else if $behavior == nest-collapse {
62
+ width: auto;
63
+ margin: 0;
64
+ max-width: none;
65
+ }
66
+
67
+ // use @include grid-row; to use a container row
68
+ @else {
69
+ width: 100%;
70
+ margin-#{$default-float}: auto;
71
+ margin-#{$opposite-direction}: auto;
72
+ margin-top: 0;
73
+ margin-bottom: 0;
74
+ max-width: $row-width;
75
+ }
76
+
77
+ // Clearfix for all rows
78
+ @include clearfix();
79
+ }
80
+
81
+ // Creates a column, should be used inside of a media query to control layouts
82
+ //
83
+ // $columns - The number of columns this should be
84
+ // $last-column - Is this the last column? Default: false.
85
+ // $center - Center these columns? Default: false.
86
+ // $offset - # of columns to offset. Default: false.
87
+ // $push - # of columns to push. Default: false.
88
+ // $pull - # of columns to pull. Default: false.
89
+ // $collapse - Get rid of gutter padding on column? Default: false.
90
+ // $float - Should this float? Default: true. Options: true, false, left, right.
91
+ @mixin grid-column(
92
+ $columns:false,
93
+ $last-column:false,
94
+ $center:false,
95
+ $offset:false,
96
+ $push:false,
97
+ $pull:false,
98
+ $collapse:false,
99
+ $float:true,
100
+ $position:false) {
101
+
102
+ // If positioned for default .column, include relative position
103
+ // push and pull require position set
104
+ @if $position or $push or $pull {
105
+ position: relative;
106
+ }
107
+
108
+ // If collapsed, get rid of gutter padding
109
+ @if $collapse {
110
+ padding-left: 0;
111
+ padding-right: 0;
112
+ }
113
+
114
+ // Gutter padding whenever a column isn't set to collapse
115
+ // (use $collapse:null to do nothing)
116
+ @else if $collapse == false {
117
+ padding-left: $column-gutter / 2;
118
+ padding-right: $column-gutter / 2;
119
+ }
120
+
121
+ // If a column number is given, calculate width
122
+ @if $columns {
123
+ width: grid-calc($columns, $total-columns);
124
+
125
+ // If last column, float naturally instead of to the right
126
+ @if $last-column { float: $opposite-direction; }
127
+ }
128
+
129
+ // Source Ordering, adds left/right depending on which you use.
130
+ @if $push { #{$default-float}: grid-calc($push, $total-columns); #{$opposite-direction}: auto; }
131
+ @if $pull { #{$opposite-direction}: grid-calc($pull, $total-columns); #{$default-float}: auto; }
132
+
133
+ @if $float {
134
+ @if $float == left or $float == true { float: $default-float; }
135
+ @else if $float == right { float: $opposite-direction; }
136
+ @else { float: none; }
137
+ }
138
+
139
+ // If centered, get rid of float and add appropriate margins
140
+ @if $center {
141
+ margin-#{$default-float}: auto;
142
+ margin-#{$opposite-direction}: auto;
143
+ float: none;
144
+ }
145
+
146
+ // If offset, calculate appropriate margins
147
+ @if $offset { margin-#{$default-float}: grid-calc($offset, $total-columns) !important; }
148
+
149
+ }
150
+
151
+ // Create presentational classes for grid
152
+ //
153
+ // $size - Name of class to use, i.e. "large" will generate .large-1, .large-2, etc.
154
+ @mixin grid-html-classes($size) {
155
+
156
+ @for $i from 0 through $total-columns - 1 {
157
+ .#{$size}-push-#{$i} {
158
+ @include grid-column($push:$i, $collapse:null, $float:false);
159
+ }
160
+ .#{$size}-pull-#{$i} {
161
+ @include grid-column($pull:$i, $collapse:null, $float:false);
162
+ }
163
+ }
164
+
165
+ .column,
166
+ .columns { @include grid-column($columns:false, $position:true); }
167
+
168
+
169
+ @for $i from 1 through $total-columns {
170
+ .#{$size}-#{$i} { @include grid-column($columns:$i,$collapse:null,$float:false); }
171
+ }
172
+
173
+ [class*="column"] + [class*="column"]:last-child { float: $opposite-direction; }
174
+ [class*="column"] + [class*="column"].end { float: $default-float; }
175
+
176
+
177
+ @for $i from 0 through $total-columns - 1 {
178
+ .#{$size}-offset-#{$i} { @include grid-column($offset:$i, $collapse:null,$float:false); }
179
+ }
180
+ .#{$size}-reset-order,
181
+ .#{$size}-reset-order {
182
+ margin-#{$default-float}: 0;
183
+ margin-#{$opposite-direction}: 0;
184
+ left: auto;
185
+ right: auto;
186
+ float: $default-float;
187
+ }
188
+
189
+ .column.#{$size}-centered,
190
+ .columns.#{$size}-centered { @include grid-column($center:true, $collapse:null, $float:false); }
191
+
192
+ .column.#{$size}-uncentered,
193
+ .columns.#{$size}-uncentered {
194
+ margin-#{$default-float}: 0;
195
+ margin-#{$opposite-direction}: 0;
196
+ float: $default-float !important;
197
+ }
198
+
199
+ .column.#{$size}-uncentered.opposite,
200
+ .columns.#{$size}-uncentered.opposite {
201
+ float: $opposite-direction;
202
+ }
203
+ }
204
+
205
+ @include exports("grid") {
206
+ @if $include-html-grid-classes {
207
+ .row {
208
+ @include grid-row;
209
+
210
+ &.collapse {
211
+ > .column,
212
+ > .columns { @include grid-column($collapse:true, $float:false); }
213
+
214
+ .row {margin-left:0; margin-right:0;}
215
+ }
216
+
217
+ .row { @include grid-row($behavior:nest);
218
+ &.collapse { @include grid-row($behavior:nest-collapse); }
219
+ }
220
+ }
221
+
222
+ .column,
223
+ .columns { @include grid-column($columns:$total-columns); }
224
+
225
+ @media #{$small-up} {
226
+ @include grid-html-classes($size:small);
227
+ }
228
+
229
+ @media #{$medium-up} {
230
+ @include grid-html-classes($size:medium);
231
+ // Old push and pull classes
232
+ @for $i from 0 through $total-columns - 1 {
233
+ .push-#{$i} {
234
+ @include grid-column($push:$i, $collapse:null, $float:false);
235
+ }
236
+ .pull-#{$i} {
237
+ @include grid-column($pull:$i, $collapse:null, $float:false);
238
+ }
239
+ }
240
+ }
241
+ @media #{$large-up} {
242
+ @include grid-html-classes($size:large);
243
+ @for $i from 0 through $total-columns - 1 {
244
+ .push-#{$i} {
245
+ @include grid-column($push:$i, $collapse:null, $float:false);
246
+ }
247
+ .pull-#{$i} {
248
+ @include grid-column($pull:$i, $collapse:null, $float:false);
249
+ }
250
+ }
251
+ }
252
+ }
253
+ @if $include-xl-html-grid-classes {
254
+ @media #{$xlarge-up} {
255
+ @include grid-html-classes($size:xlarge);
256
+ }
257
+ @media #{$xxlarge-up} {
258
+ @include grid-html-classes($size:xxlarge);
259
+ }
260
+ }
261
+ }