bedrock_sass 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (155) hide show
  1. checksums.yaml +4 -4
  2. data/assets/_vendor/foundation/_vendor/normalize-scss/sass/_normalize.scss +3 -0
  3. data/assets/_vendor/foundation/_vendor/normalize-scss/sass/normalize/_import-now.scss +11 -0
  4. data/assets/_vendor/foundation/_vendor/normalize-scss/sass/normalize/_normalize-mixin.scss +676 -0
  5. data/assets/_vendor/foundation/_vendor/normalize-scss/sass/normalize/_variables.scss +36 -0
  6. data/assets/_vendor/foundation/_vendor/normalize-scss/sass/normalize/_vertical-rhythm.scss +61 -0
  7. data/assets/_vendor/foundation/_vendor/sassy-lists/stylesheets/functions/_contain.scss +31 -0
  8. data/assets/_vendor/foundation/_vendor/sassy-lists/stylesheets/functions/_purge.scss +38 -0
  9. data/assets/_vendor/foundation/_vendor/sassy-lists/stylesheets/functions/_remove.scss +31 -0
  10. data/assets/_vendor/foundation/_vendor/sassy-lists/stylesheets/functions/_replace.scss +46 -0
  11. data/assets/_vendor/foundation/_vendor/sassy-lists/stylesheets/functions/_to-list.scss +27 -0
  12. data/assets/_vendor/foundation/_vendor/sassy-lists/stylesheets/helpers/_missing-dependencies.scss +25 -0
  13. data/assets/_vendor/foundation/_vendor/sassy-lists/stylesheets/helpers/_true.scss +13 -0
  14. data/assets/_vendor/foundation/scss/_global.scss +249 -0
  15. data/assets/_vendor/foundation/scss/components/_accordion-menu.scss +171 -0
  16. data/assets/_vendor/foundation/scss/components/_accordion.scss +155 -0
  17. data/assets/_vendor/foundation/scss/components/_badge.scss +63 -0
  18. data/assets/_vendor/foundation/scss/components/_breadcrumbs.scss +117 -0
  19. data/assets/_vendor/foundation/scss/components/_button-group.scss +253 -0
  20. data/assets/_vendor/foundation/scss/components/_button.scss +385 -0
  21. data/assets/_vendor/foundation/scss/components/_callout.scss +106 -0
  22. data/assets/_vendor/foundation/scss/components/_card.scss +129 -0
  23. data/assets/_vendor/foundation/scss/components/_close-button.scss +102 -0
  24. data/assets/_vendor/foundation/scss/components/_drilldown.scss +142 -0
  25. data/assets/_vendor/foundation/scss/components/_dropdown-menu.scss +274 -0
  26. data/assets/_vendor/foundation/scss/components/_dropdown.scss +79 -0
  27. data/assets/_vendor/foundation/scss/components/_flex-video.scss +1 -0
  28. data/assets/_vendor/foundation/scss/components/_flex.scss +117 -0
  29. data/assets/_vendor/foundation/scss/components/_float.scss +27 -0
  30. data/assets/_vendor/foundation/scss/components/_label.scss +64 -0
  31. data/assets/_vendor/foundation/scss/components/_media-object.scss +114 -0
  32. data/assets/_vendor/foundation/scss/components/_menu-icon.scss +9 -0
  33. data/assets/_vendor/foundation/scss/components/_menu.scss +495 -0
  34. data/assets/_vendor/foundation/scss/components/_off-canvas.scss +506 -0
  35. data/assets/_vendor/foundation/scss/components/_orbit.scss +196 -0
  36. data/assets/_vendor/foundation/scss/components/_pagination.scss +193 -0
  37. data/assets/_vendor/foundation/scss/components/_progress-bar.scss +64 -0
  38. data/assets/_vendor/foundation/scss/components/_responsive-embed.scss +70 -0
  39. data/assets/_vendor/foundation/scss/components/_reveal.scss +180 -0
  40. data/assets/_vendor/foundation/scss/components/_slider.scss +137 -0
  41. data/assets/_vendor/foundation/scss/components/_sticky.scss +39 -0
  42. data/assets/_vendor/foundation/scss/components/_switch.scss +247 -0
  43. data/assets/_vendor/foundation/scss/components/_table.scss +330 -0
  44. data/assets/_vendor/foundation/scss/components/_tabs.scss +196 -0
  45. data/assets/_vendor/foundation/scss/components/_thumbnail.scss +67 -0
  46. data/assets/_vendor/foundation/scss/components/_title-bar.scss +84 -0
  47. data/assets/_vendor/foundation/scss/components/_tooltip.scss +160 -0
  48. data/assets/_vendor/foundation/scss/components/_top-bar.scss +175 -0
  49. data/assets/_vendor/foundation/scss/components/_visibility.scss +132 -0
  50. data/assets/_vendor/foundation/scss/forms/_checkbox.scss +41 -0
  51. data/assets/_vendor/foundation/scss/forms/_error.scss +88 -0
  52. data/assets/_vendor/foundation/scss/forms/_fieldset.scss +53 -0
  53. data/assets/_vendor/foundation/scss/forms/_forms.scss +34 -0
  54. data/assets/_vendor/foundation/scss/forms/_help-text.scss +30 -0
  55. data/assets/_vendor/foundation/scss/forms/_input-group.scss +142 -0
  56. data/assets/_vendor/foundation/scss/forms/_label.scss +50 -0
  57. data/assets/_vendor/foundation/scss/forms/_meter.scss +116 -0
  58. data/assets/_vendor/foundation/scss/forms/_progress.scss +94 -0
  59. data/assets/_vendor/foundation/scss/forms/_range.scss +149 -0
  60. data/assets/_vendor/foundation/scss/forms/_select.scss +86 -0
  61. data/assets/_vendor/foundation/scss/forms/_text.scss +179 -0
  62. data/assets/_vendor/foundation/scss/foundation.scss +133 -0
  63. data/assets/_vendor/foundation/scss/grid/_classes.scss +176 -0
  64. data/assets/_vendor/foundation/scss/grid/_column.scss +112 -0
  65. data/assets/_vendor/foundation/scss/grid/_flex-grid.scss +259 -0
  66. data/assets/_vendor/foundation/scss/grid/_grid.scss +48 -0
  67. data/assets/_vendor/foundation/scss/grid/_gutter.scss +82 -0
  68. data/assets/_vendor/foundation/scss/grid/_layout.scss +76 -0
  69. data/assets/_vendor/foundation/scss/grid/_position.scss +76 -0
  70. data/assets/_vendor/foundation/scss/grid/_row.scss +99 -0
  71. data/assets/_vendor/foundation/scss/grid/_size.scss +24 -0
  72. data/assets/_vendor/foundation/scss/prototype/_arrow.scss +36 -0
  73. data/assets/_vendor/foundation/scss/prototype/_border-box.scss +35 -0
  74. data/assets/_vendor/foundation/scss/prototype/_border-none.scss +35 -0
  75. data/assets/_vendor/foundation/scss/prototype/_bordered.scss +54 -0
  76. data/assets/_vendor/foundation/scss/prototype/_box.scss +23 -0
  77. data/assets/_vendor/foundation/scss/prototype/_display.scss +50 -0
  78. data/assets/_vendor/foundation/scss/prototype/_font-styling.scss +95 -0
  79. data/assets/_vendor/foundation/scss/prototype/_list-style-type.scss +95 -0
  80. data/assets/_vendor/foundation/scss/prototype/_overflow.scss +72 -0
  81. data/assets/_vendor/foundation/scss/prototype/_position.scss +114 -0
  82. data/assets/_vendor/foundation/scss/prototype/_prototype.scss +87 -0
  83. data/assets/_vendor/foundation/scss/prototype/_relation.scss +157 -0
  84. data/assets/_vendor/foundation/scss/prototype/_rotate.scss +31 -0
  85. data/assets/_vendor/foundation/scss/prototype/_rounded.scss +54 -0
  86. data/assets/_vendor/foundation/scss/prototype/_separator.scss +96 -0
  87. data/assets/_vendor/foundation/scss/prototype/_shadow.scss +43 -0
  88. data/assets/_vendor/foundation/scss/prototype/_sizing.scss +73 -0
  89. data/assets/_vendor/foundation/scss/prototype/_spacing.scss +204 -0
  90. data/assets/_vendor/foundation/scss/prototype/_text-decoration.scss +48 -0
  91. data/assets/_vendor/foundation/scss/prototype/_text-transformation.scss +48 -0
  92. data/assets/_vendor/foundation/scss/prototype/_text-utilities.scss +88 -0
  93. data/assets/_vendor/foundation/scss/settings/_settings.scss +869 -0
  94. data/assets/_vendor/foundation/scss/typography/_alignment.scss +22 -0
  95. data/assets/_vendor/foundation/scss/typography/_base.scss +509 -0
  96. data/assets/_vendor/foundation/scss/typography/_helpers.scss +80 -0
  97. data/assets/_vendor/foundation/scss/typography/_print.scss +86 -0
  98. data/assets/_vendor/foundation/scss/typography/_typography.scss +26 -0
  99. data/assets/_vendor/foundation/scss/util/_breakpoint.scss +348 -0
  100. data/assets/_vendor/foundation/scss/util/_color.scss +129 -0
  101. data/assets/_vendor/foundation/scss/util/_direction.scss +31 -0
  102. data/assets/_vendor/foundation/scss/util/_flex.scss +85 -0
  103. data/assets/_vendor/foundation/scss/util/_math.scss +72 -0
  104. data/assets/_vendor/foundation/scss/util/_mixins.scss +313 -0
  105. data/assets/_vendor/foundation/scss/util/_selector.scss +41 -0
  106. data/assets/_vendor/foundation/scss/util/_typography.scss +26 -0
  107. data/assets/_vendor/foundation/scss/util/_unit.scss +152 -0
  108. data/assets/_vendor/foundation/scss/util/_util.scss +14 -0
  109. data/assets/_vendor/foundation/scss/util/_value.scss +160 -0
  110. data/assets/_vendor/foundation/scss/xy-grid/_cell.scss +169 -0
  111. data/assets/_vendor/foundation/scss/xy-grid/_classes.scss +476 -0
  112. data/assets/_vendor/foundation/scss/xy-grid/_collapse.scss +74 -0
  113. data/assets/_vendor/foundation/scss/xy-grid/_frame.scss +85 -0
  114. data/assets/_vendor/foundation/scss/xy-grid/_grid.scss +35 -0
  115. data/assets/_vendor/foundation/scss/xy-grid/_gutters.scss +45 -0
  116. data/assets/_vendor/foundation/scss/xy-grid/_layout.scss +33 -0
  117. data/assets/_vendor/foundation/scss/xy-grid/_position.scss +28 -0
  118. data/assets/_vendor/foundation/scss/xy-grid/_xy-grid.scss +51 -0
  119. data/assets/_vendor/motion-ui/_classes.scss +109 -0
  120. data/assets/_vendor/motion-ui/_settings.scss +61 -0
  121. data/assets/_vendor/motion-ui/effects/_fade.scss +32 -0
  122. data/assets/_vendor/motion-ui/effects/_hinge.scss +65 -0
  123. data/assets/_vendor/motion-ui/effects/_shake.scss +15 -0
  124. data/assets/_vendor/motion-ui/effects/_slide.scss +41 -0
  125. data/assets/_vendor/motion-ui/effects/_spin.scss +28 -0
  126. data/assets/_vendor/motion-ui/effects/_wiggle.scss +13 -0
  127. data/assets/_vendor/motion-ui/effects/_zoom.scss +15 -0
  128. data/assets/_vendor/motion-ui/motion-ui.scss +29 -0
  129. data/assets/_vendor/motion-ui/transitions/_fade.scss +28 -0
  130. data/assets/_vendor/motion-ui/transitions/_hinge.scss +43 -0
  131. data/assets/_vendor/motion-ui/transitions/_slide.scss +42 -0
  132. data/assets/_vendor/motion-ui/transitions/_spin.scss +39 -0
  133. data/assets/_vendor/motion-ui/transitions/_zoom.scss +39 -0
  134. data/assets/_vendor/motion-ui/util/_animation.scss +7 -0
  135. data/assets/_vendor/motion-ui/util/_args.scss +15 -0
  136. data/assets/_vendor/motion-ui/util/_keyframe.scss +136 -0
  137. data/assets/_vendor/motion-ui/util/_selector.scss +23 -0
  138. data/assets/_vendor/motion-ui/util/_series.scss +54 -0
  139. data/assets/_vendor/motion-ui/util/_transition.scss +45 -0
  140. data/assets/_vendor/motion-ui/util/_unit.scss +7 -0
  141. data/assets/bedrock/js/bedrock.js +22993 -0
  142. data/assets/bedrock/scss/_bedrock-components.scss +15 -0
  143. data/assets/bedrock/scss/_bedrock-settings.scss +45 -0
  144. data/assets/bedrock/scss/_foundation-components.scss +50 -0
  145. data/assets/bedrock/scss/_foundation-settings.scss +869 -0
  146. data/assets/bedrock/scss/bedrock.scss +7 -0
  147. data/assets/bedrock/scss/components/global.scss +55 -0
  148. data/assets/bedrock/scss/components/header.scss +60 -0
  149. data/assets/bedrock/scss/components/helper-classes.scss +53 -0
  150. data/assets/bedrock/scss/components/logo-bar.scss +45 -0
  151. data/assets/bedrock/scss/components/off-canvas-menu.scss +359 -0
  152. data/assets/bedrock/scss/components/panel.scss +121 -0
  153. data/assets/bedrock/scss/components/tiny-mce-editor.scss +74 -0
  154. data/lib/bedrock_sass/version.rb +1 -1
  155. metadata +153 -2
@@ -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';