jekyll-theme-foundation 0.1.0

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 (137) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/README.md +48 -0
  4. data/_includes/google-analytics.html +8 -0
  5. data/_includes/head.html +17 -0
  6. data/_includes/scripts.html +4 -0
  7. data/_layouts/default.html +16 -0
  8. data/_layouts/home.html +5 -0
  9. data/_layouts/page.html +5 -0
  10. data/_layouts/post.html +5 -0
  11. data/_sass/_vendor/normalize-scss/sass/_normalize.scss +3 -0
  12. data/_sass/_vendor/normalize-scss/sass/normalize/_import-now.scss +11 -0
  13. data/_sass/_vendor/normalize-scss/sass/normalize/_normalize-mixin.scss +676 -0
  14. data/_sass/_vendor/normalize-scss/sass/normalize/_variables.scss +36 -0
  15. data/_sass/_vendor/normalize-scss/sass/normalize/_vertical-rhythm.scss +61 -0
  16. data/_sass/_vendor/sassy-lists/stylesheets/functions/_contain.scss +31 -0
  17. data/_sass/_vendor/sassy-lists/stylesheets/functions/_purge.scss +38 -0
  18. data/_sass/_vendor/sassy-lists/stylesheets/functions/_remove.scss +31 -0
  19. data/_sass/_vendor/sassy-lists/stylesheets/functions/_replace.scss +46 -0
  20. data/_sass/_vendor/sassy-lists/stylesheets/functions/_to-list.scss +27 -0
  21. data/_sass/_vendor/sassy-lists/stylesheets/helpers/_missing-dependencies.scss +25 -0
  22. data/_sass/_vendor/sassy-lists/stylesheets/helpers/_true.scss +13 -0
  23. data/_sass/assets/foundation-float.scss +5 -0
  24. data/_sass/assets/foundation-prototype.scss +3 -0
  25. data/_sass/assets/foundation-rtl.scss +5 -0
  26. data/_sass/assets/foundation.scss +3 -0
  27. data/_sass/jekyll-theme-foundation.scss +5 -0
  28. data/_sass/scss/_global.scss +249 -0
  29. data/_sass/scss/components/_accordion-menu.scss +171 -0
  30. data/_sass/scss/components/_accordion.scss +155 -0
  31. data/_sass/scss/components/_badge.scss +63 -0
  32. data/_sass/scss/components/_breadcrumbs.scss +117 -0
  33. data/_sass/scss/components/_button-group.scss +253 -0
  34. data/_sass/scss/components/_button.scss +385 -0
  35. data/_sass/scss/components/_callout.scss +106 -0
  36. data/_sass/scss/components/_card.scss +129 -0
  37. data/_sass/scss/components/_close-button.scss +102 -0
  38. data/_sass/scss/components/_drilldown.scss +142 -0
  39. data/_sass/scss/components/_dropdown-menu.scss +274 -0
  40. data/_sass/scss/components/_dropdown.scss +79 -0
  41. data/_sass/scss/components/_flex-video.scss +1 -0
  42. data/_sass/scss/components/_flex.scss +117 -0
  43. data/_sass/scss/components/_float.scss +27 -0
  44. data/_sass/scss/components/_label.scss +64 -0
  45. data/_sass/scss/components/_media-object.scss +114 -0
  46. data/_sass/scss/components/_menu-icon.scss +9 -0
  47. data/_sass/scss/components/_menu.scss +495 -0
  48. data/_sass/scss/components/_off-canvas.scss +506 -0
  49. data/_sass/scss/components/_orbit.scss +196 -0
  50. data/_sass/scss/components/_pagination.scss +193 -0
  51. data/_sass/scss/components/_progress-bar.scss +64 -0
  52. data/_sass/scss/components/_responsive-embed.scss +70 -0
  53. data/_sass/scss/components/_reveal.scss +180 -0
  54. data/_sass/scss/components/_slider.scss +137 -0
  55. data/_sass/scss/components/_sticky.scss +39 -0
  56. data/_sass/scss/components/_switch.scss +247 -0
  57. data/_sass/scss/components/_table.scss +330 -0
  58. data/_sass/scss/components/_tabs.scss +196 -0
  59. data/_sass/scss/components/_thumbnail.scss +67 -0
  60. data/_sass/scss/components/_title-bar.scss +84 -0
  61. data/_sass/scss/components/_tooltip.scss +160 -0
  62. data/_sass/scss/components/_top-bar.scss +175 -0
  63. data/_sass/scss/components/_visibility.scss +132 -0
  64. data/_sass/scss/forms/_checkbox.scss +41 -0
  65. data/_sass/scss/forms/_error.scss +88 -0
  66. data/_sass/scss/forms/_fieldset.scss +53 -0
  67. data/_sass/scss/forms/_forms.scss +34 -0
  68. data/_sass/scss/forms/_help-text.scss +30 -0
  69. data/_sass/scss/forms/_input-group.scss +142 -0
  70. data/_sass/scss/forms/_label.scss +50 -0
  71. data/_sass/scss/forms/_meter.scss +116 -0
  72. data/_sass/scss/forms/_progress.scss +94 -0
  73. data/_sass/scss/forms/_range.scss +149 -0
  74. data/_sass/scss/forms/_select.scss +86 -0
  75. data/_sass/scss/forms/_text.scss +179 -0
  76. data/_sass/scss/foundation.scss +133 -0
  77. data/_sass/scss/grid/_classes.scss +176 -0
  78. data/_sass/scss/grid/_column.scss +112 -0
  79. data/_sass/scss/grid/_flex-grid.scss +259 -0
  80. data/_sass/scss/grid/_grid.scss +48 -0
  81. data/_sass/scss/grid/_gutter.scss +82 -0
  82. data/_sass/scss/grid/_layout.scss +76 -0
  83. data/_sass/scss/grid/_position.scss +76 -0
  84. data/_sass/scss/grid/_row.scss +99 -0
  85. data/_sass/scss/grid/_size.scss +24 -0
  86. data/_sass/scss/prototype/_arrow.scss +36 -0
  87. data/_sass/scss/prototype/_border-box.scss +35 -0
  88. data/_sass/scss/prototype/_border-none.scss +35 -0
  89. data/_sass/scss/prototype/_bordered.scss +54 -0
  90. data/_sass/scss/prototype/_box.scss +23 -0
  91. data/_sass/scss/prototype/_display.scss +50 -0
  92. data/_sass/scss/prototype/_font-styling.scss +95 -0
  93. data/_sass/scss/prototype/_list-style-type.scss +95 -0
  94. data/_sass/scss/prototype/_overflow.scss +72 -0
  95. data/_sass/scss/prototype/_position.scss +114 -0
  96. data/_sass/scss/prototype/_prototype.scss +87 -0
  97. data/_sass/scss/prototype/_relation.scss +157 -0
  98. data/_sass/scss/prototype/_rotate.scss +31 -0
  99. data/_sass/scss/prototype/_rounded.scss +54 -0
  100. data/_sass/scss/prototype/_separator.scss +96 -0
  101. data/_sass/scss/prototype/_shadow.scss +43 -0
  102. data/_sass/scss/prototype/_sizing.scss +73 -0
  103. data/_sass/scss/prototype/_spacing.scss +204 -0
  104. data/_sass/scss/prototype/_text-decoration.scss +48 -0
  105. data/_sass/scss/prototype/_text-transformation.scss +48 -0
  106. data/_sass/scss/prototype/_text-utilities.scss +88 -0
  107. data/_sass/scss/settings/_settings.scss +869 -0
  108. data/_sass/scss/typography/_alignment.scss +22 -0
  109. data/_sass/scss/typography/_base.scss +509 -0
  110. data/_sass/scss/typography/_helpers.scss +80 -0
  111. data/_sass/scss/typography/_print.scss +86 -0
  112. data/_sass/scss/typography/_typography.scss +26 -0
  113. data/_sass/scss/util/_breakpoint.scss +348 -0
  114. data/_sass/scss/util/_color.scss +129 -0
  115. data/_sass/scss/util/_direction.scss +31 -0
  116. data/_sass/scss/util/_flex.scss +85 -0
  117. data/_sass/scss/util/_math.scss +72 -0
  118. data/_sass/scss/util/_mixins.scss +313 -0
  119. data/_sass/scss/util/_selector.scss +41 -0
  120. data/_sass/scss/util/_typography.scss +26 -0
  121. data/_sass/scss/util/_unit.scss +152 -0
  122. data/_sass/scss/util/_util.scss +14 -0
  123. data/_sass/scss/util/_value.scss +160 -0
  124. data/_sass/scss/xy-grid/_cell.scss +169 -0
  125. data/_sass/scss/xy-grid/_classes.scss +476 -0
  126. data/_sass/scss/xy-grid/_collapse.scss +74 -0
  127. data/_sass/scss/xy-grid/_frame.scss +85 -0
  128. data/_sass/scss/xy-grid/_grid.scss +35 -0
  129. data/_sass/scss/xy-grid/_gutters.scss +45 -0
  130. data/_sass/scss/xy-grid/_layout.scss +33 -0
  131. data/_sass/scss/xy-grid/_position.scss +28 -0
  132. data/_sass/scss/xy-grid/_xy-grid.scss +51 -0
  133. data/assets/css/main.scss +5 -0
  134. data/assets/css/motion-ui.min.css +1 -0
  135. data/assets/js/foundation.min.js +5 -0
  136. data/assets/js/motion-ui.min.js +1 -0
  137. metadata +235 -0
@@ -0,0 +1,176 @@
1
+ // Foundation for Sites by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group grid
7
+ ////
8
+
9
+ /// Outputs CSS classes for the grid.
10
+ /// @access private
11
+ @mixin foundation-grid(
12
+ $row: 'row',
13
+ $column: 'column',
14
+ $column-row: 'column-row',
15
+ $gutter: 'gutter',
16
+ $push: 'push',
17
+ $pull: 'pull',
18
+ $center: 'centered',
19
+ $uncenter: 'uncentered',
20
+ $collapse: 'collapse',
21
+ $uncollapse: 'uncollapse',
22
+ $offset: 'offset',
23
+ $end: 'end',
24
+ $expanded: 'expanded',
25
+ $block: 'block'
26
+ ) {
27
+ // Row
28
+ .#{$row} {
29
+ @include grid-row;
30
+
31
+ // Collapsing
32
+ &.#{$collapse} {
33
+ > .#{$column} {
34
+ @include grid-col-collapse;
35
+ }
36
+ }
37
+
38
+ // Nesting
39
+ & .#{$row} {
40
+ @include grid-row-nest($grid-column-gutter);
41
+
42
+ &.#{$collapse} {
43
+ margin-right: 0;
44
+ margin-left: 0;
45
+ }
46
+ }
47
+
48
+ // Expanded (full-width) row
49
+ &.#{$expanded} {
50
+ @include grid-row-size(expand);
51
+
52
+ .#{$row} {
53
+ margin-right: auto;
54
+ margin-left: auto;
55
+ }
56
+ }
57
+
58
+ &:not(.#{$expanded}) .#{$row} {
59
+ @include grid-row-size(expand);
60
+ }
61
+
62
+ @if type-of($grid-column-gutter) == 'map' {
63
+ // Static (unresponsive) row gutters
64
+ //
65
+ @each $breakpoint, $value in $grid-column-gutter {
66
+ &.#{$gutter}-#{$breakpoint} {
67
+ > .#{$column} {
68
+ @include grid-col-gutter($value);
69
+ }
70
+ }
71
+ }
72
+ }
73
+ }
74
+
75
+ // Column
76
+ .#{$column} {
77
+ @include grid-col;
78
+
79
+ @if $grid-column-align-edge {
80
+ &.#{$end} {
81
+ @include grid-col-end;
82
+ }
83
+ }
84
+ }
85
+
86
+ // Column row
87
+ // The double .row class is needed to bump up the specificity
88
+ .#{$column}.#{$row}.#{$row} {
89
+ float: none;
90
+ }
91
+
92
+ // To properly nest a column row, padding and margin is removed
93
+ .#{$row} .#{$column}.#{$row}.#{$row} {
94
+ margin-right: 0;
95
+ margin-left: 0;
96
+ padding-right: 0;
97
+ padding-left: 0;
98
+ }
99
+
100
+ @include -zf-each-breakpoint {
101
+ @for $i from 1 through $grid-column-count {
102
+ // Column width
103
+ .#{$-zf-size}-#{$i} {
104
+ @include grid-col-size($i);
105
+ }
106
+
107
+ // Source ordering
108
+ @if $i < $grid-column-count {
109
+ .#{$-zf-size}-#{$push}-#{$i} {
110
+ @include grid-col-pos($i);
111
+ }
112
+
113
+ .#{$-zf-size}-#{$pull}-#{$i} {
114
+ @include grid-col-pos(-$i);
115
+ }
116
+ }
117
+
118
+ // Offsets
119
+ $o: $i - 1;
120
+
121
+ .#{$-zf-size}-#{$offset}-#{$o} {
122
+ @include grid-col-off($o);
123
+ }
124
+ }
125
+
126
+ // Block grid
127
+ @for $i from 1 through $block-grid-max {
128
+ .#{$-zf-size}-up-#{$i} {
129
+ @include grid-layout($i, '.#{$column}');
130
+ }
131
+ }
132
+
133
+ // Responsive collapsing
134
+ .#{$-zf-size}-#{$collapse} {
135
+ > .#{$column} { @include grid-col-collapse; }
136
+
137
+ .#{$row} {
138
+ margin-right: 0;
139
+ margin-left: 0;
140
+ }
141
+ }
142
+
143
+ .#{$expanded}.#{$row} .#{$-zf-size}-#{$collapse}.#{$row} {
144
+ margin-right: 0;
145
+ margin-left: 0;
146
+ }
147
+
148
+ .#{$-zf-size}-#{$uncollapse} {
149
+ > .#{$column} { @include grid-col-gutter($-zf-size); }
150
+ }
151
+
152
+ // Positioning
153
+ .#{$-zf-size}-#{$center} {
154
+ @include grid-col-pos(center);
155
+ }
156
+
157
+ // Gutter adjustment
158
+ .#{$-zf-size}-#{$uncenter},
159
+ .#{$-zf-size}-#{$push}-0,
160
+ .#{$-zf-size}-#{$pull}-0 {
161
+ @include grid-col-unpos;
162
+ }
163
+ }
164
+
165
+ // Block grid columns
166
+ .#{$column}-#{$block} {
167
+ @include grid-column-margin;
168
+ }
169
+
170
+ @if $column == 'column' and has-value($grid-column-alias) {
171
+ .#{$grid-column-alias} {
172
+ // sass-lint:disable-block placeholder-in-extend
173
+ @extend .column;
174
+ }
175
+ }
176
+ }
@@ -0,0 +1,112 @@
1
+ // Foundation for Sites by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group grid
7
+ ////
8
+
9
+ /// Calculates the width of a column based on a number of factors.
10
+ ///
11
+ /// @param {Number|List} $columns
12
+ /// Width of the column. Accepts multiple values:
13
+ /// - A percentage value will make the column that exact size.
14
+ /// - A single digit will make the column span that number of columns wide, taking into account the column count of the parent row.
15
+ /// - A list of the format "x of y" (without quotes) will make a column that is *x* columns wide, assuming *y* total columns for the parent.
16
+ ///
17
+ /// @returns {Number} A calculated percentage value.
18
+ @function grid-column($columns) {
19
+ $width: 0%;
20
+
21
+ // Parsing percents, decimals, and column counts
22
+ @if type-of($columns) == 'number' {
23
+ @if unit($columns) == '%' {
24
+ $width: $columns;
25
+ }
26
+ @else if $columns < 1 {
27
+ $width: percentage($columns);
28
+ }
29
+ @else {
30
+ $width: percentage($columns / $grid-column-count);
31
+ }
32
+ }
33
+
34
+ // Parsing "n of n" expressions
35
+ @else if type-of($columns) == 'list' {
36
+ @if length($columns) != 3 {
37
+ @error 'Wrong syntax for grid-column(). Use the format "n of n".';
38
+ }
39
+ @else {
40
+ $width: percentage(nth($columns, 1) / nth($columns, 3));
41
+ }
42
+ }
43
+
44
+ // Anything else is incorrect
45
+ @else {
46
+ @error 'Wrong syntax for grid-column(). Use a number, decimal, percentage, or "n of n".';
47
+ }
48
+
49
+ @return $width;
50
+ }
51
+
52
+ /// Creates a grid column.
53
+ ///
54
+ /// @param {Mixed} $columns [$grid-column-count] - Width of the column. Refer to the `grid-column()` function to see possible values.
55
+ /// @param {Mixed} $gutters [$grid-column-gutter] - Spacing between columns. Refer to the `grid-column-gutter()` function to see possible values.
56
+ @mixin grid-column(
57
+ $columns: $grid-column-count,
58
+ $gutters: $grid-column-gutter
59
+ ) {
60
+ @include grid-column-size($columns);
61
+ float: $global-left;
62
+
63
+ // Gutters
64
+ @include grid-column-gutter($gutters: $gutters);
65
+
66
+ // Last column alignment
67
+ @if $grid-column-align-edge {
68
+ &:last-child:not(:first-child) {
69
+ float: $global-right;
70
+ }
71
+ }
72
+ }
73
+
74
+ /// Creates a grid column row. This is the equivalent of adding `.row` and `.column` to the same element.
75
+ ///
76
+ /// @param {Mixed} $gutters [$grid-column-gutter] - Width of the gutters on either side of the column row. Refer to the `grid-column-gutter()` function to see possible values.
77
+ @mixin grid-column-row(
78
+ $gutters: $grid-column-gutter
79
+ ) {
80
+ @include grid-row;
81
+ @include grid-column($gutters: $gutters);
82
+
83
+ &,
84
+ &:last-child {
85
+ float: none;
86
+ }
87
+ }
88
+
89
+ /// Shorthand for `grid-column()`.
90
+ /// @alias grid-column
91
+ @function grid-col(
92
+ $columns: $grid-column-count
93
+ ) {
94
+ @return grid-column($columns);
95
+ }
96
+
97
+ /// Shorthand for `grid-column()`.
98
+ /// @alias grid-column
99
+ @mixin grid-col(
100
+ $columns: $grid-column-count,
101
+ $gutters: $grid-column-gutter
102
+ ) {
103
+ @include grid-column($columns, $gutters);
104
+ }
105
+
106
+ /// Shorthand for `grid-column-row()`.
107
+ /// @alias grid-column-row
108
+ @mixin grid-col-row(
109
+ $gutters: $grid-column-gutter
110
+ ) {
111
+ @include grid-column-row($gutters);
112
+ }
@@ -0,0 +1,259 @@
1
+ // Foundation for Sites by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group flex-grid
7
+ ////
8
+
9
+ /// Creates a container for a flex grid row.
10
+ ///
11
+ /// @param {Keyword|List} $behavior [null]
12
+ /// Modifications to the default grid styles. `nest` indicates the row will be placed inside another row. `collapse` indicates that the columns inside this row will not have padding. `nest collapse` combines both behaviors.
13
+ /// @param {Keyword|Number} $size [$grid-row-width] Maximum size of the row. Set to `expand` to make the row taking the full width.
14
+ /// @param {Number} $columns [null] - Number of columns to use for this row. If set to `null` (the default), the global column count will be used.
15
+ /// @param {Boolean} $base [true] - Set to `false` to prevent basic styles from being output. Useful if you're calling this mixin on the same element twice, as it prevents duplicate CSS output.
16
+ /// @param {Number|Map} $gutters [$grid-column-gutter] - Gutter map or single value to use when inverting margins, in case the row is nested. Responsive gutter settings by default.
17
+ @mixin flex-grid-row(
18
+ $behavior: null,
19
+ $size: $grid-row-width,
20
+ $columns: null,
21
+ $base: true,
22
+ $wrap: true,
23
+ $gutters: $grid-column-gutter
24
+ ) {
25
+ $margin: auto;
26
+ $wrap: if($wrap, wrap, nowrap);
27
+
28
+ @if index($behavior, nest) != null {
29
+ @include grid-row-nest($gutters);
30
+
31
+ @if index($behavior, collapse) != null {
32
+ margin-right: 0;
33
+ margin-left: 0;
34
+ }
35
+ }
36
+ @else {
37
+ @include grid-row-size($size);
38
+ margin-right: auto;
39
+ margin-left: auto;
40
+ }
41
+
42
+ @if $base {
43
+ display: flex;
44
+ flex-flow: row $wrap;
45
+ }
46
+
47
+ @if $columns != null {
48
+ @include grid-context($columns, $base) {
49
+ @content;
50
+ }
51
+ }
52
+ }
53
+
54
+ /// Calculates the `flex` property for a flex grid column. It accepts all of the same values as the basic `grid-column()` function, along with two extras:
55
+ /// - `expand` (the default) will make the column expand to fill space.
56
+ /// - `shrink` will make the column contract, so it only takes up the horizontal space it needs.
57
+ ///
58
+ /// @param {Mixed} $columns [expand] - Width of the column.
59
+ @function flex-grid-column($columns: expand) {
60
+ $flex: 1 1 0px; // sass-lint:disable-line zero-unit
61
+
62
+ @if $columns == shrink {
63
+ $flex: 0 0 auto;
64
+ }
65
+ @else if $columns != expand {
66
+ $flex: 0 0 grid-column($columns);
67
+ }
68
+
69
+ @return $flex;
70
+ }
71
+
72
+ /// Creates a column for a flex grid. By default, the column will stretch to the full width of its container, but this can be overridden with sizing classes, or by using the `unstack` class on the parent flex row.
73
+ ///
74
+ /// @param {Mixed} $columns [expand] - Width of the column. Refer to the `flex-grid-column()` function to see possible values.
75
+ /// @param {Number|Map} $gutters [$grid-column-gutter] - Map or single value for gutters width. See the `grid-column-gutter` mixin.
76
+ @mixin flex-grid-column(
77
+ $columns: expand,
78
+ $gutters: $grid-column-gutter
79
+ ) {
80
+ // Base properties
81
+ @include flex-grid-size($columns);
82
+
83
+ // Gutters
84
+ @include grid-column-gutter($gutters: $gutters);
85
+
86
+ // fixes recent Chrome version not limiting child width
87
+ // https://stackoverflow.com/questions/34934586/white-space-nowrap-and-flexbox-did-not-work-in-chrome
88
+ @if $columns == expand {
89
+ min-width: 0;
90
+ }
91
+ }
92
+
93
+ /// Creates a block grid for a flex grid row.
94
+ ///
95
+ /// @param {Number} $n - Number of columns to display on each row.
96
+ /// @param {String} $selector - Selector to use to target columns within the row.
97
+ @mixin flex-grid-layout(
98
+ $n,
99
+ $selector: '.column'
100
+ ) {
101
+ flex-wrap: wrap;
102
+
103
+ > #{$selector} {
104
+ $pct: percentage(1/$n);
105
+
106
+ flex: 0 0 $pct;
107
+ max-width: $pct;
108
+ }
109
+ }
110
+
111
+ /// Changes the width flex grid column.
112
+ /// @param {Mixed} $columns [expand] - Width of the column. Refer to the `flex-grid-column()` function to see possible values.
113
+ @mixin flex-grid-size($columns: null) {
114
+ $columns: $columns or expand;
115
+
116
+ flex: flex-grid-column($columns);
117
+
118
+ // max-width fixes IE 10/11 not respecting the flex-basis property
119
+ @if $columns != expand and $columns != shrink {
120
+ max-width: grid-column($columns);
121
+ }
122
+ }
123
+
124
+
125
+ @mixin foundation-flex-grid {
126
+ // Row
127
+ .row {
128
+ @include flex-grid-row;
129
+
130
+ // Nesting behavior
131
+ & .row {
132
+ @include flex-grid-row(nest, $base: false);
133
+
134
+ &.collapse {
135
+ margin-right: 0;
136
+ margin-left: 0;
137
+ }
138
+ }
139
+
140
+ // Expanded row
141
+ &.expanded {
142
+ @include grid-row-size(expand);
143
+
144
+ .row {
145
+ margin-right: auto;
146
+ margin-left: auto;
147
+ }
148
+ }
149
+
150
+ &:not(.expanded) .row {
151
+ @include grid-row-size(expand);
152
+ }
153
+
154
+ &.collapse {
155
+ > .column {
156
+ @include grid-col-collapse;
157
+ }
158
+ }
159
+
160
+ // Undo negative margins
161
+ // From collapsed child
162
+ &.is-collapse-child,
163
+ &.collapse > .column > .row {
164
+ margin-right: 0;
165
+ margin-left: 0;
166
+ }
167
+ }
168
+
169
+ // Column
170
+ .column {
171
+ @include flex-grid-column;
172
+ }
173
+
174
+ // Column row
175
+ // The double .row class is needed to bump up the specificity
176
+ .column.row.row {
177
+ float: none;
178
+ display: block;
179
+ }
180
+
181
+ // To properly nest a column row, padding and margin is removed
182
+ .row .column.row.row {
183
+ margin-right: 0;
184
+ margin-left: 0;
185
+ padding-right: 0;
186
+ padding-left: 0;
187
+ }
188
+
189
+ @include -zf-each-breakpoint {
190
+ @for $i from 1 through $grid-column-count {
191
+ // Sizing (percentage)
192
+ .#{$-zf-size}-#{$i} {
193
+ flex: flex-grid-column($i);
194
+ max-width: grid-column($i);
195
+ }
196
+
197
+ // Offsets
198
+ $o: $i - 1;
199
+
200
+ .#{$-zf-size}-offset-#{$o} {
201
+ @include grid-column-offset($o);
202
+ }
203
+ }
204
+
205
+ // Block grid
206
+ @for $i from 1 through $block-grid-max {
207
+ .#{$-zf-size}-up-#{$i} {
208
+ @include flex-grid-layout($i);
209
+ }
210
+ }
211
+
212
+ @if $-zf-size != $-zf-zero-breakpoint {
213
+ // Sizing (expand)
214
+ @include breakpoint($-zf-size) {
215
+ .#{$-zf-size}-expand {
216
+ flex: flex-grid-column();
217
+ }
218
+ }
219
+
220
+ // Auto-stacking/unstacking
221
+ @at-root (without: media) {
222
+ .row.#{$-zf-size}-unstack {
223
+ > .column {
224
+ flex: flex-grid-column(100%);
225
+
226
+ @include breakpoint($-zf-size) {
227
+ flex: flex-grid-column();
228
+ }
229
+ }
230
+ }
231
+ }
232
+ }
233
+
234
+ // Responsive collapsing
235
+ .#{$-zf-size}-collapse {
236
+ > .column { @include grid-col-collapse; }
237
+ }
238
+
239
+ .#{$-zf-size}-uncollapse {
240
+ > .column { @include grid-col-gutter($-zf-size); }
241
+ }
242
+ }
243
+
244
+ // Sizing (shrink)
245
+ .shrink {
246
+ flex: flex-grid-column(shrink);
247
+ max-width: 100%;
248
+ }
249
+
250
+ // Block grid columns
251
+ .column-block {
252
+ @include grid-column-margin;
253
+ }
254
+
255
+ .columns {
256
+ @extend .column; // sass-lint:disable-line placeholder-in-extend
257
+
258
+ }
259
+ }
@@ -0,0 +1,48 @@
1
+ // Foundation for Sites by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group grid
7
+ ////
8
+
9
+ /// The maximum width of a row.
10
+ /// @type Number
11
+ $grid-row-width: $global-width !default;
12
+
13
+ /// The default column count of a grid. Changing this value affects the logic of the grid mixins, and the number of CSS classes output.
14
+ /// @type Number
15
+ $grid-column-count: 12 !default;
16
+
17
+ /// The amount of space between columns at different screen sizes. To use just one size, set the variable to a number instead of a map.
18
+ /// @type Map | Length
19
+ /// @since 6.1.0
20
+ $grid-column-gutter: (
21
+ small: 20px,
22
+ medium: 30px,
23
+ ) !default;
24
+
25
+ /// If `true`, the last column in a row will align to the opposite edge of the row.
26
+ /// @type Boolean
27
+ $grid-column-align-edge: true !default;
28
+
29
+ /// Selector used for an alias of column (with @extend). If `false`, no alias is created.
30
+ /// @type String
31
+ $grid-column-alias: 'columns' !default;
32
+
33
+ /// The highest number of `.x-up` classes available when using the block grid CSS.
34
+ /// @type Number
35
+ $block-grid-max: 8 !default;
36
+
37
+ // Internal value to store the end column float direction
38
+ $-zf-end-float: if($grid-column-align-edge, $global-right, $global-left);
39
+
40
+ @import 'row';
41
+ @import 'column';
42
+ @import 'size';
43
+ @import 'position';
44
+ @import 'gutter';
45
+ @import 'classes';
46
+ @import 'layout';
47
+
48
+ @import 'flex-grid';
@@ -0,0 +1,82 @@
1
+ // Foundation for Sites by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group grid
7
+ ////
8
+
9
+ /// Set the gutters on a column
10
+ /// @param {Number|Keyword} $gutter [auto]
11
+ /// Spacing between columns, accepts multiple values:
12
+ /// - A single value will make the gutter that exact size.
13
+ /// - A breakpoint name will make the gutter the corresponding size in the $gutters map.
14
+ /// - "auto" will make the gutter responsive, using the $gutters map values.
15
+ /// @param {Number|Map} $gutters [$grid-column-gutter] - Gutter map or single value to use. Responsive gutter settings by default.
16
+ @mixin grid-column-gutter(
17
+ $gutter: auto,
18
+ $gutters: $grid-column-gutter
19
+ ) {
20
+ @include -zf-breakpoint-value($gutter, $gutters) {
21
+ $padding: rem-calc($-zf-bp-value) / 2;
22
+
23
+ padding-right: $padding;
24
+ padding-left: $padding;
25
+ }
26
+ }
27
+
28
+ /// Collapse the gutters on a column by removing the padding. **Note:** only use this mixin within a breakpoint. To collapse a column's gutters on all screen sizes, use the `$gutter` parameter of the `grid-column()` mixin instead.
29
+ @mixin grid-column-collapse {
30
+ @include grid-column-gutter(0);
31
+ }
32
+
33
+ /// Un-collapse the gutters on a column by re-adding the padding.
34
+ ///
35
+ /// @param {Number} $gutter [$grid-column-gutter] - Spacing between columns.
36
+ @mixin grid-column-uncollapse($gutter: $grid-column-gutter) {
37
+ @warn 'This mixin is being replaced by grid-column-gutter(). grid-column-uncollapse() will be removed in Foundation 6.4.';
38
+ @include grid-column-gutter($gutters: $gutter);
39
+ }
40
+
41
+ /// Shorthand for `grid-column-gutter()`.
42
+ /// @alias grid-column-gutter
43
+ @mixin grid-col-gutter(
44
+ $gutter: auto,
45
+ $gutters: $grid-column-gutter
46
+ ) {
47
+ @include grid-column-gutter($gutter, $gutters);
48
+ }
49
+
50
+ /// Shorthand for `grid-column-collapse()`.
51
+ /// @alias grid-column-collapse
52
+ @mixin grid-col-collapse {
53
+ @include grid-column-collapse;
54
+ }
55
+
56
+ /// Shorthand for `grid-column-uncollapse()`.
57
+ /// @alias grid-column-uncollapse
58
+ @mixin grid-col-uncollapse($gutter: $grid-column-gutter) {
59
+ @warn 'This mixin is being replaced by grid-col-gutter(). grid-col-uncollapse() will be removed in Foundation 6.4.';
60
+ @include grid-column-uncollapse($gutter);
61
+ }
62
+
63
+ /// Sets bottom margin on grid columns to match gutters
64
+ /// @param {Number|Keyword} $margin [auto]
65
+ /// The bottom margin on grid columns, accepts multiple values:
66
+ /// - A single value will make the margin that exact size.
67
+ /// - A breakpoint name will make the margin the corresponding size in the $margins map.
68
+ /// - "auto" will make the margin responsive, using the $margins map values.
69
+ /// @param {Number|Map} $margins [$grid-column-gutter] - Map or single value to use. Responsive gutter settings by default.
70
+ @mixin grid-column-margin (
71
+ $margin: auto,
72
+ $margins: $grid-column-gutter
73
+ ) {
74
+ @include -zf-breakpoint-value($margin, $margins) {
75
+ $margin-bottom: rem-calc($-zf-bp-value);
76
+ margin-bottom: $margin-bottom;
77
+
78
+ > :last-child {
79
+ margin-bottom: 0;
80
+ }
81
+ }
82
+ }