UNPKG

1.55 kBSCSSView Raw
1// Foundation for Sites by ZURB
2// foundation.zurb.com
3// Licensed under MIT Open Source
4
5////
6/// @group prototype-sizing
7////
8
9/// Responsive breakpoints for spacing classes (margin and padding)
10/// @type Boolean
11$prototype-sizing-breakpoints: $global-prototype-breakpoints !default;
12
13/// Map containing all the `sizing` classes
14/// @type Map
15$prototype-sizing: (
16 width,
17 height
18) !default;
19
20/// Map containing all the sizes.
21/// @type Map
22$prototype-sizes: (
23 25: 25%,
24 50: 50%,
25 75: 75%,
26 100: 100%
27) !default;
28
29/// Max Width 100 utility.
30@mixin max-width-100 {
31 max-width: 100% !important;
32}
33
34/// Max Height 100 utility.
35@mixin max-height-100 {
36 max-height: 100% !important;
37}
38
39@mixin foundation-prototype-sizing {
40 // Element Sizing
41 @each $sizing in $prototype-sizing {
42 @each $length, $percentage in $prototype-sizes {
43 .#{$sizing}-#{$length} {
44 #{$sizing}: $percentage !important;
45 }
46 }
47 }
48
49 // Max width & height
50 .max-width-100 {
51 @include max-width-100;
52 }
53 .max-height-100 {
54 @include max-height-100;
55 }
56
57 @if ($prototype-sizing-breakpoints) {
58 // Loop through Responsive Breakpoints
59 @each $size in $breakpoint-classes {
60 @include breakpoint($size) {
61 @if $size != $-zf-zero-breakpoint {
62 @each $sizing in $prototype-sizing {
63 @each $length, $percentage in $prototype-sizes {
64 .#{$size}-#{$sizing}-#{$length} {
65 #{$sizing}: $percentage !important;
66 }
67 }
68 }
69 }
70 }
71 }
72 }
73}