-
Notifications
You must be signed in to change notification settings - Fork 1
/
tokens.js
91 lines (88 loc) · 2.21 KB
/
tokens.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
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
/**
* Dependencies
*/
const path = require('path');
const resolve = require(path.join(__dirname, '../', 'bin/util/resolve'));
const global = resolve('config/global');
const package = resolve('package.json');
/**
* Tokens Export
*
* @type {Object}
*/
module.exports = {
/**
* JSON-TO-SCSS configuration. Below possible options and their defaults are listed
*
* @source https://github.com/rlapoele/json-to-scss
*
* @type {Mixed}
*/
output: `"${path.join(global.base, global.src, global.entry.config, '_tokens.scss')}"`,
// prefix: '"$tokens:"',
// suffix: '"";""',
// format: '".scss"',
// indentationText: '" ""',
// indentationSize: 1,
// emptyString: '""',
// noUnderscore: true,
// mergeSourceFiles: false,
// mergeSassObjects: false,
// keys: 'auto',
// values: 'auto',
// stringKeys: '"family,font-family,fontfamily,font-stack,fontstack,font-face,fontface"',
/**
* Design tokens. These can be custom values for your Sass library as well
* as be values mapped directly to tokens in the Tailwindcss configuration.
* CSS variables can also be used in the token configuration. Note, other
* Tailwindcss configuration options, such as variants and modules should
* be configured in the `tailwindcss` configuration.
*
* @source https://tailwindcss.com/docs/configuration
*
* @type {Mixed}
*/
'version': `"${package.version}"`,
'border': {
'width': '3px',
'style': 'solid',
'radius': '16px'
},
'color': {
'white': '#FFF',
'blue': '#284CCA',
'red': '#FC5D52',
'gray': '#E6E8EC'
},
'font-family': {
'system': ['-apple-system', 'BlinkMacSystemFont', '"Segoe UI"', 'Roboto', 'Oxygen-Sans', 'Ubuntu', 'Cantarell', '"Helvetica Neue"', 'sans-serif'],
'monospace': 'monospace'
},
'font': {
'body': 'system',
'pre': 'monospace'
},
'font-weight': {
'body': 'normal',
'pre': 'normal'
},
'font-style': {
'body': 'normal',
'pre': 'normal'
},
'font-size': {
'body': '1em',
'pre': '0.9em'
},
'line-height': {
'body': '1.2',
'pre': '1.5'
},
'grid': '8px', // 8px grid system
'typography': {
'small': '16px',
'mobile': '18px',
'tablet': '20px',
'desktop': '22px'
}
};