-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathcollection.scss
46 lines (36 loc) · 970 Bytes
/
collection.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
@function color($key) {
@if (map-has-key($colorMap, $key)) {
@return map-get($colorMap, $key);
}
@error 'Invalid $colorMap key: #{$key}';
}
@function fontSize($key: null) {
@if ($key ==null) {
// default to first map key
$key: nth(map-keys($fontSizeMap), 1);
}
@if (map-has-key($fontSizeMap, $key)) {
@return map-get($fontSizeMap, $key);
}
@error 'Invalid $fontSizeMap key: #{$key}';
}
@function sp($key: null, $multiplier: 1) {
@if ($key ==null) {
// default to first map key
$key: nth(map-keys($spacingMap), 1);
}
@if (map-has-key($spacingMap, $key)) {
@return calc(map-get($spacingMap, $key) * $multiplier);
}
@error 'Invalid $spacingMap key: #{$key}';
}
@function zIndex($key: null, $shift: 0px) {
@if ($key ==null) {
// default to first map key
$key: nth(map-keys($zIndexMap), 1);
}
@if (map-has-key($zIndexMap, $key)) {
@return calc(map-get($zIndexMap, $key) + $shift);
}
@error 'Invalid $zIndexMap key: #{$key}';
}