-
Notifications
You must be signed in to change notification settings - Fork 1
/
variables.js
39 lines (37 loc) · 1.21 KB
/
variables.js
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
const getVarsFromCSS = require('./utils.js').getVarsFromCSS;
module.exports = function getVarsByProps () {
const vars = {
gaps: getVarsFromCSS('vars.css'),
fonts: getVarsFromCSS('vars/font.css'),
opacity: getVarsFromCSS('vars/opacity.css'),
colors: getVarsFromCSS('vars/primitive-colors.css')
};
/* eslint-disable quote-props */
return {
'margin': [vars.gaps],
'margin-top': [vars.gaps],
'margin-right': [vars.gaps],
'margin-bottom': [vars.gaps],
'margin-left': [vars.gaps],
'padding': [vars.gaps],
'padding-top': [vars.gaps],
'padding-right': [vars.gaps],
'padding-bottom': [vars.gaps],
'padding-left': [vars.gaps],
'font': [vars.fonts],
'font-size': [vars.fonts],
'font-weight': [vars.fonts],
'line-height': [vars.fonts],
'opacity': [vars.opacity],
'color': [vars.colors],
'background-color': [vars.colors],
'background': [vars.colors],
'box-shadow': [vars.colors],
'border': [vars.colors],
'border-top': [vars.colors],
'border-right': [vars.colors],
'border-bottom': [vars.colors],
'border-left': [vars.colors]
};
/* eslint-enable quote-props */
};