forked from sjoerdapp/styleguide2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconstants.js
More file actions
70 lines (59 loc) · 1.19 KB
/
Copy pathconstants.js
File metadata and controls
70 lines (59 loc) · 1.19 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
var canUseDOM = !!(
(typeof window !== 'undefined' &&
window.document && window.document.createElement)
);
exports.canUseDOM = canUseDOM;
// breakpoints
exports.breakpoint = {
xs: 480,
sm: 768,
md: 992,
lg: 1200,
};
// border radii
exports.borderRadius = {
xs: 2,
sm: 4,
md: 8,
lg: 16,
xl: 32,
};
// color
exports.color = {
appDanger: '#d64242',
appInfo: '#56cdfc',
appPrimary: '#1385e5',
appSuccess: '#34c240',
appWarning: '#fa9f47',
brandPrimary: '#31adb8',
};
// spacing
exports.spacing = {
xs: 5,
sm: 10,
md: 20,
lg: 40,
xl: 80,
};
// widths
exports.width = {
container: 1170,
gutter: 20,
};
// fractions (for col widths)
function perc(n) {
return (n * 100) + '%';
}
function denominators (n) {
for (var d = 2; d <= 20; d++) {
if (n < d) {
exports.fractions[n + '/' + d] = perc(n / d);
}
}
}
exports.fractions = {
'1': '100%',
};
for (var numerator = 1; numerator <= 19; numerator++) {
denominators(numerator);
}