-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_type.scss
51 lines (42 loc) · 1.07 KB
/
_type.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/* begin type creator */
@each $type in map-keys($fontSizes) {
$fontFace: "" !default;
// get font faces
@if variable-exists($fontFaces) {
@if map-has-key($fontFaces, $type) {
$fontFace: map-get($fontFaces, $type);
}
}
// get font size
$fontSize: map-get($fontSizes, $type);
// set type baseline padding
#{$type} {
@if $fontFace != "" {
font-family: $fontFace;
}
// set baseline spacing
@include vr($fontSize);
// add conversion classes
@each $tp in map-keys($fontSizes) {
// get font size
$fs: map-get($fontSizes, $tp);
@if $type != $tp and $fs < $fontSize {
// assign utility class and parse underscore
&.#{$tp} {
@include vr($fs, $from: $fontSize);
// set vertical center utility
&.v-center {
@include vr($fs, $from: $fontSize, $baseline: false);
}
}
}
}
// set vertical center to bottom utility
&.v-bottom {
transform: translateY($base-cap-height);
}
}
.#{$type} {
@extend #{$type};
}
}