jekyll-theme-foundation 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/README.md +48 -0
  4. data/_includes/google-analytics.html +8 -0
  5. data/_includes/head.html +17 -0
  6. data/_includes/scripts.html +4 -0
  7. data/_layouts/default.html +16 -0
  8. data/_layouts/home.html +5 -0
  9. data/_layouts/page.html +5 -0
  10. data/_layouts/post.html +5 -0
  11. data/_sass/_vendor/normalize-scss/sass/_normalize.scss +3 -0
  12. data/_sass/_vendor/normalize-scss/sass/normalize/_import-now.scss +11 -0
  13. data/_sass/_vendor/normalize-scss/sass/normalize/_normalize-mixin.scss +676 -0
  14. data/_sass/_vendor/normalize-scss/sass/normalize/_variables.scss +36 -0
  15. data/_sass/_vendor/normalize-scss/sass/normalize/_vertical-rhythm.scss +61 -0
  16. data/_sass/_vendor/sassy-lists/stylesheets/functions/_contain.scss +31 -0
  17. data/_sass/_vendor/sassy-lists/stylesheets/functions/_purge.scss +38 -0
  18. data/_sass/_vendor/sassy-lists/stylesheets/functions/_remove.scss +31 -0
  19. data/_sass/_vendor/sassy-lists/stylesheets/functions/_replace.scss +46 -0
  20. data/_sass/_vendor/sassy-lists/stylesheets/functions/_to-list.scss +27 -0
  21. data/_sass/_vendor/sassy-lists/stylesheets/helpers/_missing-dependencies.scss +25 -0
  22. data/_sass/_vendor/sassy-lists/stylesheets/helpers/_true.scss +13 -0
  23. data/_sass/assets/foundation-float.scss +5 -0
  24. data/_sass/assets/foundation-prototype.scss +3 -0
  25. data/_sass/assets/foundation-rtl.scss +5 -0
  26. data/_sass/assets/foundation.scss +3 -0
  27. data/_sass/jekyll-theme-foundation.scss +5 -0
  28. data/_sass/scss/_global.scss +249 -0
  29. data/_sass/scss/components/_accordion-menu.scss +171 -0
  30. data/_sass/scss/components/_accordion.scss +155 -0
  31. data/_sass/scss/components/_badge.scss +63 -0
  32. data/_sass/scss/components/_breadcrumbs.scss +117 -0
  33. data/_sass/scss/components/_button-group.scss +253 -0
  34. data/_sass/scss/components/_button.scss +385 -0
  35. data/_sass/scss/components/_callout.scss +106 -0
  36. data/_sass/scss/components/_card.scss +129 -0
  37. data/_sass/scss/components/_close-button.scss +102 -0
  38. data/_sass/scss/components/_drilldown.scss +142 -0
  39. data/_sass/scss/components/_dropdown-menu.scss +274 -0
  40. data/_sass/scss/components/_dropdown.scss +79 -0
  41. data/_sass/scss/components/_flex-video.scss +1 -0
  42. data/_sass/scss/components/_flex.scss +117 -0
  43. data/_sass/scss/components/_float.scss +27 -0
  44. data/_sass/scss/components/_label.scss +64 -0
  45. data/_sass/scss/components/_media-object.scss +114 -0
  46. data/_sass/scss/components/_menu-icon.scss +9 -0
  47. data/_sass/scss/components/_menu.scss +495 -0
  48. data/_sass/scss/components/_off-canvas.scss +506 -0
  49. data/_sass/scss/components/_orbit.scss +196 -0
  50. data/_sass/scss/components/_pagination.scss +193 -0
  51. data/_sass/scss/components/_progress-bar.scss +64 -0
  52. data/_sass/scss/components/_responsive-embed.scss +70 -0
  53. data/_sass/scss/components/_reveal.scss +180 -0
  54. data/_sass/scss/components/_slider.scss +137 -0
  55. data/_sass/scss/components/_sticky.scss +39 -0
  56. data/_sass/scss/components/_switch.scss +247 -0
  57. data/_sass/scss/components/_table.scss +330 -0
  58. data/_sass/scss/components/_tabs.scss +196 -0
  59. data/_sass/scss/components/_thumbnail.scss +67 -0
  60. data/_sass/scss/components/_title-bar.scss +84 -0
  61. data/_sass/scss/components/_tooltip.scss +160 -0
  62. data/_sass/scss/components/_top-bar.scss +175 -0
  63. data/_sass/scss/components/_visibility.scss +132 -0
  64. data/_sass/scss/forms/_checkbox.scss +41 -0
  65. data/_sass/scss/forms/_error.scss +88 -0
  66. data/_sass/scss/forms/_fieldset.scss +53 -0
  67. data/_sass/scss/forms/_forms.scss +34 -0
  68. data/_sass/scss/forms/_help-text.scss +30 -0
  69. data/_sass/scss/forms/_input-group.scss +142 -0
  70. data/_sass/scss/forms/_label.scss +50 -0
  71. data/_sass/scss/forms/_meter.scss +116 -0
  72. data/_sass/scss/forms/_progress.scss +94 -0
  73. data/_sass/scss/forms/_range.scss +149 -0
  74. data/_sass/scss/forms/_select.scss +86 -0
  75. data/_sass/scss/forms/_text.scss +179 -0
  76. data/_sass/scss/foundation.scss +133 -0
  77. data/_sass/scss/grid/_classes.scss +176 -0
  78. data/_sass/scss/grid/_column.scss +112 -0
  79. data/_sass/scss/grid/_flex-grid.scss +259 -0
  80. data/_sass/scss/grid/_grid.scss +48 -0
  81. data/_sass/scss/grid/_gutter.scss +82 -0
  82. data/_sass/scss/grid/_layout.scss +76 -0
  83. data/_sass/scss/grid/_position.scss +76 -0
  84. data/_sass/scss/grid/_row.scss +99 -0
  85. data/_sass/scss/grid/_size.scss +24 -0
  86. data/_sass/scss/prototype/_arrow.scss +36 -0
  87. data/_sass/scss/prototype/_border-box.scss +35 -0
  88. data/_sass/scss/prototype/_border-none.scss +35 -0
  89. data/_sass/scss/prototype/_bordered.scss +54 -0
  90. data/_sass/scss/prototype/_box.scss +23 -0
  91. data/_sass/scss/prototype/_display.scss +50 -0
  92. data/_sass/scss/prototype/_font-styling.scss +95 -0
  93. data/_sass/scss/prototype/_list-style-type.scss +95 -0
  94. data/_sass/scss/prototype/_overflow.scss +72 -0
  95. data/_sass/scss/prototype/_position.scss +114 -0
  96. data/_sass/scss/prototype/_prototype.scss +87 -0
  97. data/_sass/scss/prototype/_relation.scss +157 -0
  98. data/_sass/scss/prototype/_rotate.scss +31 -0
  99. data/_sass/scss/prototype/_rounded.scss +54 -0
  100. data/_sass/scss/prototype/_separator.scss +96 -0
  101. data/_sass/scss/prototype/_shadow.scss +43 -0
  102. data/_sass/scss/prototype/_sizing.scss +73 -0
  103. data/_sass/scss/prototype/_spacing.scss +204 -0
  104. data/_sass/scss/prototype/_text-decoration.scss +48 -0
  105. data/_sass/scss/prototype/_text-transformation.scss +48 -0
  106. data/_sass/scss/prototype/_text-utilities.scss +88 -0
  107. data/_sass/scss/settings/_settings.scss +869 -0
  108. data/_sass/scss/typography/_alignment.scss +22 -0
  109. data/_sass/scss/typography/_base.scss +509 -0
  110. data/_sass/scss/typography/_helpers.scss +80 -0
  111. data/_sass/scss/typography/_print.scss +86 -0
  112. data/_sass/scss/typography/_typography.scss +26 -0
  113. data/_sass/scss/util/_breakpoint.scss +348 -0
  114. data/_sass/scss/util/_color.scss +129 -0
  115. data/_sass/scss/util/_direction.scss +31 -0
  116. data/_sass/scss/util/_flex.scss +85 -0
  117. data/_sass/scss/util/_math.scss +72 -0
  118. data/_sass/scss/util/_mixins.scss +313 -0
  119. data/_sass/scss/util/_selector.scss +41 -0
  120. data/_sass/scss/util/_typography.scss +26 -0
  121. data/_sass/scss/util/_unit.scss +152 -0
  122. data/_sass/scss/util/_util.scss +14 -0
  123. data/_sass/scss/util/_value.scss +160 -0
  124. data/_sass/scss/xy-grid/_cell.scss +169 -0
  125. data/_sass/scss/xy-grid/_classes.scss +476 -0
  126. data/_sass/scss/xy-grid/_collapse.scss +74 -0
  127. data/_sass/scss/xy-grid/_frame.scss +85 -0
  128. data/_sass/scss/xy-grid/_grid.scss +35 -0
  129. data/_sass/scss/xy-grid/_gutters.scss +45 -0
  130. data/_sass/scss/xy-grid/_layout.scss +33 -0
  131. data/_sass/scss/xy-grid/_position.scss +28 -0
  132. data/_sass/scss/xy-grid/_xy-grid.scss +51 -0
  133. data/assets/css/main.scss +5 -0
  134. data/assets/css/motion-ui.min.css +1 -0
  135. data/assets/js/foundation.min.js +5 -0
  136. data/assets/js/motion-ui.min.js +1 -0
  137. metadata +235 -0
@@ -0,0 +1,313 @@
1
+ // Foundation for Sites by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group functions
7
+ ////
8
+
9
+ /// Creates an inner box-shadow for only one side
10
+ ///
11
+ /// @param {Keyword} $side - Side the shadow is supposed to appear. Can be `top`, `left`, `right` or `bottom`.
12
+ /// @param {Number} $size - Width for the target side.
13
+ /// @param {Color} $color - Color of the shadow.
14
+ @mixin inner-side-shadow(
15
+ $side: bottom,
16
+ $size: 20px,
17
+ $color: rgba($black, 0.25)
18
+ ) {
19
+
20
+ $helper: round($size * 0.65);
21
+
22
+ @if ($side == top) {
23
+ box-shadow: inset 0 $helper $size (-1)*$helper $color;
24
+ } @else if ($side == left) {
25
+ box-shadow: inset $helper 0 $size (-1)*$helper $color;
26
+ } @else if ($side == right) {
27
+ box-shadow: inset (-1)*$helper 0 $size (-1)*$helper $color;
28
+ } @else if ($side == bottom) {
29
+ box-shadow: inset 0 (-1)*$helper $size (-1)*$helper $color;
30
+ }
31
+ }
32
+
33
+ /// Creates a CSS triangle, which can be used for dropdown arrows, dropdown pips, and more. Use this mixin inside a `&::before` or `&::after` selector, to attach the triangle to an existing element.
34
+ ///
35
+ /// @param {Number} $triangle-size - Width of the triangle.
36
+ /// @param {Color} $triangle-color - Color of the triangle.
37
+ /// @param {Keyword} $triangle-direction - Direction the triangle points. Can be `up`, `right`, `down`, or `left`.
38
+ @mixin css-triangle(
39
+ $triangle-size,
40
+ $triangle-color,
41
+ $triangle-direction
42
+ ) {
43
+ display: block;
44
+ width: 0;
45
+ height: 0;
46
+
47
+ border: inset $triangle-size;
48
+
49
+ content: '';
50
+
51
+ @if ($triangle-direction == down) {
52
+ border-bottom-width: 0;
53
+ border-top-style: solid;
54
+ border-color: $triangle-color transparent transparent;
55
+ }
56
+ @if ($triangle-direction == up) {
57
+ border-top-width: 0;
58
+ border-bottom-style: solid;
59
+ border-color: transparent transparent $triangle-color;
60
+ }
61
+ @if ($triangle-direction == right) {
62
+ border-right-width: 0;
63
+ border-left-style: solid;
64
+ border-color: transparent transparent transparent $triangle-color;
65
+ }
66
+ @if ($triangle-direction == left) {
67
+ border-left-width: 0;
68
+ border-right-style: solid;
69
+ border-color: transparent $triangle-color transparent transparent;
70
+ }
71
+ }
72
+
73
+ /// Creates a menu icon with a set width, height, number of bars, and colors. The mixin uses the height of the icon and the weight of the bars to determine spacing. <div class="docs-example-burger"></div>
74
+ ///
75
+ /// @param {Color} $color [$black] - Color to use for the icon.
76
+ /// @param {Color} $color-hover [$dark-gray] - Color to use when the icon is hovered over.
77
+ /// @param {Number} $width [20px] - Width of the icon.
78
+ /// @param {Number} $height [16px] - Height of the icon.
79
+ /// @param {Number} $weight [2px] - Height of individual bars in the icon.
80
+ /// @param {Number} $bars [3] - Number of bars in the icon.
81
+ @mixin hamburger(
82
+ $color: $black,
83
+ $color-hover: $dark-gray,
84
+ $width: 20px,
85
+ $height: 16px,
86
+ $weight: 2px,
87
+ $bars: 3
88
+ ) {
89
+ // box-shadow CSS output
90
+ $shadow: ();
91
+ $hover-shadow: ();
92
+
93
+ // Spacing between bars is calculated based on the total height of the icon and the weight of each bar
94
+ $spacing: ($height - ($weight * $bars)) / ($bars - 1);
95
+
96
+ @if unit($spacing) == 'px' {
97
+ $spacing: floor($spacing);
98
+ }
99
+
100
+ @for $i from 2 through $bars {
101
+ $offset: ($weight + $spacing) * ($i - 1);
102
+ $shadow: append($shadow, 0 $offset 0 $color, comma);
103
+ }
104
+
105
+ // Icon container
106
+ position: relative;
107
+ display: inline-block;
108
+ vertical-align: middle;
109
+ width: $width;
110
+ height: $height;
111
+ cursor: pointer;
112
+
113
+ // Icon bars
114
+ &::after {
115
+ position: absolute;
116
+ top: 0;
117
+ left: 0;
118
+
119
+ display: block;
120
+ width: 100%;
121
+ height: $weight;
122
+
123
+ background: $color;
124
+ box-shadow: $shadow;
125
+
126
+ content: '';
127
+ }
128
+
129
+ // Hover state
130
+ @if $color-hover {
131
+ // Generate CSS
132
+ @for $i from 2 through $bars {
133
+ $offset: ($weight + $spacing) * ($i - 1);
134
+ $hover-shadow: append($hover-shadow, 0 $offset 0 $color-hover, comma);
135
+ }
136
+
137
+ &:hover::after {
138
+ background: $color-hover;
139
+ box-shadow: $hover-shadow;
140
+ }
141
+ }
142
+ }
143
+
144
+ /// Adds a downward-facing triangle as a background image to an element. The image is formatted as an SVG, making it easy to change the color. Because Internet Explorer doesn't support encoded SVGs as background images, a PNG fallback is also included.
145
+ /// There are two PNG fallbacks: a black triangle and a white triangle. The one used depends on the lightness of the input color.
146
+ ///
147
+ /// @param {Color} $color [$black] - Color to use for the triangle.
148
+ @mixin background-triangle($color: $black) {
149
+ $rgb: 'rgb%28#{round(red($color))}, #{round(green($color))}, #{round(blue($color))}%29';
150
+
151
+ background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='32' height='24' viewBox='0 0 32 24'><polygon points='0,0 32,0 16,24' style='fill: #{$rgb}'></polygon></svg>");
152
+
153
+ @media screen and (min-width:0\0) {
154
+ @if lightness($color) < 60% {
155
+ // White triangle
156
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAYCAYAAACbU/80AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIpJREFUeNrEkckNgDAMBBfRkEt0ObRBBdsGXUDgmQfK4XhH2m8czQAAy27R3tsw4Qfe2x8uOO6oYLb6GlOor3GF+swURAOmUJ+RwtEJs9WvTGEYxBXqI1MQAZhCfUQKRzDMVj+TwrAIV6jvSUEkYAr1LSkcyTBb/V+KYfX7xAeusq3sLDtGH3kEGACPWIflNZfhRQAAAABJRU5ErkJggg==');
157
+ }
158
+ @else {
159
+ // Black triangle
160
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAYCAYAAACbU/80AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAMBJREFUeNrEllsOhCAMRVszC9IlzU7KCmVHTJsoMWYMUtpyv9BgbuXQB5ZSdgBYYY4ycgBivk8KYFsQMfMiTTBP4o3nUzCKzOabLJbLy2/g31evGkAginR4/ZegKH5qX3bJCscA3t0x3kgO5tQFyhhFf50xRqFLbyMUNJQzgyjGS/wgCpvKqkRBpuWrE4V9d+1E4dPUXqIg107SQOE/2DRQxMwTDygIInVDET9T3lCoj/6j/VCmGjZOl2lKpZ8AAwDQP7zIimDGFQAAAABJRU5ErkJggg==');
161
+ }
162
+ }
163
+ }
164
+
165
+ /// Applies the micro clearfix hack popularized by Nicolas Gallagher. Include this mixin on a container if its children are all floated, to give the container a proper height.
166
+ /// The clearfix is augmented with specific styles to prevent borders in flexbox environments
167
+ /// @link http://nicolasgallagher.com/micro-clearfix-hack/ Micro Clearfix Hack
168
+ /// @link http://danisadesigner.com/blog/flexbox-clear-fix-pseudo-elements/ Flexbox fix
169
+ @mixin clearfix {
170
+ &::before,
171
+ &::after {
172
+ display: table;
173
+ content: ' ';
174
+
175
+ @if $global-flexbox {
176
+ flex-basis: 0;
177
+ order: 1;
178
+ }
179
+ }
180
+
181
+ &::after {
182
+ clear: both;
183
+ }
184
+ }
185
+
186
+ /// Adds CSS for a "quantity query" selector that automatically sizes elements based on how many there are inside a container.
187
+ /// @link http://alistapart.com/article/quantity-queries-for-css Quantity Queries for CSS
188
+ ///
189
+ /// @param {Number} $max - Maximum number of items to detect. The higher this number is, the more CSS that's required to cover each number of items.
190
+ /// @param {Keyword} $elem [li] - Tag to use for sibling selectors.
191
+ @mixin auto-width($max, $elem: li) {
192
+ @for $i from 2 through $max {
193
+ &:nth-last-child(#{$i}):first-child,
194
+ &:nth-last-child(#{$i}):first-child ~ #{$elem} {
195
+ width: percentage(1 / $i);
196
+ }
197
+ }
198
+ }
199
+
200
+ /// Removes the focus ring around an element when a mouse input is detected.
201
+ @mixin disable-mouse-outline {
202
+ [data-whatinput='mouse'] & {
203
+ outline: 0;
204
+ }
205
+ }
206
+
207
+ /// Makes an element visually hidden, but still accessible to keyboards and assistive devices.
208
+ /// @link http://snook.ca/archives/html_and_css/hiding-content-for-accessibility Hiding Content for Accessibility
209
+ /// @link http://hugogiraudel.com/2016/10/13/css-hide-and-seek/
210
+ @mixin element-invisible {
211
+ position: absolute !important;
212
+ width: 1px;
213
+ height: 1px;
214
+ padding: 0;
215
+ overflow: hidden;
216
+ clip: rect(0,0,0,0);
217
+ white-space: nowrap;
218
+ clip-path: inset(50%);
219
+ border: 0;
220
+ }
221
+
222
+ /// Reverses the CSS output created by the `element-invisible()` mixin.
223
+ @mixin element-invisible-off {
224
+ position: static !important;
225
+ width: auto;
226
+ height: auto;
227
+ overflow: visible;
228
+ clip: auto;
229
+ white-space: normal;
230
+ clip-path: none;
231
+ }
232
+
233
+ /// Vertically centers the element inside of its first non-static parent,
234
+ /// @link http://www.sitepoint.com/centering-with-sass/ Centering With Sass
235
+ @mixin vertical-center {
236
+ position: absolute;
237
+ top: 50%;
238
+ transform: translateY(-50%);
239
+ }
240
+
241
+ /// Horizontally centers the element inside of its first non-static parent,
242
+ /// @link http://www.sitepoint.com/centering-with-sass/ Centering With Sass
243
+ @mixin horizontal-center {
244
+ position: absolute;
245
+ left: 50%;
246
+ transform: translateX(-50%);
247
+ }
248
+
249
+ /// Absolutely centers the element inside of its first non-static parent,
250
+ /// @link http://www.sitepoint.com/centering-with-sass/ Centering With Sass
251
+ @mixin absolute-center {
252
+ position: absolute;
253
+ top: 50%;
254
+ left: 50%;
255
+ transform: translate(-50%, -50%);
256
+ }
257
+
258
+ /// Iterates through breakpoints defined in `$breakpoint-classes` and prints the CSS inside the mixin at each breakpoint's media query. Use this with the grid, or any other component that has responsive classes.
259
+ ///
260
+ /// @param {Boolean} $small [true] - If `false`, the mixin will skip the `small` breakpoint. Use this with components that don't prefix classes with `small-`, only `medium-` and up.
261
+ /// @param {Boolean} $auto-insert-breakpoints [true] - If `false`, the mixin will iterate over breakpoints without doing the media query itself. Useful for more complex media query generation as in the margin grid.
262
+ @mixin -zf-each-breakpoint($small: true, $auto-insert-breakpoints: true) {
263
+ $list: $breakpoint-classes;
264
+
265
+ @if not $small {
266
+ $list: sl-remove($list, $-zf-zero-breakpoint);
267
+ }
268
+
269
+ @each $name in $list {
270
+ $-zf-size: $name !global;
271
+
272
+ @if $auto-insert-breakpoints {
273
+ @include breakpoint($name) {
274
+ @content;
275
+ }
276
+ }
277
+ @else {
278
+ @content;
279
+ }
280
+ }
281
+ }
282
+
283
+ /// Generate the `@content` passed to the mixin with a value `$-zf-bp-value` related to a breakpoint, depending on the `$name` parameter:
284
+ /// - For a single value, `$-zf-bp-value` is this value.
285
+ /// - For a breakpoint name, `$-zf-bp-value` is the corresponding breakpoint value in `$map`.
286
+ /// - For "auto", `$-zf-bp-value` is the corresponding breakpoint value in `$map` and is passed to `@content`, which is made responsive for each breakpoint of `$map`.
287
+ /// @param {Number|Array|Keyword} $name [auto] - Single value, breakpoint name, or list of breakpoint names to use. "auto" by default.
288
+ /// @param {Number|Map} $map - Map of breakpoints and values or single value to use.
289
+ @mixin -zf-breakpoint-value(
290
+ $name: auto,
291
+ $map: null
292
+ ) {
293
+ @if $name == auto and type-of($map) == 'map' {
294
+ // "auto"
295
+ @each $k, $v in $map {
296
+ @include breakpoint($k) {
297
+ @include -zf-breakpoint-value($v, $map) {
298
+ @content;
299
+ }
300
+ }
301
+ }
302
+ }
303
+ @else {
304
+ // breakpoint name
305
+ @if type-of($name) == 'string' {
306
+ $name: -zf-get-bp-val($map, $name);
307
+ }
308
+
309
+ // breakpoint value
310
+ $-zf-bp-value: $name !global;
311
+ @content;
312
+ }
313
+ }
@@ -0,0 +1,41 @@
1
+ // Foundation for Sites by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group functions
7
+ ////
8
+
9
+ /// Generates a selector with every text input type. You can also filter the list to only output a subset of those selectors.
10
+ ///
11
+ /// @param {List|Keyword} $types [()] - A list of text input types to use. Leave blank to use all of them.
12
+ /// @param {Keyword} $modifier [''] - A modifier to be applied to each text input type (e.g. a class or a pseudo-class). Leave blank to ignore.
13
+ @function text-inputs($types: (), $modifier: '') {
14
+ $return: ();
15
+
16
+ $all-types:
17
+ text
18
+ password
19
+ date
20
+ datetime
21
+ datetime-local
22
+ month
23
+ week
24
+ email
25
+ number
26
+ search
27
+ tel
28
+ time
29
+ url
30
+ color;
31
+
32
+ @if not has-value($types) {
33
+ $types: $all-types;
34
+ }
35
+
36
+ @each $type in $types {
37
+ $return: append($return, unquote('[type=\'#{$type}\']#{$modifier}'), comma);
38
+ }
39
+
40
+ @return $return;
41
+ }
@@ -0,0 +1,26 @@
1
+ // Foundation for Sites by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group functions
7
+ ////
8
+
9
+ $-zf-font-stack: (
10
+ 'georgia': (Georgia, "URW Bookman L", serif),
11
+ 'helvetica': (Helvetica, Arial, "Nimbus Sans L", sans-serif),
12
+ 'lucida-grande': ("Lucida Grande", "Lucida Sans Unicode", "Bitstream Vera Sans", sans-serif),
13
+ 'monospace': ("Courier New", Courier, "Nimbus Sans L", monospace),
14
+ 'system': (-apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif),
15
+ 'verdana': (Verdana, Geneva, "DejaVu Sans", sans-serif),
16
+ );
17
+
18
+ /// Return a font stack list from a map. Equivalent to `map-safe-get($name, $-zf-font-stack)`.
19
+ ///
20
+ /// @param {String} $stack - Name of the font stack.
21
+ /// @param {Map} $map [$-zf-font-stack] - Map of font stacks to retrieve a list from.
22
+ ///
23
+ /// @returns {List} Found font stack.
24
+ @function font-stack($stack, $map: $-zf-font-stack) {
25
+ @return map-safe-get($map, $stack);
26
+ }
@@ -0,0 +1,152 @@
1
+ // Foundation for Sites by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group functions
7
+ ////
8
+
9
+ $global-font-size: 100% !default;
10
+
11
+ /// Removes the unit (e.g. px, em, rem) from a value, returning the number only.
12
+ ///
13
+ /// @param {Number} $num - Number to strip unit from.
14
+ ///
15
+ /// @returns {Number} The same number, sans unit.
16
+ @function strip-unit($num) {
17
+ @return $num / ($num * 0 + 1);
18
+ }
19
+
20
+ /// Converts one or more pixel values into matching rem values.
21
+ ///
22
+ /// @param {Number|List} $values - One or more values to convert. Be sure to separate them with spaces and not commas. If you need to convert a comma-separated list, wrap the list in parentheses.
23
+ /// @param {Number} $base [null] - The base value to use when calculating the `rem`. If you're using Foundation out of the box, this is 16px. If this parameter is `null`, the function will reference the `$base-font-size` variable as the base.
24
+ ///
25
+ /// @returns {List} A list of converted values.
26
+ @function rem-calc($values, $base: null) {
27
+ $rem-values: ();
28
+ $count: length($values);
29
+
30
+ // If no base is defined, defer to the global font size
31
+ @if $base == null {
32
+ $base: $global-font-size;
33
+ }
34
+
35
+ // If the base font size is a %, then multiply it by 16px
36
+ // This is because 100% font size = 16px in most all browsers
37
+ @if unit($base) == '%' {
38
+ $base: ($base / 100%) * 16px;
39
+ }
40
+
41
+ // Using rem as base allows correct scaling
42
+ @if unit($base) == 'rem' {
43
+ $base: strip-unit($base) * 16px;
44
+ }
45
+
46
+ @if $count == 1 {
47
+ @return -zf-to-rem($values, $base);
48
+ }
49
+
50
+ @for $i from 1 through $count {
51
+ $rem-values: append($rem-values, -zf-to-rem(nth($values, $i), $base));
52
+ }
53
+
54
+ @return $rem-values;
55
+ }
56
+
57
+ // Converts a unitless, pixel, or rem value to em, for use in breakpoints.
58
+ @function -zf-bp-to-em($value) {
59
+ // Pixel and unitless values are converted to rems
60
+ @if unit($value) == 'px' or unitless($value) {
61
+ $value: rem-calc($value, $base: 16px);
62
+ }
63
+
64
+ // Then the value is converted to ems
65
+ @return strip-unit($value) * 1em;
66
+ }
67
+
68
+ /// Converts a pixel value to matching rem value. *Any* value passed, regardless of unit, is assumed to be a pixel value. By default, the base pixel value used to calculate the rem value is taken from the `$global-font-size` variable.
69
+ /// @access private
70
+ ///
71
+ /// @param {Number} $value - Pixel value to convert.
72
+ /// @param {Number} $base [null] - Base for pixel conversion.
73
+ ///
74
+ /// @returns {Number} A number in rems, calculated based on the given value and the base pixel value. rem values are passed through as is.
75
+ @function -zf-to-rem($value, $base: null) {
76
+ // Check if the value is a number
77
+ @if type-of($value) != 'number' {
78
+ @warn inspect($value) + ' was passed to rem-calc(), which is not a number.';
79
+ @return $value;
80
+ }
81
+
82
+ // Transform em into rem if someone hands over 'em's
83
+ @if unit($value) == 'em' {
84
+ $value: strip-unit($value) * 1rem;
85
+ }
86
+
87
+ // Calculate rem if units for $value is not rem or em
88
+ @if unit($value) != 'rem' {
89
+ $value: strip-unit($value) / strip-unit($base) * 1rem;
90
+ }
91
+
92
+ // Turn 0rem into 0
93
+ @if $value == 0rem {
94
+ $value: 0;
95
+ }
96
+
97
+ @return $value;
98
+ }
99
+
100
+ /// Converts a pixel, percentage, rem or em value to a unitless value based on a given font size. Ideal for working out unitless line heights.
101
+ ///
102
+ /// @param {Number} $value - Value to convert to a unitless line height
103
+ /// @param {Number} $base - The font size to use to work out the line height - defaults to $global-font-size
104
+ ///
105
+ /// @return {Number} - Unitless number
106
+ @function unitless-calc($value, $base: null) {
107
+
108
+ // If no base is defined, defer to the global font size
109
+ @if $base == null {
110
+ $base: $global-font-size;
111
+ }
112
+
113
+ // First, lets convert our $base to pixels
114
+
115
+ // If the base font size is a %, then multiply it by 16px
116
+ @if unit($base) == '%' {
117
+ $base: ($base / 100%) * 16px;
118
+ }
119
+
120
+ @if unit($base) == 'rem' {
121
+ $base: strip-unit($base) * 16px;
122
+ }
123
+
124
+ @if unit($base) == 'em' {
125
+ $base: strip-unit($base) * 16px;
126
+ }
127
+
128
+ // Now lets convert our value to pixels too
129
+ @if unit($value) == '%' {
130
+ $value: ($value / 100%) * $base;
131
+ }
132
+
133
+ @if unit($value) == 'rem' {
134
+ $value: strip-unit($value) * $base;
135
+ }
136
+
137
+ @if unit($value) == 'em' {
138
+ $value: strip-unit($value) * $base;
139
+ }
140
+
141
+ // 'px'
142
+ @if unit($value) == 'px' {
143
+ @return strip-unit($value) / strip-unit($base);
144
+ }
145
+
146
+ // assume that line-heights greatern then 10 are meant to be absolute in 'px'
147
+ @if unitless($value) and ($value > 10) {
148
+ @return $value / strip-unit($base);
149
+ }
150
+
151
+ @return $value;
152
+ }
@@ -0,0 +1,14 @@
1
+ // Foundation for Sites by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ @import 'math';
6
+ @import 'unit';
7
+ @import 'value';
8
+ @import 'direction';
9
+ @import 'color';
10
+ @import 'selector';
11
+ @import 'flex';
12
+ @import 'breakpoint';
13
+ @import 'mixins';
14
+ @import 'typography';