foundation-rails 6.6.2.0 → 6.9.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.travis.yml +2 -0
- data/Appraisals +4 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +198 -145
- data/bower.json +3 -3
- data/foundation-rails.gemspec +4 -4
- data/gemfiles/rails_7.1.gemfile +10 -0
- data/gemfiles/rails_7.1.gemfile.lock +261 -0
- data/lib/foundation/rails/version.rb +1 -1
- data/lib/generators/foundation/templates/_settings.scss +32 -28
- data/vendor/assets/js/foundation.cjs.js +1996 -3162
- data/vendor/assets/js/foundation.cjs.js.map +1 -1
- data/vendor/assets/js/foundation.es6.js +385 -292
- data/vendor/assets/js/foundation.es6.js.map +1 -1
- data/vendor/assets/js/foundation.esm.js +1663 -2832
- data/vendor/assets/js/foundation.esm.js.map +1 -1
- data/vendor/assets/js/foundation.js +2440 -3870
- data/vendor/assets/js/foundation.js.map +1 -1
- data/vendor/assets/js/foundation.min.js +1 -1
- data/vendor/assets/js/foundation.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.abide.js +238 -344
- data/vendor/assets/js/plugins/foundation.abide.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.abide.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.abide.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.accordion.js +197 -275
- data/vendor/assets/js/plugins/foundation.accordion.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.accordion.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.accordion.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.accordionMenu.js +174 -260
- data/vendor/assets/js/plugins/foundation.accordionMenu.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.accordionMenu.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.accordionMenu.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.core.js +308 -447
- data/vendor/assets/js/plugins/foundation.core.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.core.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.core.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.drilldown.js +258 -358
- data/vendor/assets/js/plugins/foundation.drilldown.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.drilldown.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.drilldown.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.dropdown.js +289 -457
- data/vendor/assets/js/plugins/foundation.dropdown.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.dropdown.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.dropdown.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.dropdownMenu.js +246 -346
- data/vendor/assets/js/plugins/foundation.dropdownMenu.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.dropdownMenu.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.dropdownMenu.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.equalizer.js +178 -261
- data/vendor/assets/js/plugins/foundation.equalizer.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.equalizer.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.equalizer.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.interchange.js +227 -326
- data/vendor/assets/js/plugins/foundation.interchange.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.interchange.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.interchange.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.magellan.js +225 -336
- data/vendor/assets/js/plugins/foundation.magellan.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.magellan.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.magellan.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.offcanvas.js +326 -471
- data/vendor/assets/js/plugins/foundation.offcanvas.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.offcanvas.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.offcanvas.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.orbit.js +244 -347
- data/vendor/assets/js/plugins/foundation.orbit.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.orbit.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.orbit.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.js +203 -278
- data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.responsiveMenu.js +205 -255
- data/vendor/assets/js/plugins/foundation.responsiveMenu.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.responsiveMenu.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.responsiveMenu.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.responsiveToggle.js +170 -226
- data/vendor/assets/js/plugins/foundation.responsiveToggle.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.responsiveToggle.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.responsiveToggle.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.reveal.js +284 -444
- data/vendor/assets/js/plugins/foundation.reveal.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.reveal.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.reveal.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.slider.js +322 -483
- data/vendor/assets/js/plugins/foundation.slider.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.slider.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.slider.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.smoothScroll.js +138 -188
- data/vendor/assets/js/plugins/foundation.smoothScroll.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.smoothScroll.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.smoothScroll.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.sticky.js +253 -394
- data/vendor/assets/js/plugins/foundation.sticky.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.sticky.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.sticky.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.tabs.js +228 -317
- data/vendor/assets/js/plugins/foundation.tabs.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.tabs.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.tabs.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.toggler.js +207 -294
- data/vendor/assets/js/plugins/foundation.toggler.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.toggler.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.toggler.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.tooltip.js +275 -434
- data/vendor/assets/js/plugins/foundation.tooltip.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.tooltip.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.tooltip.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.box.js +130 -186
- data/vendor/assets/js/plugins/foundation.util.box.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.box.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.util.box.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.imageLoader.js +110 -150
- data/vendor/assets/js/plugins/foundation.util.imageLoader.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.imageLoader.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.util.imageLoader.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.keyboard.js +157 -172
- data/vendor/assets/js/plugins/foundation.util.keyboard.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.keyboard.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.util.keyboard.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.mediaQuery.js +167 -233
- data/vendor/assets/js/plugins/foundation.util.mediaQuery.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.mediaQuery.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.util.mediaQuery.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.motion.js +123 -161
- data/vendor/assets/js/plugins/foundation.util.motion.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.motion.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.util.motion.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.nest.js +123 -160
- data/vendor/assets/js/plugins/foundation.util.nest.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.nest.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.util.nest.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.timer.js +116 -171
- data/vendor/assets/js/plugins/foundation.util.timer.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.timer.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.util.timer.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.touch.js +172 -228
- data/vendor/assets/js/plugins/foundation.util.touch.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.touch.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.util.touch.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.triggers.js +158 -222
- data/vendor/assets/js/plugins/foundation.util.triggers.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.triggers.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.util.triggers.min.js.map +1 -1
- data/vendor/assets/scss/_global.scss +18 -5
- data/vendor/assets/scss/components/_accordion-menu.scss +2 -2
- data/vendor/assets/scss/components/_badge.scss +1 -1
- data/vendor/assets/scss/components/_breadcrumbs.scss +2 -1
- data/vendor/assets/scss/components/_button-group.scss +13 -8
- data/vendor/assets/scss/components/_button.scss +13 -13
- data/vendor/assets/scss/components/_callout.scss +2 -2
- data/vendor/assets/scss/components/_close-button.scss +5 -4
- data/vendor/assets/scss/components/_dropdown-menu.scss +1 -1
- data/vendor/assets/scss/components/_label.scss +1 -1
- data/vendor/assets/scss/components/_menu.scss +54 -19
- data/vendor/assets/scss/components/_off-canvas.scss +18 -16
- data/vendor/assets/scss/components/_orbit.scss +3 -3
- data/vendor/assets/scss/components/_pagination.scss +1 -1
- data/vendor/assets/scss/components/_progress-bar.scss +1 -1
- data/vendor/assets/scss/components/_responsive-embed.scss +1 -1
- data/vendor/assets/scss/components/_reveal.scss +8 -3
- data/vendor/assets/scss/components/_slider.scss +5 -2
- data/vendor/assets/scss/components/_switch.scss +25 -2
- data/vendor/assets/scss/components/_table.scss +8 -7
- data/vendor/assets/scss/components/_tabs.scss +2 -2
- data/vendor/assets/scss/components/_top-bar.scss +7 -5
- data/vendor/assets/scss/components/_visibility.scss +45 -2
- data/vendor/assets/scss/forms/_label.scss +2 -1
- data/vendor/assets/scss/forms/_progress.scss +1 -1
- data/vendor/assets/scss/forms/_range.scss +1 -1
- data/vendor/assets/scss/forms/_select.scss +5 -4
- data/vendor/assets/scss/forms/_text.scss +2 -2
- data/vendor/assets/scss/foundation.scss +1 -1
- data/vendor/assets/scss/grid/_classes.scss +1 -1
- data/vendor/assets/scss/grid/_column.scss +3 -2
- data/vendor/assets/scss/grid/_flex-grid.scss +7 -6
- data/vendor/assets/scss/grid/_gutter.scss +1 -1
- data/vendor/assets/scss/grid/_layout.scss +5 -5
- data/vendor/assets/scss/grid/_position.scss +4 -4
- data/vendor/assets/scss/grid/_row.scss +1 -1
- data/vendor/assets/scss/motion-ui/util/_animation.scss +1 -1
- data/vendor/assets/scss/motion-ui/util/_series.scss +1 -1
- data/vendor/assets/scss/motion-ui/util/_unit.scss +54 -1
- data/vendor/assets/scss/prototype/_border-none.scss +1 -1
- data/vendor/assets/scss/prototype/_font-styling.scss +2 -2
- data/vendor/assets/scss/prototype/_overflow.scss +9 -0
- data/vendor/assets/scss/prototype/_rotate.scss +7 -5
- data/vendor/assets/scss/prototype/_separator.scss +5 -5
- data/vendor/assets/scss/prototype/_shadow.scss +1 -2
- data/vendor/assets/scss/prototype/_spacing.scss +33 -33
- data/vendor/assets/scss/prototype/_text-transformation.scss +3 -3
- data/vendor/assets/scss/settings/_settings.scss +32 -28
- data/vendor/assets/scss/typography/_base.scss +6 -6
- data/vendor/assets/scss/typography/_helpers.scss +10 -2
- data/vendor/assets/scss/typography/_print.scss +2 -2
- data/vendor/assets/scss/util/_breakpoint.scss +21 -18
- data/vendor/assets/scss/util/_color.scss +20 -8
- data/vendor/assets/scss/util/_direction.scss +1 -1
- data/vendor/assets/scss/util/_flex.scss +1 -1
- data/vendor/assets/scss/util/_math.scss +61 -9
- data/vendor/assets/scss/util/_mixins.scss +18 -14
- data/vendor/assets/scss/util/_selector.scss +1 -15
- data/vendor/assets/scss/util/_typography.scss +6 -6
- data/vendor/assets/scss/util/_unit.scss +14 -8
- data/vendor/assets/scss/util/_value.scss +3 -18
- data/vendor/assets/scss/vendor/normalize.scss +19 -2
- data/vendor/assets/scss/xy-grid/_cell.scss +16 -5
- data/vendor/assets/scss/xy-grid/_classes.scss +8 -8
- data/vendor/assets/scss/xy-grid/_frame.scss +12 -0
- data/vendor/assets/scss/xy-grid/_grid.scss +2 -2
- data/vendor/assets/scss/xy-grid/_gutters.scss +2 -2
- data/vendor/assets/scss/xy-grid/_layout.scss +1 -1
- data/vendor/assets/scss/xy-grid/_position.scss +12 -7
- data/vendor/assets/scss/xy-grid/_xy-grid.scss +2 -2
- metadata +21 -19
@@ -52,7 +52,7 @@ $input-border-focus: 1px solid $dark-gray !default;
|
|
52
52
|
|
53
53
|
/// Padding of text inputs.
|
54
54
|
/// @type Color
|
55
|
-
$input-padding: $form-spacing
|
55
|
+
$input-padding: $form-spacing * 0.5 !default;
|
56
56
|
|
57
57
|
/// Box shadow inside text inputs when not focused.
|
58
58
|
/// @type Shadow
|
@@ -124,8 +124,8 @@ $form-button-radius: $global-radius !default;
|
|
124
124
|
// Text inputs
|
125
125
|
#{text-inputs()},
|
126
126
|
textarea {
|
127
|
-
@include form-element;
|
128
127
|
appearance: none;
|
128
|
+
@include form-element;
|
129
129
|
}
|
130
130
|
|
131
131
|
// Text areas
|
@@ -27,14 +27,15 @@
|
|
27
27
|
$columns: $grid-column-count,
|
28
28
|
$gutters: $grid-column-gutter
|
29
29
|
) {
|
30
|
-
@include grid-column-size($columns);
|
31
30
|
float: $global-left;
|
32
31
|
|
32
|
+
@include grid-column-size($columns);
|
33
|
+
|
33
34
|
// Gutters
|
34
35
|
@include grid-column-gutter($gutters: $gutters);
|
35
|
-
|
36
36
|
// Position
|
37
37
|
@include grid-col-pos(auto);
|
38
|
+
|
38
39
|
}
|
39
40
|
|
40
41
|
/// Creates a grid column row. This is the equivalent of adding `.row` and `.column` to the same element.
|
@@ -78,17 +78,18 @@
|
|
78
78
|
$columns: expand,
|
79
79
|
$gutters: $grid-column-gutter
|
80
80
|
) {
|
81
|
+
// fixes recent Chrome version not limiting child width
|
82
|
+
// https://stackoverflow.com/questions/34934586/white-space-nowrap-and-flexbox-did-not-work-in-chrome
|
83
|
+
@if $columns == expand {
|
84
|
+
min-width: 0;
|
85
|
+
}
|
86
|
+
|
81
87
|
// Base properties
|
82
88
|
@include flex-grid-size($columns);
|
83
89
|
|
84
90
|
// Gutters
|
85
91
|
@include grid-column-gutter($gutters: $gutters);
|
86
92
|
|
87
|
-
// fixes recent Chrome version not limiting child width
|
88
|
-
// https://stackoverflow.com/questions/34934586/white-space-nowrap-and-flexbox-did-not-work-in-chrome
|
89
|
-
@if $columns == expand {
|
90
|
-
min-width: 0;
|
91
|
-
}
|
92
93
|
}
|
93
94
|
|
94
95
|
/// Creates a block grid for a flex grid row.
|
@@ -102,7 +103,7 @@
|
|
102
103
|
flex-wrap: wrap;
|
103
104
|
|
104
105
|
> #{$selector} {
|
105
|
-
$pct: percentage(1
|
106
|
+
$pct: percentage(divide(1, $n));
|
106
107
|
|
107
108
|
flex: 0 0 $pct;
|
108
109
|
max-width: $pct;
|
@@ -21,14 +21,14 @@
|
|
21
21
|
) {
|
22
22
|
& > #{$selector} {
|
23
23
|
float: $global-left;
|
24
|
-
width: percentage(1
|
24
|
+
width: percentage(divide(1, $n));
|
25
25
|
|
26
26
|
// If a $gutter value is passed
|
27
27
|
@if($gutter) {
|
28
28
|
// Gutters
|
29
29
|
@if type-of($gutter) == 'map' {
|
30
30
|
@each $breakpoint, $value in $gutter {
|
31
|
-
$padding: rem-calc($value)
|
31
|
+
$padding: rem-calc($value) * 0.5;
|
32
32
|
|
33
33
|
@include breakpoint($breakpoint) {
|
34
34
|
padding-right: $padding;
|
@@ -37,7 +37,7 @@
|
|
37
37
|
}
|
38
38
|
}
|
39
39
|
@else if type-of($gutter) == 'number' and strip-unit($gutter) > 0 {
|
40
|
-
$padding: rem-calc($gutter)
|
40
|
+
$padding: rem-calc($gutter) * 0.5;
|
41
41
|
padding-right: $padding;
|
42
42
|
padding-left: $padding;
|
43
43
|
}
|
@@ -64,12 +64,12 @@
|
|
64
64
|
@for $i from 1 to $n {
|
65
65
|
@if $i == 1 {
|
66
66
|
&:nth-child(#{$n}n+1):last-child {
|
67
|
-
margin-left: (100 - 100
|
67
|
+
margin-left: (100 - divide(100, $n) * $i) * 0.5 * 1%;
|
68
68
|
}
|
69
69
|
}
|
70
70
|
@else {
|
71
71
|
&:nth-child(#{$n}n+1):nth-last-child(#{$i}) {
|
72
|
-
margin-left: (100 - 100
|
72
|
+
margin-left: (100 - divide(100, $n) * $i) * 0.5 * 1%;
|
73
73
|
}
|
74
74
|
}
|
75
75
|
}
|
@@ -32,7 +32,7 @@
|
|
32
32
|
|
33
33
|
// Push/pull
|
34
34
|
@else if type-of($position) == 'number' {
|
35
|
-
$offset: percentage($position
|
35
|
+
$offset: percentage(divide($position, $grid-column-count));
|
36
36
|
|
37
37
|
position: relative;
|
38
38
|
#{$global-left}: $offset;
|
@@ -40,12 +40,12 @@
|
|
40
40
|
|
41
41
|
// Center positioning
|
42
42
|
@else if $position == center {
|
43
|
+
margin-left: auto;
|
44
|
+
margin-right: auto;
|
43
45
|
&, &:last-child:not(:first-child) {
|
44
46
|
float: none;
|
45
47
|
clear: both;
|
46
48
|
}
|
47
|
-
margin-right: auto;
|
48
|
-
margin-left: auto;
|
49
49
|
}
|
50
50
|
|
51
51
|
@else {
|
@@ -55,10 +55,10 @@
|
|
55
55
|
|
56
56
|
/// Reset a position definition.
|
57
57
|
@mixin grid-column-unposition {
|
58
|
-
@include grid-column-position(auto);
|
59
58
|
position: static;
|
60
59
|
margin-right: 0;
|
61
60
|
margin-left: 0;
|
61
|
+
@include grid-column-position(auto);
|
62
62
|
}
|
63
63
|
|
64
64
|
/// Offsets a column to the right by `$n` columns.
|
@@ -80,7 +80,7 @@
|
|
80
80
|
/// @param {Number|Map} $gutters [$grid-column-gutter] - Gutter map or single value to use when inverting margins. Responsive gutter settings by default.
|
81
81
|
@mixin grid-row-nest($gutters: $grid-column-gutter) {
|
82
82
|
@include -zf-each-breakpoint {
|
83
|
-
$margin: rem-calc(-zf-get-bp-val($gutters, $-zf-size))
|
83
|
+
$margin: rem-calc(-zf-get-bp-val($gutters, $-zf-size)) * 0.5 * -1;
|
84
84
|
|
85
85
|
margin-right: $margin;
|
86
86
|
margin-left: $margin;
|
@@ -2,6 +2,6 @@
|
|
2
2
|
/// @param {Arglist} $effects... - One or more effect functions to build the keyframe with.
|
3
3
|
@mixin mui-animation($args...) {
|
4
4
|
$name: map-get(-mui-process-args($args...), name);
|
5
|
-
@include mui-keyframes($name, $args...);
|
6
5
|
animation-name: unquote($name);
|
6
|
+
@include mui-keyframes($name, $args...);
|
7
7
|
}
|
@@ -42,9 +42,9 @@ $-mui-queue: ();
|
|
42
42
|
|
43
43
|
// Start the animation
|
44
44
|
.#{map-get($motion-ui-settings, activate-queue-class)} & {
|
45
|
-
@include mui-animation($kf);
|
46
45
|
animation-delay: $actual-delay;
|
47
46
|
animation-duration: $duration;
|
47
|
+
@include mui-animation($kf);
|
48
48
|
}
|
49
49
|
|
50
50
|
// Pause the animation.
|
@@ -1,7 +1,60 @@
|
|
1
|
+
@use "sass:math";
|
2
|
+
|
1
3
|
/// Removes the unit (e.g. px, em, rem) from a value, returning the number only.
|
2
4
|
/// @param {Number} $num - Number to strip unit from.
|
3
5
|
/// @return {Number} The same number, sans unit.
|
4
6
|
/// @access private
|
7
|
+
|
8
|
+
/// Divide the given `$divident` by the given `$divisor`.
|
9
|
+
///
|
10
|
+
/// @param {Number} $divident - The divident.
|
11
|
+
/// @param {Number} $divisor - The divisor.
|
12
|
+
/// @param {Number} $precision - The precision decimals for the division.
|
13
|
+
///
|
14
|
+
/// @return {Number} The product of the division.
|
15
|
+
@function divide($dividend, $divisor, $precision: 12) {
|
16
|
+
$sign: if($dividend > 0 and $divisor > 0 or $dividend < 0 and $divisor < 0, 1, -1);
|
17
|
+
$dividend: math.abs($dividend);
|
18
|
+
$divisor: math.abs($divisor);
|
19
|
+
@if $dividend == 0 {
|
20
|
+
@return 0;
|
21
|
+
}
|
22
|
+
@if $divisor == 0 {
|
23
|
+
@error 'Cannot divide by 0';
|
24
|
+
}
|
25
|
+
$remainder: $dividend;
|
26
|
+
$result: 0;
|
27
|
+
$factor: 10;
|
28
|
+
@while ($remainder > 0 and $precision >= 0) {
|
29
|
+
$quotient: 0;
|
30
|
+
@while ($remainder >= $divisor) {
|
31
|
+
$remainder: $remainder - $divisor;
|
32
|
+
$quotient: $quotient + 1;
|
33
|
+
}
|
34
|
+
$result: $result * 10 + $quotient;
|
35
|
+
$factor: $factor * 0.1;
|
36
|
+
$remainder: $remainder * 10;
|
37
|
+
$precision: $precision - 1;
|
38
|
+
@if ($precision < 0 and $remainder >= $divisor * 5) {
|
39
|
+
$result: $result + 1;
|
40
|
+
}
|
41
|
+
}
|
42
|
+
$result: $result * $factor * $sign;
|
43
|
+
$dividend-unit: unit($dividend);
|
44
|
+
$divisor-unit: unit($divisor);
|
45
|
+
$unit-map: (
|
46
|
+
'px': 1px,
|
47
|
+
'rem': 1rem,
|
48
|
+
'em': 1em,
|
49
|
+
'%': 1%
|
50
|
+
);
|
51
|
+
@if ($dividend-unit != $divisor-unit and map-has-key($unit-map, $dividend-unit)) {
|
52
|
+
$result: $result * map-get($unit-map, $dividend-unit);
|
53
|
+
}
|
54
|
+
|
55
|
+
@return $result;
|
56
|
+
}
|
57
|
+
|
5
58
|
@function strip-unit($num) {
|
6
|
-
@return $num
|
59
|
+
@return divide($num, $num * 0 + 1);
|
7
60
|
}
|
@@ -52,7 +52,7 @@ $prototype-font-bold: $global-weight-bold !default;
|
|
52
52
|
}
|
53
53
|
|
54
54
|
@mixin foundation-prototype-font-styling {
|
55
|
-
.font-wide{
|
55
|
+
.font-wide {
|
56
56
|
@include font-wide;
|
57
57
|
}
|
58
58
|
|
@@ -73,7 +73,7 @@ $prototype-font-bold: $global-weight-bold !default;
|
|
73
73
|
@each $size in $breakpoint-classes {
|
74
74
|
@include breakpoint($size) {
|
75
75
|
@if $size != $-zf-zero-breakpoint {
|
76
|
-
.#{$size}-font-wide{
|
76
|
+
.#{$size}-font-wide {
|
77
77
|
@include font-wide;
|
78
78
|
}
|
79
79
|
|
@@ -22,18 +22,27 @@ $prototype-overflow: (
|
|
22
22
|
/// @param {String} $overflow [] Overflow classes
|
23
23
|
@mixin overflow($overflow) {
|
24
24
|
overflow: $overflow !important;
|
25
|
+
@if $overflow == 'scroll' {
|
26
|
+
-webkit-overflow-scrolling: touch;
|
27
|
+
}
|
25
28
|
}
|
26
29
|
|
27
30
|
/// Overflow classes on horizontal axis, by default coming through a map `$prototype-overflow`
|
28
31
|
/// @param {String} $overflow [] Overflow classes (horizontal axis)
|
29
32
|
@mixin overflow-x($overflow) {
|
30
33
|
overflow-x: $overflow !important;
|
34
|
+
@if $overflow == 'scroll' {
|
35
|
+
-webkit-overflow-scrolling: touch;
|
36
|
+
}
|
31
37
|
}
|
32
38
|
|
33
39
|
/// Overflow classes on vertical axis, by default coming through a map `$prototype-overflow`
|
34
40
|
/// @param {String} $overflow [] Overflow classes (vertical axis)
|
35
41
|
@mixin overflow-y($overflow) {
|
36
42
|
overflow-y: $overflow !important;
|
43
|
+
@if $overflow == 'scroll' {
|
44
|
+
-webkit-overflow-scrolling: touch;
|
45
|
+
}
|
37
46
|
}
|
38
47
|
|
39
48
|
@mixin foundation-prototype-overflow {
|
@@ -2,6 +2,8 @@
|
|
2
2
|
// https://get.foundation
|
3
3
|
// Licensed under MIT Open Source
|
4
4
|
|
5
|
+
// sass-lint:disable mixin-name-format
|
6
|
+
|
5
7
|
////
|
6
8
|
/// @group prototype-rotate
|
7
9
|
////
|
@@ -9,23 +11,23 @@
|
|
9
11
|
/// Rotate Mixin: Rotate an element to a certain deg
|
10
12
|
/// @param {Number} $deg[] Degree of rotation
|
11
13
|
@mixin rotate($deg) {
|
12
|
-
|
14
|
+
transform: rotate($deg + deg);
|
13
15
|
}
|
14
16
|
|
15
17
|
/// RotateX Mixin: Rotate an element to a certain deg on X-Axis
|
16
18
|
/// @param {Number} $deg[] Degree of rotation
|
17
19
|
@mixin rotateX($deg) {
|
18
|
-
|
20
|
+
transform: rotateX($deg + deg);
|
19
21
|
}
|
20
22
|
|
21
23
|
/// RotateY Mixin: Rotate an element to a certain deg on Y-Axis
|
22
24
|
/// @param {Number} $deg[] Degree of rotation
|
23
25
|
@mixin rotateY($deg) {
|
24
|
-
|
26
|
+
transform: rotateY($deg + deg);
|
25
27
|
}
|
26
28
|
|
27
29
|
/// RotateZ Mixin: Rotate an element to a certain deg on Z-Axis
|
28
30
|
/// @param {Number} $deg[] Degree of rotation
|
29
31
|
@mixin rotateZ($deg) {
|
30
|
-
|
31
|
-
}
|
32
|
+
transform: rotateZ($deg + deg);
|
33
|
+
}
|
@@ -44,7 +44,7 @@ $prototype-separator-margin-top: $global-margin !default;
|
|
44
44
|
$top: $prototype-separator-margin-top
|
45
45
|
) {
|
46
46
|
text-align: $align !important;
|
47
|
-
|
47
|
+
@include clearfix;
|
48
48
|
|
49
49
|
&::after {
|
50
50
|
@include position(relative);
|
@@ -63,9 +63,9 @@ $prototype-separator-margin-top: $global-margin !default;
|
|
63
63
|
}
|
64
64
|
|
65
65
|
@mixin foundation-prototype-separator {
|
66
|
-
|
67
|
-
|
68
|
-
|
66
|
+
.separator-center {
|
67
|
+
@include separator(center);
|
68
|
+
}
|
69
69
|
|
70
70
|
.separator-left {
|
71
71
|
@include separator(left);
|
@@ -75,7 +75,7 @@ $prototype-separator-margin-top: $global-margin !default;
|
|
75
75
|
@include separator(right);
|
76
76
|
}
|
77
77
|
|
78
|
-
|
78
|
+
@if ($prototype-separator-breakpoints) {
|
79
79
|
// Loop through Responsive Breakpoints
|
80
80
|
@each $size in $breakpoint-classes {
|
81
81
|
@include breakpoint($size) {
|
@@ -12,8 +12,7 @@ $prototype-shadow-breakpoints: $global-prototype-breakpoints !default;
|
|
12
12
|
|
13
13
|
/// Default value for `prototype-box-shadow`
|
14
14
|
/// @type Number
|
15
|
-
$prototype-box-shadow: 0 2px 5px 0 rgba(0,0,0
|
16
|
-
0 2px 10px 0 rgba(0,0,0,.12) !default;
|
15
|
+
$prototype-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12) !default;
|
17
16
|
|
18
17
|
/// Shadow Utility: Adds a light box shadow to an element by default.
|
19
18
|
/// @param {Number} $shadow [$prototype-box-shadow] Box Shadow of a component
|
@@ -68,23 +68,23 @@ $prototype-spacers-count: 3 !default;
|
|
68
68
|
/// @param {String} $dir [] Direction
|
69
69
|
/// @param {Number} $spacer [] Spacer
|
70
70
|
@mixin margin-direction($dir, $spacer) {
|
71
|
-
@if ($dir == top) {
|
72
|
-
@include margin($top: $spacer);
|
71
|
+
@if ($dir == top) {
|
72
|
+
@include margin($top: $spacer);
|
73
73
|
}
|
74
|
-
@else if ($dir == right) {
|
75
|
-
@include margin($right: $spacer);
|
74
|
+
@else if ($dir == right) {
|
75
|
+
@include margin($right: $spacer);
|
76
76
|
}
|
77
|
-
@else if ($dir == bottom) {
|
78
|
-
@include margin($bottom: $spacer);
|
77
|
+
@else if ($dir == bottom) {
|
78
|
+
@include margin($bottom: $spacer);
|
79
79
|
}
|
80
|
-
@else if ($dir == left) {
|
81
|
-
@include margin($left: $spacer);
|
80
|
+
@else if ($dir == left) {
|
81
|
+
@include margin($left: $spacer);
|
82
82
|
}
|
83
|
-
@else if ($dir == horizontal) {
|
84
|
-
@include margin($right: $spacer, $left: $spacer);
|
83
|
+
@else if ($dir == horizontal) {
|
84
|
+
@include margin($right: $spacer, $left: $spacer);
|
85
85
|
}
|
86
|
-
@else if ($dir == vertical) {
|
87
|
-
@include margin($top: $spacer, $bottom: $spacer);
|
86
|
+
@else if ($dir == vertical) {
|
87
|
+
@include margin($top: $spacer, $bottom: $spacer);
|
88
88
|
}
|
89
89
|
}
|
90
90
|
|
@@ -92,36 +92,36 @@ $prototype-spacers-count: 3 !default;
|
|
92
92
|
/// @param {String} $dir [] Direction
|
93
93
|
/// @param {Number} $spacer [] Spacer
|
94
94
|
@mixin padding-direction($dir, $spacer) {
|
95
|
-
@if ($dir == top) {
|
96
|
-
@include padding($top: $spacer);
|
95
|
+
@if ($dir == top) {
|
96
|
+
@include padding($top: $spacer);
|
97
97
|
}
|
98
|
-
@else if ($dir == right) {
|
99
|
-
@include padding($right: $spacer);
|
98
|
+
@else if ($dir == right) {
|
99
|
+
@include padding($right: $spacer);
|
100
100
|
}
|
101
|
-
@else if ($dir == bottom) {
|
102
|
-
@include padding($bottom: $spacer);
|
101
|
+
@else if ($dir == bottom) {
|
102
|
+
@include padding($bottom: $spacer);
|
103
103
|
}
|
104
|
-
@else if ($dir == left) {
|
105
|
-
@include padding($left: $spacer);
|
104
|
+
@else if ($dir == left) {
|
105
|
+
@include padding($left: $spacer);
|
106
106
|
}
|
107
|
-
@else if ($dir == horizontal) {
|
108
|
-
@include padding($right: $spacer, $left: $spacer);
|
107
|
+
@else if ($dir == horizontal) {
|
108
|
+
@include padding($right: $spacer, $left: $spacer);
|
109
109
|
}
|
110
|
-
@else if ($dir == vertical) {
|
111
|
-
@include padding($top: $spacer, $bottom: $spacer);
|
110
|
+
@else if ($dir == vertical) {
|
111
|
+
@include padding($top: $spacer, $bottom: $spacer);
|
112
112
|
}
|
113
113
|
}
|
114
114
|
|
115
115
|
@mixin foundation-prototype-spacing {
|
116
116
|
@for $spacer from 0 through $prototype-spacers-count {
|
117
|
-
|
117
|
+
|
118
118
|
@each $prop in (margin, padding) {
|
119
119
|
// All Sides
|
120
120
|
.#{$prop}-#{$spacer} {
|
121
|
-
@if ($prop == margin) {
|
121
|
+
@if ($prop == margin) {
|
122
122
|
margin: $spacer * $global-margin !important;
|
123
123
|
}
|
124
|
-
@else if ($prop == padding) {
|
124
|
+
@else if ($prop == padding) {
|
125
125
|
padding: $spacer * $global-padding !important;
|
126
126
|
}
|
127
127
|
}
|
@@ -129,7 +129,7 @@ $prototype-spacers-count: 3 !default;
|
|
129
129
|
@each $dir in (top, right, bottom, left, horizontal, vertical) {
|
130
130
|
// Top Side
|
131
131
|
.#{$prop}-#{$dir}-#{$spacer} {
|
132
|
-
@if ($prop == margin) {
|
132
|
+
@if ($prop == margin) {
|
133
133
|
@include margin-direction($dir, $spacer);
|
134
134
|
}
|
135
135
|
@else if ($prop == padding) {
|
@@ -142,7 +142,7 @@ $prototype-spacers-count: 3 !default;
|
|
142
142
|
|
143
143
|
@if ($prototype-spacing-breakpoints) {
|
144
144
|
@for $spacer from 0 through $prototype-spacers-count {
|
145
|
-
|
145
|
+
// Loop through Responsive Breakpoints
|
146
146
|
@each $size in $breakpoint-classes {
|
147
147
|
@include breakpoint($size) {
|
148
148
|
@if $size != $-zf-zero-breakpoint {
|
@@ -150,10 +150,10 @@ $prototype-spacers-count: 3 !default;
|
|
150
150
|
@each $prop in (margin, padding) {
|
151
151
|
// All Sides
|
152
152
|
&-#{$prop}-#{$spacer} {
|
153
|
-
@if ($prop == margin) {
|
153
|
+
@if ($prop == margin) {
|
154
154
|
margin: $spacer * $global-margin !important;
|
155
155
|
}
|
156
|
-
@else if ($prop == padding) {
|
156
|
+
@else if ($prop == padding) {
|
157
157
|
padding: $spacer * $global-padding !important;
|
158
158
|
}
|
159
159
|
}
|
@@ -161,10 +161,10 @@ $prototype-spacers-count: 3 !default;
|
|
161
161
|
@each $dir in (top, right, bottom, left, horizontal, vertical) {
|
162
162
|
// Top Side
|
163
163
|
&-#{$prop}-#{$dir}-#{$spacer} {
|
164
|
-
@if ($prop == margin) {
|
164
|
+
@if ($prop == margin) {
|
165
165
|
@include margin-direction($dir, $spacer);
|
166
166
|
}
|
167
|
-
@else if ($prop == padding) {
|
167
|
+
@else if ($prop == padding) {
|
168
168
|
@include padding-direction($dir, $spacer);
|
169
169
|
}
|
170
170
|
}
|
@@ -33,13 +33,13 @@ $prototype-text-transformation: (
|
|
33
33
|
|
34
34
|
@if ($prototype-transformation-breakpoints) {
|
35
35
|
// Loop through Responsive Breakpoints
|
36
|
-
|
36
|
+
@each $size in $breakpoint-classes {
|
37
37
|
@include breakpoint($size) {
|
38
38
|
@each $transformation in $prototype-text-transformation {
|
39
39
|
@if $size != $-zf-zero-breakpoint {
|
40
40
|
.#{$size}-text-#{$transformation} {
|
41
|
-
|
42
|
-
|
41
|
+
@include text-transform($transformation);
|
42
|
+
}
|
43
43
|
}
|
44
44
|
}
|
45
45
|
}
|