UNPKG

1.33 kBSCSSView Raw
1// Foundation for Sites by ZURB
2// foundation.zurb.com
3// Licensed under MIT Open Source
4
5////
6/// @group prototype-text-transformation
7////
8
9/// Responsive breakpoints for text transformation classes
10/// @type Boolean
11$prototype-transformation-breakpoints: $global-prototype-breakpoints !default;
12
13/// Map containing all the `text-transformation` classes
14/// @type Map
15$prototype-text-transformation: (
16 lowercase,
17 uppercase,
18 capitalize
19) !default;
20
21/// Text Transformation, by default coming through a map `$prototype-text-transformation`
22/// @param {String} $transformation [] Text Transformation
23@mixin text-transform($transformation) {
24 text-transform: $transformation !important;
25}
26
27@mixin foundation-prototype-text-transformation {
28 @each $transformation in $prototype-text-transformation {
29 .text-#{$transformation} {
30 @include text-transform($transformation);
31 }
32 }
33
34 @if ($prototype-transformation-breakpoints) {
35 // Loop through Responsive Breakpoints
36 @each $size in $breakpoint-classes {
37 @include breakpoint($size) {
38 @each $transformation in $prototype-text-transformation {
39 @if $size != $-zf-zero-breakpoint {
40 .#{$size}-text-#{$transformation} {
41 @include text-transform($transformation);
42 }
43 }
44 }
45 }
46 }
47 }
48}