foundation-rails 6.2.4.0 → 6.3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/Rakefile +2 -0
- data/bower.json +2 -2
- data/lib/foundation/rails/version.rb +1 -1
- data/lib/generators/foundation/templates/_settings.scss +117 -70
- data/lib/generators/foundation/templates/foundation_and_overrides.scss +2 -1
- data/vendor/assets/_vendor/normalize-scss/sass/_normalize.scss +3 -0
- data/vendor/assets/_vendor/normalize-scss/sass/normalize/_import-now.scss +11 -0
- data/vendor/assets/_vendor/normalize-scss/sass/normalize/_normalize-mixin.scss +676 -0
- data/vendor/assets/_vendor/normalize-scss/sass/normalize/_variables.scss +36 -0
- data/vendor/assets/_vendor/normalize-scss/sass/normalize/_vertical-rhythm.scss +61 -0
- data/vendor/assets/_vendor/sassy-lists/stylesheets/functions/_purge.scss +38 -0
- data/vendor/assets/_vendor/sassy-lists/stylesheets/functions/_remove.scss +31 -0
- data/vendor/assets/_vendor/sassy-lists/stylesheets/functions/_replace.scss +46 -0
- data/vendor/assets/_vendor/sassy-lists/stylesheets/functions/_to-list.scss +27 -0
- data/vendor/assets/_vendor/sassy-lists/stylesheets/helpers/_missing-dependencies.scss +25 -0
- data/vendor/assets/_vendor/sassy-lists/stylesheets/helpers/_true.scss +13 -0
- data/vendor/assets/js/foundation.abide.js.es6 +28 -0
- data/vendor/assets/js/foundation.accordion.js.es6 +1 -1
- data/vendor/assets/js/foundation.accordionMenu.js.es6 +9 -1
- data/vendor/assets/js/foundation.core.js.es6 +4 -4
- data/vendor/assets/js/foundation.drilldown.js.es6 +128 -14
- data/vendor/assets/js/foundation.dropdown.js.es6 +48 -42
- data/vendor/assets/js/foundation.dropdownMenu.js.es6 +20 -18
- data/vendor/assets/js/foundation.equalizer.js.es6 +12 -6
- data/vendor/assets/js/foundation.interchange.js.es6 +3 -2
- data/vendor/assets/js/foundation.js.es6 +2 -1
- data/vendor/assets/js/foundation.magellan.js.es6 +28 -9
- data/vendor/assets/js/foundation.offcanvas.js.es6 +90 -123
- data/vendor/assets/js/foundation.orbit.js.es6 +61 -10
- data/vendor/assets/js/foundation.responsiveMenu.js.es6 +2 -0
- data/vendor/assets/js/foundation.responsiveToggle.js.es6 +52 -12
- data/vendor/assets/js/foundation.reveal.js.es6 +48 -48
- data/vendor/assets/js/foundation.slider.js.es6 +124 -42
- data/vendor/assets/js/foundation.sticky.js.es6 +11 -9
- data/vendor/assets/js/foundation.tabs.js.es6 +164 -35
- data/vendor/assets/js/foundation.toggler.js.es6 +3 -0
- data/vendor/assets/js/foundation.tooltip.js.es6 +20 -10
- data/vendor/assets/js/foundation.util.box.js.es6 +2 -2
- data/vendor/assets/js/foundation.util.keyboard.js.es6 +37 -0
- data/vendor/assets/js/foundation.util.mediaQuery.js.es6 +16 -0
- data/vendor/assets/js/foundation.util.motion.js.es6 +7 -1
- data/vendor/assets/js/foundation.util.nest.js.es6 +10 -5
- data/vendor/assets/js/foundation.util.timerAndImageLoader.js.es6 +6 -4
- data/vendor/assets/js/foundation.util.triggers.js.es6 +54 -36
- data/vendor/assets/js/foundation.zf.responsiveAccordionTabs.js.es6 +240 -0
- data/vendor/assets/scss/_global.scss +25 -450
- data/vendor/assets/scss/components/_accordion-menu.scss +8 -4
- data/vendor/assets/scss/components/_accordion.scss +43 -22
- data/vendor/assets/scss/components/_badge.scss +17 -9
- data/vendor/assets/scss/components/_breadcrumbs.scss +7 -5
- data/vendor/assets/scss/components/_button-group.scss +54 -6
- data/vendor/assets/scss/components/_button.scss +27 -16
- data/vendor/assets/scss/components/_callout.scss +3 -2
- data/vendor/assets/scss/components/_card.scss +121 -0
- data/vendor/assets/scss/components/_close-button.scss +54 -13
- data/vendor/assets/scss/components/_drilldown.scss +19 -5
- data/vendor/assets/scss/components/_dropdown-menu.scss +23 -18
- data/vendor/assets/scss/components/_dropdown.scss +14 -7
- data/vendor/assets/scss/components/_flex-video.scss +1 -63
- data/vendor/assets/scss/components/_float.scss +1 -1
- data/vendor/assets/scss/components/_label.scss +16 -8
- data/vendor/assets/scss/components/_media-object.scss +2 -3
- data/vendor/assets/scss/components/_menu.scss +68 -33
- data/vendor/assets/scss/components/_off-canvas.scss +231 -80
- data/vendor/assets/scss/components/_orbit.scss +8 -6
- data/vendor/assets/scss/components/_pagination.scss +42 -22
- data/vendor/assets/scss/components/_progress-bar.scss +1 -1
- data/vendor/assets/scss/components/_responsive-embed.scss +66 -0
- data/vendor/assets/scss/components/_reveal.scss +17 -11
- data/vendor/assets/scss/components/_slider.scss +6 -1
- data/vendor/assets/scss/components/_sticky.scss +3 -3
- data/vendor/assets/scss/components/_switch.scss +47 -36
- data/vendor/assets/scss/components/_table.scss +83 -23
- data/vendor/assets/scss/components/_tabs.scss +54 -23
- data/vendor/assets/scss/components/_thumbnail.scss +17 -4
- data/vendor/assets/scss/components/_title-bar.scss +5 -6
- data/vendor/assets/scss/components/_tooltip.scss +15 -12
- data/vendor/assets/scss/components/_top-bar.scss +11 -8
- data/vendor/assets/scss/forms/_checkbox.scss +2 -1
- data/vendor/assets/scss/forms/_error.scss +10 -6
- data/vendor/assets/scss/forms/_fieldset.scss +7 -7
- data/vendor/assets/scss/forms/_input-group.scss +17 -11
- data/vendor/assets/scss/forms/_label.scss +2 -0
- data/vendor/assets/scss/forms/_meter.scss +9 -10
- data/vendor/assets/scss/forms/_progress.scss +9 -9
- data/vendor/assets/scss/forms/_range.scss +20 -15
- data/vendor/assets/scss/forms/_select.scss +26 -8
- data/vendor/assets/scss/forms/_text.scss +19 -16
- data/vendor/assets/scss/foundation.scss +19 -3
- data/vendor/assets/scss/grid/_classes.scss +31 -14
- data/vendor/assets/scss/grid/_column.scss +10 -24
- data/vendor/assets/scss/grid/_flex-grid.scss +84 -76
- data/vendor/assets/scss/grid/_grid.scss +0 -16
- data/vendor/assets/scss/grid/_gutter.scss +53 -5
- data/vendor/assets/scss/grid/_layout.scss +3 -3
- data/vendor/assets/scss/grid/_position.scss +3 -3
- data/vendor/assets/scss/grid/_row.scss +24 -19
- data/vendor/assets/scss/settings/_settings.scss +117 -70
- data/vendor/assets/scss/typography/_base.scss +110 -44
- data/vendor/assets/scss/typography/_helpers.scss +1 -0
- data/vendor/assets/scss/typography/_print.scss +7 -3
- data/vendor/assets/scss/typography/_typography.scss +0 -2
- data/vendor/assets/scss/util/_breakpoint.scss +28 -19
- data/vendor/assets/scss/util/_color.scss +69 -16
- data/vendor/assets/scss/util/_flex.scss +20 -3
- data/vendor/assets/scss/util/_math.scss +72 -0
- data/vendor/assets/scss/util/_mixins.scss +63 -26
- data/vendor/assets/scss/util/_selector.scss +3 -2
- data/vendor/assets/scss/util/_unit.scss +61 -4
- data/vendor/assets/scss/util/_util.scss +1 -0
- data/vendor/assets/scss/util/_value.scss +33 -0
- metadata +17 -2
@@ -22,6 +22,10 @@ $input-font-family: inherit !default;
|
|
22
22
|
/// @type Number
|
23
23
|
$input-font-size: rem-calc(16) !default;
|
24
24
|
|
25
|
+
/// Font weight of text inputs.
|
26
|
+
/// @type Keyword
|
27
|
+
$input-font-weight: $global-weight-normal !default;
|
28
|
+
|
25
29
|
/// Background color of text inputs.
|
26
30
|
/// @type Color
|
27
31
|
$input-background: $white !default;
|
@@ -66,9 +70,9 @@ $input-number-spinners: true !default;
|
|
66
70
|
/// @type Border
|
67
71
|
$input-radius: $global-radius !default;
|
68
72
|
|
69
|
-
/// Border radius for buttons, defaulted to global-radius.
|
73
|
+
/// Border radius for form buttons, defaulted to global-radius.
|
70
74
|
/// @type Number
|
71
|
-
$button-radius: $global-radius !default;
|
75
|
+
$form-button-radius: $global-radius !default;
|
72
76
|
|
73
77
|
@mixin form-element {
|
74
78
|
$height: ($input-font-size + ($form-spacing * 1.5) - rem-calc(1));
|
@@ -77,16 +81,18 @@ $button-radius: $global-radius !default;
|
|
77
81
|
box-sizing: border-box;
|
78
82
|
width: 100%;
|
79
83
|
height: $height;
|
84
|
+
margin: 0 0 $form-spacing;
|
80
85
|
padding: $form-spacing / 2;
|
86
|
+
|
81
87
|
border: $input-border;
|
82
|
-
|
88
|
+
border-radius: $input-radius;
|
89
|
+
background-color: $input-background;
|
90
|
+
box-shadow: $input-shadow;
|
83
91
|
|
84
92
|
font-family: $input-font-family;
|
85
93
|
font-size: $input-font-size;
|
94
|
+
font-weight: $input-font-weight;
|
86
95
|
color: $input-color;
|
87
|
-
background-color: $input-background;
|
88
|
-
box-shadow: $input-shadow;
|
89
|
-
border-radius: $input-radius;
|
90
96
|
|
91
97
|
@if has-value($input-transition) {
|
92
98
|
transition: $input-transition;
|
@@ -94,9 +100,9 @@ $button-radius: $global-radius !default;
|
|
94
100
|
|
95
101
|
// Focus state
|
96
102
|
&:focus {
|
103
|
+
outline: none;
|
97
104
|
border: $input-border-focus;
|
98
105
|
background-color: $input-background-focus;
|
99
|
-
outline: none;
|
100
106
|
box-shadow: $input-shadow-focus;
|
101
107
|
|
102
108
|
@if has-value($input-transition) {
|
@@ -110,8 +116,7 @@ $button-radius: $global-radius !default;
|
|
110
116
|
#{text-inputs()},
|
111
117
|
textarea {
|
112
118
|
@include form-element;
|
113
|
-
|
114
|
-
-moz-appearance: none;
|
119
|
+
appearance: none;
|
115
120
|
}
|
116
121
|
|
117
122
|
// Text areas
|
@@ -141,25 +146,23 @@ $button-radius: $global-radius !default;
|
|
141
146
|
// Reset styles on button-like inputs
|
142
147
|
[type='submit'],
|
143
148
|
[type='button'] {
|
144
|
-
|
145
|
-
-
|
146
|
-
-moz-appearance: none;
|
149
|
+
appearance: none;
|
150
|
+
border-radius: $form-button-radius;
|
147
151
|
}
|
148
152
|
|
149
153
|
// Reset Normalize setting content-box to search elements
|
150
|
-
//
|
151
|
-
input[type='search'] {
|
154
|
+
input[type='search'] { // sass-lint:disable-line no-qualifying-elements
|
152
155
|
box-sizing: border-box;
|
153
156
|
}
|
154
157
|
|
155
158
|
// Number input styles
|
156
159
|
[type='number'] {
|
157
160
|
@if not $input-number-spinners {
|
158
|
-
-moz-appearance: textfield;
|
161
|
+
-moz-appearance: textfield; // sass-lint:disable-line no-vendor-prefix
|
159
162
|
|
160
163
|
&::-webkit-inner-spin-button,
|
161
164
|
&::-webkit-outer-spin-button {
|
162
|
-
-webkit-appearance: none;
|
165
|
+
-webkit-appearance: none; // sass-lint:disable-line no-vendor-prefix
|
163
166
|
margin: 0;
|
164
167
|
}
|
165
168
|
}
|
@@ -1,10 +1,24 @@
|
|
1
1
|
/**
|
2
2
|
* Foundation for Sites by ZURB
|
3
|
-
* Version 6.
|
3
|
+
* Version 6.3.0
|
4
4
|
* foundation.zurb.com
|
5
5
|
* Licensed under MIT Open Source
|
6
6
|
*/
|
7
7
|
|
8
|
+
// Dependencies
|
9
|
+
@import "../_vendor/normalize-scss/sass/normalize";
|
10
|
+
@import '../_vendor/sassy-lists/stylesheets/helpers/missing-dependencies';
|
11
|
+
@import '../_vendor/sassy-lists/stylesheets/helpers/true';
|
12
|
+
@import '../_vendor/sassy-lists/stylesheets/functions/purge';
|
13
|
+
@import '../_vendor/sassy-lists/stylesheets/functions/remove';
|
14
|
+
@import '../_vendor/sassy-lists/stylesheets/functions/replace';
|
15
|
+
@import '../_vendor/sassy-lists/stylesheets/functions/to-list';
|
16
|
+
|
17
|
+
// Settings
|
18
|
+
// import your own `settings` here or
|
19
|
+
// import and modify the default settings through
|
20
|
+
// @import "settings/settings";
|
21
|
+
|
8
22
|
// Sass utilities
|
9
23
|
@import 'util/util';
|
10
24
|
|
@@ -24,12 +38,13 @@
|
|
24
38
|
@import 'components/badge';
|
25
39
|
@import 'components/breadcrumbs';
|
26
40
|
@import 'components/callout';
|
41
|
+
@import 'components/card';
|
27
42
|
@import 'components/close-button';
|
28
43
|
@import 'components/drilldown';
|
29
44
|
@import 'components/dropdown-menu';
|
30
45
|
@import 'components/dropdown';
|
31
46
|
@import 'components/flex';
|
32
|
-
@import 'components/
|
47
|
+
@import 'components/responsive-embed';
|
33
48
|
@import 'components/label';
|
34
49
|
@import 'components/media-object';
|
35
50
|
@import 'components/menu';
|
@@ -70,13 +85,14 @@
|
|
70
85
|
@include foundation-breadcrumbs;
|
71
86
|
@include foundation-button-group;
|
72
87
|
@include foundation-callout;
|
88
|
+
@include foundation-card;
|
73
89
|
@include foundation-close-button;
|
74
90
|
@include foundation-menu;
|
75
91
|
@include foundation-menu-icon;
|
76
92
|
@include foundation-drilldown-menu;
|
77
93
|
@include foundation-dropdown;
|
78
94
|
@include foundation-dropdown-menu;
|
79
|
-
@include foundation-
|
95
|
+
@include foundation-responsive-embed;
|
80
96
|
@include foundation-label;
|
81
97
|
@include foundation-media-object;
|
82
98
|
@include foundation-off-canvas;
|
@@ -12,6 +12,7 @@
|
|
12
12
|
$row: 'row',
|
13
13
|
$column: 'column',
|
14
14
|
$column-row: 'column-row',
|
15
|
+
$gutter: 'gutter',
|
15
16
|
$push: 'push',
|
16
17
|
$pull: 'pull',
|
17
18
|
$center: 'centered',
|
@@ -20,7 +21,8 @@
|
|
20
21
|
$uncollapse: 'uncollapse',
|
21
22
|
$offset: 'offset',
|
22
23
|
$end: 'end',
|
23
|
-
$expanded: 'expanded'
|
24
|
+
$expanded: 'expanded',
|
25
|
+
$block: 'block'
|
24
26
|
) {
|
25
27
|
// Row
|
26
28
|
.#{$row} {
|
@@ -38,18 +40,30 @@
|
|
38
40
|
@include grid-row-nest($grid-column-gutter);
|
39
41
|
|
40
42
|
&.#{$collapse} {
|
41
|
-
margin-left: 0;
|
42
43
|
margin-right: 0;
|
44
|
+
margin-left: 0;
|
43
45
|
}
|
44
46
|
}
|
45
47
|
|
46
48
|
// Expanded (full-width) row
|
47
49
|
&.#{$expanded} {
|
48
|
-
|
50
|
+
@include grid-row-size(expand);
|
49
51
|
|
50
52
|
.#{$row} {
|
51
|
-
margin-left: auto;
|
52
53
|
margin-right: auto;
|
54
|
+
margin-left: auto;
|
55
|
+
}
|
56
|
+
}
|
57
|
+
|
58
|
+
@if type-of($grid-column-gutter) == 'map' {
|
59
|
+
// Static (unresponsive) row gutters
|
60
|
+
//
|
61
|
+
@each $breakpoint, $value in $grid-column-gutter {
|
62
|
+
&.#{$gutter}-#{$breakpoint} {
|
63
|
+
> .#{$column} {
|
64
|
+
@include grid-col-gutter($value);
|
65
|
+
}
|
66
|
+
}
|
53
67
|
}
|
54
68
|
}
|
55
69
|
}
|
@@ -73,10 +87,10 @@
|
|
73
87
|
|
74
88
|
// To properly nest a column row, padding and margin is removed
|
75
89
|
.#{$row} .#{$column}.#{$row}.#{$row} {
|
76
|
-
padding-left: 0;
|
77
|
-
padding-right: 0;
|
78
|
-
margin-left: 0;
|
79
90
|
margin-right: 0;
|
91
|
+
margin-left: 0;
|
92
|
+
padding-right: 0;
|
93
|
+
padding-left: 0;
|
80
94
|
}
|
81
95
|
|
82
96
|
@include -zf-each-breakpoint {
|
@@ -108,7 +122,7 @@
|
|
108
122
|
// Block grid
|
109
123
|
@for $i from 1 through $block-grid-max {
|
110
124
|
.#{$-zf-size}-up-#{$i} {
|
111
|
-
@include grid-layout($i,
|
125
|
+
@include grid-layout($i, '.#{$column}');
|
112
126
|
}
|
113
127
|
}
|
114
128
|
|
@@ -117,20 +131,18 @@
|
|
117
131
|
> .#{$column} { @include grid-col-collapse; }
|
118
132
|
|
119
133
|
.#{$row} {
|
120
|
-
margin-left: 0;
|
121
134
|
margin-right: 0;
|
135
|
+
margin-left: 0;
|
122
136
|
}
|
123
137
|
}
|
124
138
|
|
125
139
|
.#{$expanded}.#{$row} .#{$-zf-size}-#{$collapse}.#{$row} {
|
126
|
-
margin-left: 0;
|
127
140
|
margin-right: 0;
|
141
|
+
margin-left: 0;
|
128
142
|
}
|
129
143
|
|
130
144
|
.#{$-zf-size}-#{$uncollapse} {
|
131
|
-
$
|
132
|
-
|
133
|
-
> .#{$column} { @include grid-col-uncollapse($gutter); }
|
145
|
+
> .#{$column} { @include grid-col-gutter($-zf-size); }
|
134
146
|
}
|
135
147
|
|
136
148
|
// Positioning
|
@@ -146,9 +158,14 @@
|
|
146
158
|
}
|
147
159
|
}
|
148
160
|
|
161
|
+
// Block grid columns
|
162
|
+
.#{$column}-#{$block} {
|
163
|
+
@include grid-column-margin;
|
164
|
+
}
|
165
|
+
|
149
166
|
@if $column == 'column' {
|
150
167
|
.columns {
|
151
|
-
//
|
168
|
+
// sass-lint:disable-block placeholder-in-extend
|
152
169
|
@extend .column;
|
153
170
|
}
|
154
171
|
}
|
@@ -52,30 +52,16 @@
|
|
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 {
|
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
|
-
$
|
58
|
+
$gutters: $grid-column-gutter
|
59
59
|
) {
|
60
60
|
@include grid-column-size($columns);
|
61
61
|
float: $global-left;
|
62
62
|
|
63
63
|
// Gutters
|
64
|
-
@
|
65
|
-
@each $breakpoint, $value in $gutter {
|
66
|
-
$padding: rem-calc($value) / 2;
|
67
|
-
|
68
|
-
@include breakpoint($breakpoint) {
|
69
|
-
padding-left: $padding;
|
70
|
-
padding-right: $padding;
|
71
|
-
}
|
72
|
-
}
|
73
|
-
}
|
74
|
-
@else if type-of($gutter) == 'number' and strip-unit($gutter) > 0 {
|
75
|
-
$padding: rem-calc($gutter) / 2;
|
76
|
-
padding-left: $padding;
|
77
|
-
padding-right: $padding;
|
78
|
-
}
|
64
|
+
@include grid-column-gutter($gutters: $gutters);
|
79
65
|
|
80
66
|
// Last column alignment
|
81
67
|
@if $grid-column-align-edge {
|
@@ -87,12 +73,12 @@
|
|
87
73
|
|
88
74
|
/// Creates a grid column row. This is the equivalent of adding `.row` and `.column` to the same element.
|
89
75
|
///
|
90
|
-
/// @param {
|
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.
|
91
77
|
@mixin grid-column-row(
|
92
|
-
$
|
78
|
+
$gutters: $grid-column-gutter
|
93
79
|
) {
|
94
80
|
@include grid-row;
|
95
|
-
@include grid-column($
|
81
|
+
@include grid-column($gutters: $gutters);
|
96
82
|
|
97
83
|
&,
|
98
84
|
&:last-child {
|
@@ -112,15 +98,15 @@
|
|
112
98
|
/// @alias grid-column
|
113
99
|
@mixin grid-col(
|
114
100
|
$columns: $grid-column-count,
|
115
|
-
$
|
101
|
+
$gutters: $grid-column-gutter
|
116
102
|
) {
|
117
|
-
@include grid-column($columns, $
|
103
|
+
@include grid-column($columns, $gutters);
|
118
104
|
}
|
119
105
|
|
120
106
|
/// Shorthand for `grid-column-row()`.
|
121
107
|
/// @alias grid-column-row
|
122
108
|
@mixin grid-col-row(
|
123
|
-
$
|
109
|
+
$gutters: $grid-column-gutter
|
124
110
|
) {
|
125
|
-
@include grid-column-row($
|
111
|
+
@include grid-column-row($gutters);
|
126
112
|
}
|
@@ -10,36 +10,38 @@
|
|
10
10
|
///
|
11
11
|
/// @param {Keyword|List} $behavior [null]
|
12
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 {Number} $
|
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
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
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} $
|
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
17
|
@mixin flex-grid-row(
|
18
18
|
$behavior: null,
|
19
|
-
$
|
19
|
+
$size: $grid-row-width,
|
20
20
|
$columns: null,
|
21
21
|
$base: true,
|
22
|
-
$
|
22
|
+
$wrap: true,
|
23
|
+
$gutters: $grid-column-gutter
|
23
24
|
) {
|
24
25
|
$margin: auto;
|
26
|
+
$wrap: if($wrap, wrap, nowrap);
|
25
27
|
|
26
28
|
@if index($behavior, nest) != null {
|
27
|
-
@include grid-row-nest($
|
29
|
+
@include grid-row-nest($gutters);
|
28
30
|
|
29
31
|
@if index($behavior, collapse) != null {
|
30
|
-
margin-left: 0;
|
31
32
|
margin-right: 0;
|
33
|
+
margin-left: 0;
|
32
34
|
}
|
33
35
|
}
|
34
36
|
@else {
|
35
|
-
|
36
|
-
margin-left: auto;
|
37
|
+
@include grid-row-size($size);
|
37
38
|
margin-right: auto;
|
39
|
+
margin-left: auto;
|
38
40
|
}
|
39
41
|
|
40
42
|
@if $base {
|
41
43
|
display: flex;
|
42
|
-
flex-flow: row wrap;
|
44
|
+
flex-flow: row $wrap;
|
43
45
|
}
|
44
46
|
|
45
47
|
@if $columns != null {
|
@@ -50,18 +52,17 @@
|
|
50
52
|
}
|
51
53
|
|
52
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:
|
53
|
-
/// - `
|
55
|
+
/// - `expand` (the default) will make the column expand to fill space.
|
54
56
|
/// - `shrink` will make the column contract, so it only takes up the horizontal space it needs.
|
55
57
|
///
|
56
|
-
/// @param {Mixed} $columns [
|
57
|
-
@function flex-grid-column($columns:
|
58
|
-
//
|
59
|
-
$flex: 1 1 0px;
|
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
|
60
61
|
|
61
62
|
@if $columns == shrink {
|
62
63
|
$flex: 0 0 auto;
|
63
64
|
}
|
64
|
-
@else if $columns !=
|
65
|
+
@else if $columns != expand {
|
65
66
|
$flex: 0 0 grid-column($columns);
|
66
67
|
}
|
67
68
|
|
@@ -70,39 +71,25 @@
|
|
70
71
|
|
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.
|
72
73
|
///
|
73
|
-
/// @param {Mixed} $columns [
|
74
|
+
/// @param {Mixed} $columns [expand] - Width of the column. Refer to the `flex-grid-column()` function to see possible values.
|
74
75
|
/// @param {Number} $gutter [$grid-column-gutter] - Space between columns, added as a left and right padding.
|
75
76
|
@mixin flex-grid-column(
|
76
|
-
$columns:
|
77
|
-
$
|
77
|
+
$columns: expand,
|
78
|
+
$gutters: $grid-column-gutter
|
78
79
|
) {
|
79
80
|
// Base properties
|
80
|
-
|
81
|
+
@include flex-grid-size($columns);
|
81
82
|
|
82
83
|
// Gutters
|
83
|
-
@
|
84
|
-
@each $breakpoint, $value in $gutter {
|
85
|
-
$padding: rem-calc($value) / 2;
|
86
|
-
|
87
|
-
@include breakpoint($breakpoint) {
|
88
|
-
padding-left: $padding;
|
89
|
-
padding-right: $padding;
|
90
|
-
}
|
91
|
-
}
|
92
|
-
}
|
93
|
-
@else if type-of($gutter) == 'number' and strip-unit($gutter) > 0 {
|
94
|
-
$padding: rem-calc($gutter) / 2;
|
95
|
-
padding-left: $padding;
|
96
|
-
padding-right: $padding;
|
97
|
-
}
|
84
|
+
@include grid-column-gutter($gutters: $gutters);
|
98
85
|
|
99
86
|
// fixes recent Chrome version not limiting child width
|
100
87
|
// https://stackoverflow.com/questions/34934586/white-space-nowrap-and-flexbox-did-not-work-in-chrome
|
101
|
-
@if $columns ==
|
88
|
+
@if $columns == expand {
|
102
89
|
min-width: initial;
|
103
90
|
}
|
104
91
|
// max-width fixes IE 10/11 not respecting the flex-basis property
|
105
|
-
@if $columns !=
|
92
|
+
@if $columns != expand and $columns != shrink {
|
106
93
|
max-width: grid-column($columns);
|
107
94
|
}
|
108
95
|
}
|
@@ -125,30 +112,20 @@
|
|
125
112
|
}
|
126
113
|
}
|
127
114
|
|
128
|
-
/// Changes the
|
129
|
-
/// @param {
|
130
|
-
@mixin flex-grid-
|
131
|
-
|
132
|
-
@include flex-order($order);
|
133
|
-
}
|
115
|
+
/// Changes the width flex grid column.
|
116
|
+
/// @param {Mixed} $columns [expand] - Width of the column. Refer to the `flex-grid-column()` function to see possible values.
|
117
|
+
@mixin flex-grid-size($columns: null) {
|
118
|
+
$columns: $columns or expand;
|
134
119
|
|
135
|
-
|
136
|
-
///
|
137
|
-
/// @param {Keyword} $x [null] - Horizontal alignment to use. Can be `left`, `right`, `center`, `justify`, or `spaced`. Or, set it to `null` (the default) to not set horizontal alignment.
|
138
|
-
/// @param {Keyword} $y [null] - Vertical alignment to use. Can be `top`, `bottom`, `middle`, or `stretch`. Or, set it to `null` (the default) to not set vertical alignment.
|
139
|
-
@mixin flex-grid-row-align($x: null, $y: null) {
|
140
|
-
@warn 'This mixin is being replaced by flex-align(). flex-grid-row-align() will be removed in Foundation 6.3.';
|
141
|
-
@include flex-align($x, $y);
|
142
|
-
}
|
120
|
+
flex: flex-grid-column($columns);
|
143
121
|
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
@warn 'This mixin is being replaced by flex-align-self(). flex-grid-column-align() will be removed in Foundation 6.3.';
|
149
|
-
@include flex-align-self($y);
|
122
|
+
// max-width fixes IE 10/11 not respecting the flex-basis property
|
123
|
+
@if $columns != expand and $columns != shrink {
|
124
|
+
max-width: grid-column($columns);
|
125
|
+
}
|
150
126
|
}
|
151
127
|
|
128
|
+
|
152
129
|
@mixin foundation-flex-grid {
|
153
130
|
// Row
|
154
131
|
.row {
|
@@ -161,7 +138,7 @@
|
|
161
138
|
|
162
139
|
// Expanded row
|
163
140
|
&.expanded {
|
164
|
-
|
141
|
+
@include grid-row-size(expand);
|
165
142
|
}
|
166
143
|
|
167
144
|
&.collapse {
|
@@ -174,8 +151,8 @@
|
|
174
151
|
// From collapsed child
|
175
152
|
&.is-collapse-child,
|
176
153
|
&.collapse > .column > .row {
|
177
|
-
margin-left: 0;
|
178
154
|
margin-right: 0;
|
155
|
+
margin-left: 0;
|
179
156
|
}
|
180
157
|
}
|
181
158
|
|
@@ -187,16 +164,38 @@
|
|
187
164
|
// Column row
|
188
165
|
// The double .row class is needed to bump up the specificity
|
189
166
|
.column.row.row {
|
190
|
-
|
191
|
-
display: block;
|
167
|
+
display: flex;
|
192
168
|
}
|
193
169
|
|
194
170
|
// To properly nest a column row, padding and margin is removed
|
195
171
|
.row .column.row.row {
|
196
|
-
padding-left: 0;
|
197
|
-
padding-right: 0;
|
198
|
-
margin-left: 0;
|
199
172
|
margin-right: 0;
|
173
|
+
margin-left: 0;
|
174
|
+
padding-right: 0;
|
175
|
+
padding-left: 0;
|
176
|
+
}
|
177
|
+
|
178
|
+
|
179
|
+
.flex-container {
|
180
|
+
@include flex;
|
181
|
+
}
|
182
|
+
|
183
|
+
.flex-child-auto {
|
184
|
+
flex: 1 1 auto;
|
185
|
+
}
|
186
|
+
|
187
|
+
.flex-child-grow {
|
188
|
+
flex: 1 0 auto;
|
189
|
+
}
|
190
|
+
|
191
|
+
.flex-child-shrink {
|
192
|
+
flex: 0 1 auto;
|
193
|
+
}
|
194
|
+
|
195
|
+
@each $dir, $prop in $-zf-flex-direction {
|
196
|
+
.flex-dir-#{$dir} {
|
197
|
+
@include flex-direction($prop);
|
198
|
+
}
|
200
199
|
}
|
201
200
|
|
202
201
|
@include -zf-each-breakpoint {
|
@@ -237,6 +236,25 @@
|
|
237
236
|
}
|
238
237
|
}
|
239
238
|
|
239
|
+
// direction helper classes
|
240
|
+
@each $dir, $prop in $-zf-flex-direction {
|
241
|
+
.#{$-zf-size}-flex-dir-#{$dir} {
|
242
|
+
@include flex-direction($prop);
|
243
|
+
}
|
244
|
+
}
|
245
|
+
// child helper classes
|
246
|
+
.#{$-zf-size}-flex-child-auto {
|
247
|
+
flex: 1 1 auto;
|
248
|
+
}
|
249
|
+
|
250
|
+
.#{$-zf-size}-flex-child-grow {
|
251
|
+
flex: 1 0 auto;
|
252
|
+
}
|
253
|
+
|
254
|
+
.#{$-zf-size}-flex-child-shrink {
|
255
|
+
flex: 0 1 auto;
|
256
|
+
}
|
257
|
+
|
240
258
|
// Auto-stacking/unstacking
|
241
259
|
@at-root (without: media) {
|
242
260
|
.row.#{$-zf-size}-unstack {
|
@@ -257,9 +275,7 @@
|
|
257
275
|
}
|
258
276
|
|
259
277
|
.#{$-zf-size}-uncollapse {
|
260
|
-
|
261
|
-
|
262
|
-
> .column { @include grid-col-uncollapse($gutter); }
|
278
|
+
> .column { @include grid-col-gutter($-zf-size); }
|
263
279
|
}
|
264
280
|
}
|
265
281
|
|
@@ -269,16 +285,8 @@
|
|
269
285
|
max-width: 100%;
|
270
286
|
}
|
271
287
|
|
272
|
-
// Vertical alignment using align-items and align-self
|
273
|
-
// Remove these in 6.3
|
274
|
-
@each $vdir, $prop in $-zf-flex-align {
|
275
|
-
.column.align-#{$vdir} {
|
276
|
-
@include flex-align-self($vdir);
|
277
|
-
}
|
278
|
-
}
|
279
|
-
|
280
288
|
.columns {
|
281
|
-
//
|
282
|
-
|
289
|
+
@extend .column; // sass-lint:disable-line placeholder-in-extend
|
290
|
+
|
283
291
|
}
|
284
292
|
}
|