foundation-rails 5.0.3.1 → 5.1.0.1

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 (49) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/README.md +6 -2
  4. data/bower.json +7 -0
  5. data/lib/foundation/rails/version.rb +1 -1
  6. data/update-gem.sh +13 -0
  7. data/vendor/assets/javascripts/foundation.js +2 -1
  8. data/vendor/assets/javascripts/foundation/foundation.abide.js +67 -33
  9. data/vendor/assets/javascripts/foundation/foundation.accordion.js +19 -11
  10. data/vendor/assets/javascripts/foundation/foundation.alert.js +8 -5
  11. data/vendor/assets/javascripts/foundation/foundation.clearing.js +74 -52
  12. data/vendor/assets/javascripts/foundation/foundation.dropdown.js +52 -46
  13. data/vendor/assets/javascripts/foundation/foundation.equalizer.js +63 -0
  14. data/vendor/assets/javascripts/foundation/foundation.interchange.js +47 -26
  15. data/vendor/assets/javascripts/foundation/foundation.joyride.js +42 -36
  16. data/vendor/assets/javascripts/foundation/foundation.js +286 -118
  17. data/vendor/assets/javascripts/foundation/foundation.magellan.js +139 -98
  18. data/vendor/assets/javascripts/foundation/foundation.offcanvas.js +8 -6
  19. data/vendor/assets/javascripts/foundation/foundation.orbit.js +29 -21
  20. data/vendor/assets/javascripts/foundation/foundation.reveal.js +58 -50
  21. data/vendor/assets/javascripts/foundation/foundation.tab.js +22 -10
  22. data/vendor/assets/javascripts/foundation/foundation.tooltip.js +38 -26
  23. data/vendor/assets/javascripts/foundation/foundation.topbar.js +79 -73
  24. data/vendor/assets/stylesheets/foundation/_functions.scss +37 -18
  25. data/vendor/assets/stylesheets/foundation/_settings.scss +115 -110
  26. data/vendor/assets/stylesheets/foundation/components/_block-grid.scss +14 -9
  27. data/vendor/assets/stylesheets/foundation/components/_breadcrumbs.scss +2 -2
  28. data/vendor/assets/stylesheets/foundation/components/_button-groups.scss +1 -1
  29. data/vendor/assets/stylesheets/foundation/components/_clearing.scss +13 -1
  30. data/vendor/assets/stylesheets/foundation/components/_dropdown-buttons.scss +1 -1
  31. data/vendor/assets/stylesheets/foundation/components/_flex-video.scss +1 -1
  32. data/vendor/assets/stylesheets/foundation/components/_forms.scss +23 -29
  33. data/vendor/assets/stylesheets/foundation/components/_global.scss +23 -54
  34. data/vendor/assets/stylesheets/foundation/components/_grid.scss +38 -31
  35. data/vendor/assets/stylesheets/foundation/components/_inline-lists.scss +2 -2
  36. data/vendor/assets/stylesheets/foundation/components/_joyride.scss +2 -2
  37. data/vendor/assets/stylesheets/foundation/components/_magellan.scss +2 -2
  38. data/vendor/assets/stylesheets/foundation/components/_offcanvas.scss +96 -96
  39. data/vendor/assets/stylesheets/foundation/components/_orbit.scss +3 -0
  40. data/vendor/assets/stylesheets/foundation/components/_progress-bars.scss +2 -2
  41. data/vendor/assets/stylesheets/foundation/components/_reveal.scss +8 -3
  42. data/vendor/assets/stylesheets/foundation/components/_side-nav.scss +10 -5
  43. data/vendor/assets/stylesheets/foundation/components/_sub-nav.scss +6 -3
  44. data/vendor/assets/stylesheets/foundation/components/_tabs.scss +2 -0
  45. data/vendor/assets/stylesheets/foundation/components/_tooltips.scss +11 -1
  46. data/vendor/assets/stylesheets/foundation/components/_top-bar.scss +20 -7
  47. data/vendor/assets/stylesheets/foundation/components/_type.scss +82 -4
  48. data/vendor/assets/stylesheets/foundation/components/_visibility.scss +2 -2
  49. metadata +5 -2
@@ -1,6 +1,8 @@
1
1
  // This is the default html and body font-size for the base rem value.
2
2
  $rem-base: 16px !default;
3
3
 
4
+ // IMPORT ONCE
5
+ // We use this to prevent styles from being loaded multiple times for compenents that rely on other components.
4
6
  $modules: () !default;
5
7
  @mixin exports($name) {
6
8
  @if (index($modules, $name) == false) {
@@ -13,6 +15,9 @@ $modules: () !default;
13
15
  // @functions
14
16
  //
15
17
 
18
+
19
+ // RANGES
20
+ // We use these functions to define ranges for various things, like media queries.
16
21
  @function lower-bound($range){
17
22
  @if length($range) <= 0 {
18
23
  @return 0;
@@ -27,28 +32,46 @@ $modules: () !default;
27
32
  @return nth($range, 2);
28
33
  }
29
34
 
30
-
35
+ // STRIP UNIT
31
36
  // It strips the unit of measure and returns it
32
37
  @function strip-unit($num) {
33
38
  @return $num / ($num * 0 + 1);
34
39
  }
35
40
 
36
- // New Syntax, allows to optionally calculate on a different base value to counter compounding effect of rem's.
37
- // Call with 1, 2, 3 or 4 parameters, 'px' is not required but supported
38
- // rem-calc(10 20 30px 40);
39
- // Space delimited, if you want to delimit using comma's, wrap it in another pair of brackets
40
- // rem-calc((10, 20, 30, 40px));
41
- // Optionally call with a different base (eg: 8px) to calculate rem.
42
- // rem-calc(16px 32px 48px, 8px);
43
- // If you require to comma separate your list
44
- // rem-calc((16px, 32px, 48), 8px);
45
-
41
+ // CONVERT TO REM
46
42
  @function convert-to-rem($value, $base-value: $rem-base) {
47
43
  $value: strip-unit($value) / strip-unit($base-value) * 1rem;
48
44
  @if ($value == 0rem) { $value: 0; } // Turn 0rem into 0
49
45
  @return $value;
50
46
  }
51
47
 
48
+ @function data($attr) {
49
+ @if $namespace {
50
+ @return '[data-' + $namespace + '-' + $attr + ']';
51
+ }
52
+
53
+ @return '[data-' + $attr + ']';
54
+ }
55
+
56
+ // REM CALC
57
+ /*
58
+ New Syntax, allows to optionally calculate on a different base value to counter compounding effect of rem's.
59
+ Call with 1, 2, 3 or 4 parameters, 'px' is not required but supported:
60
+
61
+ rem-calc(10 20 30px 40);
62
+
63
+ Space delimited, if you want to delimit using comma's, wrap it in another pair of brackets
64
+
65
+ rem-calc((10, 20, 30, 40px));
66
+
67
+ Optionally call with a different base (eg: 8px) to calculate rem.
68
+
69
+ rem-calc(16px 32px 48px, 8px);
70
+
71
+ If you require to comma separate your list
72
+
73
+ rem-calc((16px, 32px, 48), 8px);
74
+ */
52
75
  @function rem-calc($values, $base-value: $rem-base) {
53
76
  $max: length($values);
54
77
 
@@ -61,18 +84,14 @@ $modules: () !default;
61
84
  @return $remValues;
62
85
  }
63
86
 
87
+ // OLD EM CALC
64
88
  // Deprecated: We'll drop support for this in 5.1.0, use rem-calc()
65
89
  @function emCalc($values){
66
90
  @return rem-calc($values);
67
91
  }
68
92
 
93
+ // OLD EM CALC
69
94
  // Deprecated: We'll drop support for this in 5.1.0, use rem-calc()
70
95
  @function em-calc($values){
71
96
  @return rem-calc($values);
72
- }
73
-
74
- // Maybe you want to create rems with pixels
75
- // $rem-base: 0.625 !default; //Set the value corresponding to body font size. In this case, you should set as: body {font-size: 62.5%;}
76
- // @function remCalc($pxWidth) {
77
- // @return $pxWidth / $rem-base * 1rem;
78
- // }
97
+ }
@@ -11,7 +11,7 @@
11
11
  // $experimental: true;
12
12
 
13
13
  // The default font-size is set to 100% of the browser style sheet (usually 16px)
14
- // for compatibility with brower-based text zoom or user-set defaults.
14
+ // for compatibility with browser-based text zoom or user-set defaults.
15
15
 
16
16
  // Since the typical default browser font-size is 16px, that makes the calculation for grid size.
17
17
  // If you want your base font-size to be different and not have it affect the grid breakpoints,
@@ -29,6 +29,7 @@
29
29
  // Grid
30
30
 
31
31
  // $include-html-grid-classes: $include-html-classes;
32
+ // $include-xl-html-grid-classes: false;
32
33
 
33
34
  // $row-width: rem-calc(1000);
34
35
  // $column-gutter: rem-calc(30);
@@ -105,6 +106,112 @@
105
106
  // $cursor-help-value: help;
106
107
  // $cursor-text-value: text;
107
108
 
109
+ //
110
+ // TYPOGRAPHY
111
+ //
112
+
113
+ // $include-html-type-classes: $include-html-classes;
114
+
115
+ // We use these to control header font styles
116
+ // $header-font-family: $body-font-family;
117
+ // $header-font-weight: 300;
118
+ // $header-font-style: normal;
119
+ // $header-font-color: #222;
120
+ // $header-line-height: 1.4;
121
+ // $header-top-margin: .2rem;
122
+ // $header-bottom-margin: .5rem;
123
+ // $header-text-rendering: optimizeLegibility;
124
+
125
+ // We use these to control header font sizes
126
+ // $h1-font-size: rem-calc(44);
127
+ // $h2-font-size: rem-calc(37);
128
+ // $h3-font-size: rem-calc(27);
129
+ // $h4-font-size: rem-calc(23);
130
+ // $h5-font-size: rem-calc(18);
131
+ // $h6-font-size: 1rem;
132
+
133
+ // These control how subheaders are styled.
134
+ // $subheader-line-height: 1.4;
135
+ // $subheader-font-color: scale-color($header-font-color, $lightness: 35%);
136
+ // $subheader-font-weight: 300;
137
+ // $subheader-top-margin: .2rem;
138
+ // $subheader-bottom-margin: .5rem;
139
+
140
+ // A general <small> styling
141
+ // $small-font-size: 60%;
142
+ // $small-font-color: scale-color($header-font-color, $lightness: 35%);
143
+
144
+ // We use these to style paragraphs
145
+ // $paragraph-font-family: inherit;
146
+ // $paragraph-font-weight: normal;
147
+ // $paragraph-font-size: 1rem;
148
+ // $paragraph-line-height: 1.6;
149
+ // $paragraph-margin-bottom: rem-calc(20);
150
+ // $paragraph-aside-font-size: rem-calc(14);
151
+ // $paragraph-aside-line-height: 1.35;
152
+ // $paragraph-aside-font-style: italic;
153
+ // $paragraph-text-rendering: optimizeLegibility;
154
+
155
+ // We use these to style <code> tags
156
+ // $code-color: scale-color($alert-color, $lightness: -27%);
157
+ // $code-font-family: Consolas, 'Liberation Mono', Courier, monospace;
158
+ // $code-font-weight: bold;
159
+
160
+ // We use these to style anchors
161
+ // $anchor-text-decoration: none;
162
+ // $anchor-font-color: $primary-color;
163
+ // $anchor-font-color-hover: scale-color($primary-color, $lightness: -14%);
164
+
165
+ // We use these to style the <hr> element
166
+ // $hr-border-width: 1px;
167
+ // $hr-border-style: solid;
168
+ // $hr-border-color: #ddd;
169
+ // $hr-margin: rem-calc(20);
170
+
171
+ // We use these to style lists
172
+ // $list-style-position: outside;
173
+ // $list-side-margin: 1.1rem;
174
+ // $list-ordered-side-margin: 1.4rem;
175
+ // $list-side-margin-no-bullet: 0;
176
+ // $list-nested-margin: rem-calc(20);
177
+ // $definition-list-header-weight: bold;
178
+ // $definition-list-header-margin-bottom: .3rem;
179
+ // $definition-list-margin-bottom: rem-calc(12);
180
+
181
+ // We use these to style blockquotes
182
+ // $blockquote-font-color: scale-color($header-font-color, $lightness: 35%);
183
+ // $blockquote-padding: rem-calc(9 20 0 19);
184
+ // $blockquote-border: 1px solid #ddd;
185
+ // $blockquote-cite-font-size: rem-calc(13);
186
+ // $blockquote-cite-font-color: scale-color($header-font-color, $lightness: 23%);
187
+ // $blockquote-cite-link-color: $blockquote-cite-font-color;
188
+
189
+ // Acronym styles
190
+ // $acronym-underline: 1px dotted #ddd;
191
+
192
+ // We use these to control padding and margin
193
+ // $microformat-padding: rem-calc(10 12);
194
+ // $microformat-margin: rem-calc(0 0 20 0);
195
+
196
+ // We use these to control the border styles
197
+ // $microformat-border-width: 1px;
198
+ // $microformat-border-style: solid;
199
+ // $microformat-border-color: #ddd;
200
+
201
+ // We use these to control full name font styles
202
+ // $microformat-fullname-font-weight: bold;
203
+ // $microformat-fullname-font-size: rem-calc(15);
204
+
205
+ // We use this to control the summary font styles
206
+ // $microformat-summary-font-weight: bold;
207
+
208
+ // We use this to control abbr padding
209
+ // $microformat-abbr-padding: rem-calc(0 1);
210
+
211
+ // We use this to control abbr font styles
212
+ // $microformat-abbr-font-weight: bold;
213
+ // $microformat-abbr-font-decoration: none;
214
+
108
215
  // Accordion
109
216
 
110
217
  // $include-html-accordion-classes: $include-html-classes;
@@ -371,8 +478,9 @@
371
478
  // $form-label-pointer: pointer;
372
479
  // $form-label-font-size: rem-calc(14);
373
480
  // $form-label-font-weight: normal;
481
+ // $form-label-line-height: 1.5;
374
482
  // $form-label-font-color: scale-color(#000, $lightness: 30%);
375
- // $form-label-bottom-margin: rem-calc(8);
483
+ // $form-label-bottom-margin: 0;
376
484
  // $input-font-family: inherit;
377
485
  // $input-font-color: rgba(0,0,0,0.75);
378
486
  // $input-font-size: rem-calc(14);
@@ -382,6 +490,7 @@
382
490
  // $input-focus-border-color: scale-color(#fff, $lightness: -40%);
383
491
  // $input-border-style: solid;
384
492
  // $input-border-width: 1px;
493
+ // $input-border-radius: 0;
385
494
  // $input-disabled-bg: #ddd;
386
495
  // $input-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
387
496
  // $input-include-glowing-effect: true;
@@ -792,7 +901,8 @@
792
901
 
793
902
  // We use these to control link styles.
794
903
  // $side-nav-link-color: $primary-color;
795
- // $side-nav-link-color-active: scale-color(#000, $lightness: 30%);
904
+ // $side-nav-link-color-active: scale-color($side-nav-link-color, $lightness: 30%);
905
+ // $side-nav-link-color-hover: scale-color($side-nav-link-color, $lightness: 30%);
796
906
  // $side-nav-font-size: rem-calc(14);
797
907
  // $side-nav-font-weight: normal;
798
908
  // $side-nav-font-family: $body-font-family;
@@ -1003,6 +1113,7 @@
1003
1113
  // $tooltip-close-font-color: #777;
1004
1114
  // $tooltip-font-size-sml: rem-calc(14);
1005
1115
  // $tooltip-radius: $global-radius;
1116
+ // $tooltip-rounded: $global-rounded;
1006
1117
  // $tooltip-pip-size: 5px;
1007
1118
 
1008
1119
  //
@@ -1036,6 +1147,7 @@
1036
1147
  // $topbar-link-color: #fff;
1037
1148
  // $topbar-link-color-hover: #fff;
1038
1149
  // $topbar-link-color-active: #fff;
1150
+ // $topbar-link-color-active-hover: #fff;
1039
1151
  // $topbar-link-weight: normal;
1040
1152
  // $topbar-link-font-size: rem-calc(13);
1041
1153
  // $topbar-link-hover-lightness: -10%; // Darken by 10%
@@ -1075,113 +1187,6 @@
1075
1187
  // $topbar-sticky-class: ".sticky";
1076
1188
  // $topbar-arrows: true; //Set false to remove the triangle icon from the menu item
1077
1189
 
1078
- //
1079
- // TYPOGRAPHY
1080
- //
1081
-
1082
- // $include-html-type-classes: $include-html-classes;
1083
- // $include-open-sans: true;
1084
-
1085
- // We use these to control header font styles
1086
- // $header-font-family: join("Open Sans", $body-font-family);
1087
- // $header-font-weight: 300;
1088
- // $header-font-style: normal;
1089
- // $header-font-color: #222;
1090
- // $header-line-height: 1.4;
1091
- // $header-top-margin: .2rem;
1092
- // $header-bottom-margin: .5rem;
1093
- // $header-text-rendering: optimizeLegibility;
1094
-
1095
- // We use these to control header font sizes
1096
- // $h1-font-size: rem-calc(44);
1097
- // $h2-font-size: rem-calc(37);
1098
- // $h3-font-size: rem-calc(27);
1099
- // $h4-font-size: rem-calc(23);
1100
- // $h5-font-size: rem-calc(18);
1101
- // $h6-font-size: 1rem;
1102
-
1103
- // These control how subheaders are styled.
1104
- // $subheader-line-height: 1.4;
1105
- // $subheader-font-color: scale-color($header-font-color, $lightness: 35%);
1106
- // $subheader-font-weight: 300;
1107
- // $subheader-top-margin: .2rem;
1108
- // $subheader-bottom-margin: .5rem;
1109
-
1110
- // A general <small> styling
1111
- // $small-font-size: 60%;
1112
- // $small-font-color: scale-color($header-font-color, $lightness: 35%);
1113
-
1114
- // We use these to style paragraphs
1115
- // $paragraph-font-family: inherit;
1116
- // $paragraph-font-weight: normal;
1117
- // $paragraph-font-size: 1rem;
1118
- // $paragraph-line-height: 1.6;
1119
- // $paragraph-margin-bottom: rem-calc(20);
1120
- // $paragraph-aside-font-size: rem-calc(14);
1121
- // $paragraph-aside-line-height: 1.35;
1122
- // $paragraph-aside-font-style: italic;
1123
- // $paragraph-text-rendering: optimizeLegibility;
1124
-
1125
- // We use these to style <code> tags
1126
- // $code-color: scale-color($alert-color, $lightness: -27%);
1127
- // $code-font-family: Consolas, 'Liberation Mono', Courier, monospace;
1128
- // $code-font-weight: bold;
1129
-
1130
- // We use these to style anchors
1131
- // $anchor-text-decoration: none;
1132
- // $anchor-font-color: $primary-color;
1133
- // $anchor-font-color-hover: scale-color($primary-color, $lightness: -14%);
1134
-
1135
- // We use these to style the <hr> element
1136
- // $hr-border-width: 1px;
1137
- // $hr-border-style: solid;
1138
- // $hr-border-color: #ddd;
1139
- // $hr-margin: rem-calc(20);
1140
-
1141
- // We use these to style lists
1142
- // $list-style-position: outside;
1143
- // $list-side-margin: 1.1rem;
1144
- // $list-ordered-side-margin: 1.4rem;
1145
- // $list-side-margin-no-bullet: 0;
1146
- // $list-nested-margin: rem-calc(20);
1147
- // $definition-list-header-weight: bold;
1148
- // $definition-list-header-margin-bottom: .3rem;
1149
- // $definition-list-margin-bottom: rem-calc(12);
1150
-
1151
- // We use these to style blockquotes
1152
- // $blockquote-font-color: scale-color($header-font-color, $lightness: 35%);
1153
- // $blockquote-padding: rem-calc(9 20 0 19);
1154
- // $blockquote-border: 1px solid #ddd;
1155
- // $blockquote-cite-font-size: rem-calc(13);
1156
- // $blockquote-cite-font-color: scale-color($header-font-color, $lightness: 23%);
1157
- // $blockquote-cite-link-color: $blockquote-cite-font-color;
1158
-
1159
- // Acronym styles
1160
- // $acronym-underline: 1px dotted #ddd;
1161
-
1162
- // We use these to control padding and margin
1163
- // $microformat-padding: rem-calc(10 12);
1164
- // $microformat-margin: rem-calc(0 0 20 0);
1165
-
1166
- // We use these to control the border styles
1167
- // $microformat-border-width: 1px;
1168
- // $microformat-border-style: solid;
1169
- // $microformat-border-color: #ddd;
1170
-
1171
- // We use these to control full name font styles
1172
- // $microformat-fullname-font-weight: bold;
1173
- // $microformat-fullname-font-size: rem-calc(15);
1174
-
1175
- // We use this to control the summary font styles
1176
- // $microformat-summary-font-weight: bold;
1177
-
1178
- // We use this to control abbr padding
1179
- // $microformat-abbr-padding: rem-calc(0 1);
1180
-
1181
- // We use this to control abbr font styles
1182
- // $microformat-abbr-font-weight: bold;
1183
- // $microformat-abbr-font-decoration: none;
1184
-
1185
1190
  //
1186
1191
  // VISIBILITY CLASSES
1187
1192
  //
@@ -24,26 +24,31 @@ $block-grid-media-queries: true !default;
24
24
  @mixin block-grid(
25
25
  $per-row:false,
26
26
  $spacing:$block-grid-default-spacing,
27
+ $include-spacing:true,
27
28
  $base-style:true) {
28
29
 
29
30
  @if $base-style {
30
31
  display: block;
31
32
  padding: 0;
32
- margin: 0 0 0 (-$spacing/2);
33
+ margin: 0 (-$spacing/2);
33
34
  @include clearfix;
34
35
 
35
36
  &>li {
36
- display: inline;
37
+ display: block;
37
38
  height: auto;
38
39
  float: $default-float;
39
- padding: 0 ($spacing/2) $spacing;
40
+ @if $include-spacing {
41
+ padding: 0 ($spacing/2) $spacing;
42
+ }
40
43
  }
41
44
  }
42
45
 
43
46
  @if $per-row {
44
47
  &>li {
45
48
  width: 100%/$per-row;
46
- padding: 0 ($spacing/2) $spacing;
49
+ @if $include-spacing {
50
+ padding: 0 ($spacing/2) $spacing;
51
+ }
47
52
  list-style: none;
48
53
 
49
54
  &:nth-of-type(n) { clear: none; }
@@ -56,10 +61,10 @@ $block-grid-media-queries: true !default;
56
61
  // Generate presentational markup for block grid.
57
62
  //
58
63
  // $size - Name of class to use, i.e. "large" will generate .large-block-grid-1, .large-block-grid-2, etc.
59
- @mixin block-grid-html-classes($size) {
64
+ @mixin block-grid-html-classes($size,$include-spacing) {
60
65
  @for $i from 1 through $block-grid-elements {
61
66
  .#{$size}-block-grid-#{($i)} {
62
- @include block-grid($i,$block-grid-default-spacing,false);
67
+ @include block-grid($i,$block-grid-default-spacing,$include-spacing,false);
63
68
  }
64
69
  }
65
70
  }
@@ -70,15 +75,15 @@ $block-grid-media-queries: true !default;
70
75
  [class*="block-grid-"] { @include block-grid; }
71
76
 
72
77
  @media #{$small-up} {
73
- @include block-grid-html-classes($size:small);
78
+ @include block-grid-html-classes($size:small,$include-spacing:false);
74
79
  }
75
80
 
76
81
  @media #{$medium-up} {
77
- @include block-grid-html-classes($size:medium);
82
+ @include block-grid-html-classes($size:medium,$include-spacing:false);
78
83
  }
79
84
 
80
85
  @media #{$large-up} {
81
- @include block-grid-html-classes($size:large);
86
+ @include block-grid-html-classes($size:large,$include-spacing:false);
82
87
  }
83
88
  }
84
89
  }
@@ -32,7 +32,7 @@ $crumb-slash-color: #aaa !default;
32
32
  $crumb-slash: "/" !default;
33
33
 
34
34
  //
35
- // Breakcrumb Mixins
35
+ // Breadcrumb Mixins
36
36
  //
37
37
 
38
38
  // We use this mixin to create a container around our breadcrumbs
@@ -120,4 +120,4 @@ $crumb-slash: "/" !default;
120
120
  }
121
121
  }
122
122
  }
123
- }
123
+ }