locomotivecms_wagon 2.4.0.rc2 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (137) hide show
  1. checksums.yaml +4 -4
  2. data/generators/foundation/public/javascripts/vendor/foundation.js +10839 -6523
  3. data/generators/foundation/public/javascripts/vendor/foundation.min.js +5 -3
  4. data/generators/foundation/public/stylesheets/_settings.scss +455 -115
  5. data/generators/foundation/public/stylesheets/app.css +0 -3
  6. data/generators/foundation/public/stylesheets/app.scss +15 -6
  7. data/generators/foundation/public/stylesheets/foundation.css +4191 -1885
  8. data/generators/foundation/public/stylesheets/foundation6/_global.scss +106 -54
  9. data/generators/foundation/public/stylesheets/foundation6/components/_accordion-menu.scss +157 -14
  10. data/generators/foundation/public/stylesheets/foundation6/components/_accordion.scss +71 -28
  11. data/generators/foundation/public/stylesheets/foundation6/components/_badge.scss +17 -9
  12. data/generators/foundation/public/stylesheets/foundation6/components/_breadcrumbs.scss +33 -10
  13. data/generators/foundation/public/stylesheets/foundation6/components/_button-group.scss +168 -30
  14. data/generators/foundation/public/stylesheets/foundation6/components/_button.scss +165 -44
  15. data/generators/foundation/public/stylesheets/foundation6/components/_callout.scss +9 -18
  16. data/generators/foundation/public/stylesheets/foundation6/components/_card.scss +129 -0
  17. data/generators/foundation/public/stylesheets/foundation6/components/_close-button.scss +54 -13
  18. data/generators/foundation/public/stylesheets/foundation6/components/_drilldown.scss +108 -33
  19. data/generators/foundation/public/stylesheets/foundation6/components/_dropdown-menu.scss +215 -64
  20. data/generators/foundation/public/stylesheets/foundation6/components/_dropdown.scss +22 -7
  21. data/generators/foundation/public/stylesheets/foundation6/components/_flex-video.scss +1 -68
  22. data/generators/foundation/public/stylesheets/foundation6/components/_flex.scss +117 -0
  23. data/generators/foundation/public/stylesheets/foundation6/components/_float.scss +1 -1
  24. data/generators/foundation/public/stylesheets/foundation6/components/_label.scss +16 -8
  25. data/generators/foundation/public/stylesheets/foundation6/components/_media-object.scss +50 -10
  26. data/generators/foundation/public/stylesheets/foundation6/components/_menu-icon.scss +9 -0
  27. data/generators/foundation/public/stylesheets/foundation6/components/_menu.scss +373 -91
  28. data/generators/foundation/public/stylesheets/foundation6/components/_off-canvas.scss +418 -83
  29. data/generators/foundation/public/stylesheets/foundation6/components/_orbit.scss +17 -7
  30. data/generators/foundation/public/stylesheets/foundation6/components/_pagination.scss +77 -45
  31. data/generators/foundation/public/stylesheets/foundation6/components/_progress-bar.scss +16 -35
  32. data/generators/foundation/public/stylesheets/foundation6/components/_responsive-embed.scss +70 -0
  33. data/generators/foundation/public/stylesheets/foundation6/components/_reveal.scss +59 -34
  34. data/generators/foundation/public/stylesheets/foundation6/components/_slider.scss +17 -38
  35. data/generators/foundation/public/stylesheets/foundation6/components/_sticky.scss +5 -4
  36. data/generators/foundation/public/stylesheets/foundation6/components/_switch.scss +52 -36
  37. data/generators/foundation/public/stylesheets/foundation6/components/_table.scss +197 -79
  38. data/generators/foundation/public/stylesheets/foundation6/components/_tabs.scss +126 -67
  39. data/generators/foundation/public/stylesheets/foundation6/components/_thumbnail.scss +17 -4
  40. data/generators/foundation/public/stylesheets/foundation6/components/_title-bar.scss +61 -21
  41. data/generators/foundation/public/stylesheets/foundation6/components/_tooltip.scss +74 -24
  42. data/generators/foundation/public/stylesheets/foundation6/components/_top-bar.scss +128 -10
  43. data/generators/foundation/public/stylesheets/foundation6/components/_visibility.scss +6 -5
  44. data/generators/foundation/public/stylesheets/foundation6/forms/_checkbox.scss +14 -9
  45. data/generators/foundation/public/stylesheets/foundation6/forms/_error.scss +12 -5
  46. data/generators/foundation/public/stylesheets/foundation6/forms/_fieldset.scss +6 -6
  47. data/generators/foundation/public/stylesheets/foundation6/forms/_forms.scss +11 -9
  48. data/generators/foundation/public/stylesheets/foundation6/forms/_help-text.scss +1 -1
  49. data/generators/foundation/public/stylesheets/foundation6/forms/_input-group.scss +82 -10
  50. data/generators/foundation/public/stylesheets/foundation6/forms/_label.scss +2 -0
  51. data/generators/foundation/public/stylesheets/foundation6/forms/_meter.scss +116 -0
  52. data/generators/foundation/public/stylesheets/foundation6/forms/_progress.scss +94 -0
  53. data/generators/foundation/public/stylesheets/foundation6/forms/_range.scss +149 -0
  54. data/generators/foundation/public/stylesheets/foundation6/forms/_select.scss +36 -14
  55. data/generators/foundation/public/stylesheets/foundation6/forms/_text.scss +53 -27
  56. data/generators/foundation/public/stylesheets/foundation6/foundation.scss +59 -17
  57. data/generators/foundation/public/stylesheets/foundation6/grid/_classes.scss +100 -56
  58. data/generators/foundation/public/stylesheets/foundation6/grid/_column.scss +22 -22
  59. data/generators/foundation/public/stylesheets/foundation6/grid/_flex-grid.scss +164 -96
  60. data/generators/foundation/public/stylesheets/foundation6/grid/_grid.scss +19 -4
  61. data/generators/foundation/public/stylesheets/foundation6/grid/_gutter.scss +61 -10
  62. data/generators/foundation/public/stylesheets/foundation6/grid/_layout.scss +49 -5
  63. data/generators/foundation/public/stylesheets/foundation6/grid/_position.scss +14 -9
  64. data/generators/foundation/public/stylesheets/foundation6/grid/_row.scss +42 -15
  65. data/generators/foundation/public/stylesheets/foundation6/motion-ui/_classes.scss +11 -4
  66. data/generators/foundation/public/stylesheets/foundation6/motion-ui/effects/_fade.scss +4 -1
  67. data/generators/foundation/public/stylesheets/foundation6/motion-ui/effects/_zoom.scss +1 -1
  68. data/generators/foundation/public/stylesheets/foundation6/motion-ui/transitions/_slide.scss +1 -1
  69. data/generators/foundation/public/stylesheets/foundation6/motion-ui/util/_transition.scss +1 -1
  70. data/generators/foundation/public/stylesheets/foundation6/prototype/_arrow.scss +36 -0
  71. data/generators/foundation/public/stylesheets/foundation6/prototype/_border-box.scss +35 -0
  72. data/generators/foundation/public/stylesheets/foundation6/prototype/_border-none.scss +35 -0
  73. data/generators/foundation/public/stylesheets/foundation6/prototype/_bordered.scss +54 -0
  74. data/generators/foundation/public/stylesheets/foundation6/prototype/_box.scss +23 -0
  75. data/generators/foundation/public/stylesheets/foundation6/prototype/_display.scss +50 -0
  76. data/generators/foundation/public/stylesheets/foundation6/prototype/_font-styling.scss +95 -0
  77. data/generators/foundation/public/stylesheets/foundation6/prototype/_list-style-type.scss +95 -0
  78. data/generators/foundation/public/stylesheets/foundation6/prototype/_overflow.scss +72 -0
  79. data/generators/foundation/public/stylesheets/foundation6/prototype/_position.scss +114 -0
  80. data/generators/foundation/public/stylesheets/foundation6/prototype/_prototype.scss +87 -0
  81. data/generators/foundation/public/stylesheets/foundation6/prototype/_relation.scss +157 -0
  82. data/generators/foundation/public/stylesheets/foundation6/prototype/_rotate.scss +31 -0
  83. data/generators/foundation/public/stylesheets/foundation6/prototype/_rounded.scss +54 -0
  84. data/generators/foundation/public/stylesheets/foundation6/prototype/_separator.scss +96 -0
  85. data/generators/foundation/public/stylesheets/foundation6/prototype/_shadow.scss +43 -0
  86. data/generators/foundation/public/stylesheets/foundation6/prototype/_sizing.scss +73 -0
  87. data/generators/foundation/public/stylesheets/foundation6/prototype/_spacing.scss +204 -0
  88. data/generators/foundation/public/stylesheets/foundation6/prototype/_text-decoration.scss +48 -0
  89. data/generators/foundation/public/stylesheets/foundation6/prototype/_text-transformation.scss +48 -0
  90. data/generators/foundation/public/stylesheets/foundation6/prototype/_text-utilities.scss +88 -0
  91. data/generators/foundation/public/stylesheets/foundation6/settings/_settings.scss +454 -116
  92. data/generators/foundation/public/stylesheets/foundation6/typography/_alignment.scss +9 -8
  93. data/generators/foundation/public/stylesheets/foundation6/typography/_base.scss +128 -55
  94. data/generators/foundation/public/stylesheets/foundation6/typography/_helpers.scss +7 -4
  95. data/generators/foundation/public/stylesheets/foundation6/typography/_print.scss +22 -9
  96. data/generators/foundation/public/stylesheets/foundation6/typography/_typography.scss +0 -2
  97. data/generators/foundation/public/stylesheets/foundation6/util/_breakpoint.scss +213 -47
  98. data/generators/foundation/public/stylesheets/foundation6/util/_color.scss +105 -17
  99. data/generators/foundation/public/stylesheets/foundation6/util/_direction.scss +31 -0
  100. data/generators/foundation/public/stylesheets/foundation6/util/_flex.scss +85 -0
  101. data/generators/foundation/public/stylesheets/foundation6/util/_math.scss +72 -0
  102. data/generators/foundation/public/stylesheets/foundation6/util/_mixins.scss +161 -38
  103. data/generators/foundation/public/stylesheets/foundation6/util/_selector.scss +5 -3
  104. data/generators/foundation/public/stylesheets/foundation6/util/_typography.scss +26 -0
  105. data/generators/foundation/public/stylesheets/foundation6/util/_unit.scss +100 -17
  106. data/generators/foundation/public/stylesheets/foundation6/util/_util.scss +4 -5
  107. data/generators/foundation/public/stylesheets/foundation6/util/_value.scss +68 -25
  108. data/generators/foundation/public/stylesheets/foundation6/vendor/normalize-scss/sass/_normalize.scss +3 -0
  109. data/generators/foundation/public/stylesheets/foundation6/vendor/normalize-scss/sass/normalize/_import-now.scss +11 -0
  110. data/generators/foundation/public/stylesheets/foundation6/vendor/normalize-scss/sass/normalize/_normalize-mixin.scss +676 -0
  111. data/generators/foundation/public/stylesheets/foundation6/vendor/normalize-scss/sass/normalize/_variables.scss +36 -0
  112. data/generators/foundation/public/stylesheets/foundation6/vendor/normalize-scss/sass/normalize/_vertical-rhythm.scss +61 -0
  113. data/generators/foundation/public/stylesheets/foundation6/vendor/sassy-lists/stylesheets/functions/_contain.scss +31 -0
  114. data/generators/foundation/public/stylesheets/foundation6/vendor/sassy-lists/stylesheets/functions/_purge.scss +38 -0
  115. data/generators/foundation/public/stylesheets/foundation6/vendor/sassy-lists/stylesheets/functions/_remove.scss +31 -0
  116. data/generators/foundation/public/stylesheets/foundation6/vendor/sassy-lists/stylesheets/functions/_replace.scss +46 -0
  117. data/generators/foundation/public/stylesheets/foundation6/vendor/sassy-lists/stylesheets/functions/_to-list.scss +27 -0
  118. data/generators/foundation/public/stylesheets/foundation6/vendor/sassy-lists/stylesheets/helpers/_missing-dependencies.scss +25 -0
  119. data/generators/foundation/public/stylesheets/foundation6/vendor/sassy-lists/stylesheets/helpers/_true.scss +13 -0
  120. data/generators/foundation/public/stylesheets/foundation6/xy-grid/_cell.scss +169 -0
  121. data/generators/foundation/public/stylesheets/foundation6/xy-grid/_classes.scss +476 -0
  122. data/generators/foundation/public/stylesheets/foundation6/xy-grid/_collapse.scss +74 -0
  123. data/generators/foundation/public/stylesheets/foundation6/xy-grid/_frame.scss +85 -0
  124. data/generators/foundation/public/stylesheets/foundation6/xy-grid/_grid.scss +35 -0
  125. data/generators/foundation/public/stylesheets/foundation6/xy-grid/_gutters.scss +45 -0
  126. data/generators/foundation/public/stylesheets/foundation6/xy-grid/_layout.scss +33 -0
  127. data/generators/foundation/public/stylesheets/foundation6/xy-grid/_position.scss +28 -0
  128. data/generators/foundation/public/stylesheets/foundation6/xy-grid/_xy-grid.scss +51 -0
  129. data/lib/locomotive/wagon/tools/styled_yaml.rb +1 -1
  130. data/lib/locomotive/wagon/version.rb +1 -1
  131. data/locomotivecms_wagon.gemspec +2 -2
  132. data/spec/fixtures/cassettes/authenticate.yml +102 -48
  133. data/spec/fixtures/cassettes/delete.yml +519 -259
  134. data/spec/fixtures/cassettes/push.yml +2724 -1486
  135. metadata +61 -10
  136. data/generators/foundation/public/stylesheets/foundation6/motion-ui.scss +0 -4
  137. data/generators/foundation/public/stylesheets/foundation6/vendor/normalize.scss +0 -424
@@ -12,9 +12,9 @@
12
12
  /// Width of the column. Accepts multiple values:
13
13
  /// - A percentage value will make the column that exact size.
14
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 string of the format "x of y" will make a column that is *x* columns wide, assuming *y* total columns for the parent.
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
16
  ///
17
- /// @return {Number} A calculated percentage value.
17
+ /// @returns {Number} A calculated percentage value.
18
18
  @function grid-column($columns) {
19
19
  $width: 0%;
20
20
 
@@ -52,34 +52,34 @@
52
52
  /// Creates a grid column.
53
53
  ///
54
54
  /// @param {Mixed} $columns [$grid-column-count] - Width of the column. Refer to the `grid-column()` function to see possible values.
55
- /// @param {Number} $gutter [$grid-column-gutter] - Spacing between columns.
55
+ /// @param {Mixed} $gutters [$grid-column-gutter] - Spacing between columns. Refer to the `grid-column-gutter()` function to see possible values.
56
56
  @mixin grid-column(
57
57
  $columns: $grid-column-count,
58
- $gutter: $grid-column-gutter
58
+ $gutters: $grid-column-gutter
59
59
  ) {
60
- @if ($columns <= $grid-column-count) {
61
- @include grid-column-size($columns);
62
- }
63
-
64
- $gutter: rem-calc($gutter) / 2;
65
-
60
+ @include grid-column-size($columns);
66
61
  float: $global-left;
67
- padding-left: $gutter;
68
- padding-right: $gutter;
69
62
 
70
- &:last-child:not(:first-child) {
71
- float: $global-right;
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
+ }
72
71
  }
73
72
  }
74
73
 
75
74
  /// Creates a grid column row. This is the equivalent of adding `.row` and `.column` to the same element.
76
- /// @param {Number} $gutter [$grid-column-gutter] - Width of the gutters on either side of the column row.
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
77
  @mixin grid-column-row(
78
- $gutter: $grid-column-gutter
78
+ $gutters: $grid-column-gutter
79
79
  ) {
80
80
  @include grid-row;
81
- @include grid-column($gutter: $gutter);
82
-
81
+ @include grid-column($gutters: $gutters);
82
+
83
83
  &,
84
84
  &:last-child {
85
85
  float: none;
@@ -98,15 +98,15 @@
98
98
  /// @alias grid-column
99
99
  @mixin grid-col(
100
100
  $columns: $grid-column-count,
101
- $gutter: $grid-column-gutter
101
+ $gutters: $grid-column-gutter
102
102
  ) {
103
- @include grid-column($columns, $gutter);
103
+ @include grid-column($columns, $gutters);
104
104
  }
105
105
 
106
106
  /// Shorthand for `grid-column-row()`.
107
107
  /// @alias grid-column-row
108
108
  @mixin grid-col-row(
109
- $gutter: $grid-column-gutter
109
+ $gutters: $grid-column-gutter
110
110
  ) {
111
- @include grid-column-row($gutter);
111
+ @include grid-column-row($gutters);
112
112
  }
@@ -7,35 +7,43 @@
7
7
  ////
8
8
 
9
9
  /// Creates a container for a flex grid row.
10
+ ///
10
11
  /// @param {Keyword|List} $behavior [null]
11
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.
12
- /// @param {Number} $width [$grid-row-width] - Maximum width of the row.
13
+ /// @param {Keyword|Number} $size [$grid-row-width] Maximum size of the row. Set to `expand` to make the row taking the full width.
13
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.
14
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.
15
17
  @mixin flex-grid-row(
16
18
  $behavior: null,
17
- $width: $grid-row-width,
19
+ $size: $grid-row-width,
18
20
  $columns: null,
19
- $base: true
21
+ $base: true,
22
+ $wrap: true,
23
+ $gutters: $grid-column-gutter
20
24
  ) {
21
- $behavior: -zf-get-options($behavior, nest collapse);
22
25
  $margin: auto;
26
+ $wrap: if($wrap, wrap, nowrap);
23
27
 
24
- @if map-get($behavior, nest) {
25
- $margin: rem-calc($grid-column-gutter) / 2 * -1;
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
+ }
26
35
  }
27
36
  @else {
28
- max-width: $width;
37
+ @include grid-row-size($size);
38
+ margin-right: auto;
39
+ margin-left: auto;
29
40
  }
30
41
 
31
42
  @if $base {
32
43
  display: flex;
33
- flex-flow: row wrap;
44
+ flex-flow: row $wrap;
34
45
  }
35
46
 
36
- margin-left: $margin;
37
- margin-right: $margin;
38
-
39
47
  @if $columns != null {
40
48
  @include grid-context($columns, $base) {
41
49
  @content;
@@ -44,16 +52,17 @@
44
52
  }
45
53
 
46
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:
47
- /// - `null` (the default) will make the column expand to fill space.
55
+ /// - `expand` (the default) will make the column expand to fill space.
48
56
  /// - `shrink` will make the column contract, so it only takes up the horizontal space it needs.
49
- /// @param {Mixed} $columns [null] - Width of the column.
50
- @function flex-grid-column($columns: null) {
51
- $flex: 1 1 0px;
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
52
61
 
53
62
  @if $columns == shrink {
54
63
  $flex: 0 0 auto;
55
64
  }
56
- @else if $columns != null {
65
+ @else if $columns != expand {
57
66
  $flex: 0 0 grid-column($columns);
58
67
  }
59
68
 
@@ -61,29 +70,57 @@
61
70
  }
62
71
 
63
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.
64
- /// @param {Mixed} $columns [null] - Width of the column. Refer to the `flex-grid-column()` function to see possible values.
65
- /// @param {Number} $gutter [$grid-column-gutter] - Space between columns, added as a left and right padding.
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.
66
76
  @mixin flex-grid-column(
67
- $columns: null,
68
- $gutter: $grid-column-gutter
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'
69
100
  ) {
70
- $gutter: rem-calc($gutter) / 2;
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;
71
115
 
72
116
  flex: flex-grid-column($columns);
73
- padding-left: $gutter;
74
- padding-right: $gutter;
75
117
 
76
118
  // max-width fixes IE 10/11 not respecting the flex-basis property
77
- @if $columns != null and $columns != shrink {
119
+ @if $columns != expand and $columns != shrink {
78
120
  max-width: grid-column($columns);
79
121
  }
80
122
  }
81
123
 
82
- /// Changes the source order of a flex grid column. Columns with lower numbers appear first in the layout.
83
- /// @param {Number} $order [0] - Order number to apply.
84
- @mixin flex-grid-order($order: 0) {
85
- order: $order;
86
- }
87
124
 
88
125
  @mixin foundation-flex-grid {
89
126
  // Row
@@ -91,101 +128,132 @@
91
128
  @include flex-grid-row;
92
129
 
93
130
  // Nesting behavior
94
- & &,
95
- .column-row & {
131
+ & .row {
96
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;
97
166
  }
98
167
  }
99
168
 
100
169
  // Column
101
- %flex-column {
170
+ .column {
102
171
  @include flex-grid-column;
103
172
  }
104
173
 
105
- .column,
106
- .columns {
107
- @extend %flex-column;
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;
108
179
  }
109
180
 
110
- // Sizing (percentage)
111
- @each $size in $breakpoint-classes {
112
- @include breakpoint($size) {
113
- @for $i from 1 through $grid-column-count {
114
- .#{$size}-#{$i} {
115
- flex: flex-grid-column($i);
116
- max-width: grid-column($i);
117
- }
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);
118
202
  }
119
203
  }
120
- }
121
204
 
122
- // Sizing (expand)
123
- @each $size in $breakpoint-classes {
124
- @if $size != small {
125
- @include breakpoint($size) {
126
- .#{$size}-expand {
127
- flex: flex-grid-column();
128
- }
205
+ // Block grid
206
+ @for $i from 1 through $block-grid-max {
207
+ .#{$-zf-size}-up-#{$i} {
208
+ @include flex-grid-layout($i);
129
209
  }
130
210
  }
131
- }
132
211
 
133
- // Sizing (shrink)
134
- .shrink {
135
- flex: flex-grid-column(shrink);
136
- }
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
+ }
137
219
 
138
- // Auto-stacking/unstacking
139
- @each $size in $breakpoint-classes {
140
- @if $size != small {
141
- .row.#{$size}-unstack {
142
- .column {
143
- flex: flex-grid-column(100%);
220
+ // Auto-stacking/unstacking
221
+ @at-root (without: media) {
222
+ .row.#{$-zf-size}-unstack {
223
+ > .column {
224
+ flex: flex-grid-column(100%);
144
225
 
145
- @include breakpoint($size) {
146
- flex: flex-grid-column();
226
+ @include breakpoint($-zf-size) {
227
+ flex: flex-grid-column();
228
+ }
147
229
  }
148
230
  }
149
231
  }
150
232
  }
151
- }
152
233
 
153
- // Source ordering
154
- @each $size in $breakpoint-classes {
155
- @include breakpoint($size) {
156
- @for $i from 1 through 6 {
157
- .#{$size}-order-#{$i} {
158
- @include flex-grid-order($i);
159
- }
160
- }
234
+ // Responsive collapsing
235
+ .#{$-zf-size}-collapse {
236
+ > .column { @include grid-col-collapse; }
161
237
  }
162
- }
163
238
 
164
- // Horizontal alignment using justify-content
165
- @each $hdir, $prop in (
166
- 'right': flex-end,
167
- 'center': center,
168
- 'justify': space-between,
169
- 'spaced': space-around,
170
- ) {
171
- .row.align-#{$hdir} {
172
- justify-content: $prop;
239
+ .#{$-zf-size}-uncollapse {
240
+ > .column { @include grid-col-gutter($-zf-size); }
173
241
  }
174
242
  }
175
243
 
176
- // Horizontal alignment using align-items and align-self
177
- @each $vdir, $prop in (
178
- 'top': flex-start,
179
- 'bottom': flex-end,
180
- 'middle': center,
181
- 'stretch': stretch,
182
- ) {
183
- .row.align-#{$vdir} {
184
- align-items: $prop;
185
- }
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
186
257
 
187
- .column.align-#{$vdir} {
188
- align-self: $prop;
189
- }
190
258
  }
191
259
  }
@@ -14,13 +14,28 @@ $grid-row-width: $global-width !default;
14
14
  /// @type Number
15
15
  $grid-column-count: 12 !default;
16
16
 
17
- /// The amount of space between columns.
18
- /// @type Number
19
- $grid-column-gutter: 30px !default;
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;
20
32
 
21
33
  /// The highest number of `.x-up` classes available when using the block grid CSS.
22
34
  /// @type Number
23
- $block-grid-max: 6 !default;
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);
24
39
 
25
40
  @import 'row';
26
41
  @import 'column';