-
Notifications
You must be signed in to change notification settings - Fork 1
/
tailwind.config.js
137 lines (136 loc) · 6.14 KB
/
tailwind.config.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
const plugin = require('tailwindcss/plugin');
const themeStyle = require('./content/data/style.json');
module.exports = {
content: ['./src/**/*.{js,ts,jsx,tsx}', './content/**/*', './.sourcebit-nextjs-cache.json'],
safelist: [
'text-neutral',
'text-light',
{
pattern: /(m|p)(t|b|l|r)-(0|px|1|1.5|2|2.5|3|3.5|4|5|6|7|8|9|10|11|12|14|16|20|24|28|32|36|40|44|48|52|56|60|64|72|80|96)/
},
],
theme: {
extend: {
boxShadow: {
header: '0px 2px 8px rgba(27, 32, 50, .08)'
},
colors: {
light: themeStyle.light,
dark: themeStyle.dark,
neutral: themeStyle.neutral,
neutralAlt: themeStyle.neutralAlt,
primary: themeStyle.primary
},
fontFamily: {
sans: ['Inter', 'sans-serif'],
serif: ['Roboto Slab', 'serif']
},
gridTemplateColumns: {
16: 'repeat(16, minmax(0, 1fr))'
},
gridColumnStart: {
span4: 'span 4'
},
gridColumnEnd: {
neg3: '-3',
span4: 'span 4'
},
maxWidth: {
sectionBody: '846px'
},
padding: {
'2/3': '66.666%',
'3/4': '75%',
'9/16': '56.25%'
},
screens: {
xs: '480px'
},
width: {
formField: 'calc(50% - 1rem)'
}
}
},
plugins: [
plugin(function ({ addBase, addComponents, theme }) {
addBase({
body: {
fontFamily: theme(`fontFamily.${themeStyle.fontBody}`)
},
'h1,h2,h3,h4,h5,h6,blockquote': {
fontFamily: theme(`fontFamily.${themeStyle.fontHeadlines}`)
},
'h1,.h1': {
fontSize: theme(`fontSize.${themeStyle.h1.size}`),
fontWeight: theme(`fontWeight.${themeStyle.h1.weight}`),
letterSpacing: theme(`letterSpacing.${themeStyle.h1.letterSpacing}`),
textDecoration: themeStyle.h1.decoration,
textTransform: themeStyle.h1.case
},
'h2,.h2': {
fontSize: theme(`fontSize.${themeStyle.h2.size}`),
fontWeight: theme(`fontWeight.${themeStyle.h2.weight}`),
letterSpacing: theme(`letterSpacing.${themeStyle.h2.letterSpacing}`),
textDecoration: themeStyle.h2.decoration,
textTransform: themeStyle.h2.case
},
'h3,.h3': {
fontSize: theme(`fontSize.${themeStyle.h3.size}`),
fontWeight: theme(`fontWeight.${themeStyle.h3.weight}`),
letterSpacing: theme(`letterSpacing.${themeStyle.h3.letterSpacing}`),
textDecoration: themeStyle.h3.decoration,
textTransform: themeStyle.h3.case
},
'h4,.h4': {
fontSize: theme(`fontSize.${themeStyle.h4.size}`),
fontWeight: theme(`fontWeight.${themeStyle.h4.weight}`),
letterSpacing: theme(`letterSpacing.${themeStyle.h4.letterSpacing}`),
textDecoration: themeStyle.h4.decoration,
textTransform: themeStyle.h4.case
},
h5: {
fontSize: theme(`fontSize.${themeStyle.h5.size}`),
fontWeight: theme(`fontWeight.${themeStyle.h5.weight}`),
letterSpacing: theme(`letterSpacing.${themeStyle.h5.letterSpacing}`),
textDecoration: themeStyle.h5.decoration,
textTransform: themeStyle.h5.case
},
h6: {
fontSize: theme(`fontSize.${themeStyle.h6.size}`),
fontWeight: theme(`fontWeight.${themeStyle.h6.weight}`),
letterSpacing: theme(`letterSpacing.${themeStyle.h6.letterSpacing}`),
textDecoration: themeStyle.h6.decoration,
textTransform: themeStyle.h6.case
}
});
addComponents({
'.sb-component-button-primary': {
borderRadius: theme(`borderRadius.${themeStyle.buttonPrimary.borderRadius}`),
boxShadow: theme(`boxShadow.${themeStyle.buttonPrimary.shadow}`),
fontWeight: themeStyle.buttonPrimary.weight,
letterSpacing: theme(`letterSpacing.${themeStyle.buttonPrimary.letterSpacing}`),
padding: `${themeStyle.buttonPrimary.verticalPadding}px ${themeStyle.buttonPrimary.horizontalPadding}px`,
textTransform: themeStyle.buttonPrimary.case
},
'.sb-component-button-secondary': {
borderRadius: theme(`borderRadius.${themeStyle.buttonSecondary.borderRadius}`),
boxShadow: theme(`boxShadow.${themeStyle.buttonSecondary.shadow}`),
fontWeight: themeStyle.buttonSecondary.weight,
letterSpacing: theme(`letterSpacing.${themeStyle.buttonSecondary.letterSpacing}`),
padding: `${themeStyle.buttonSecondary.verticalPadding}px ${themeStyle.buttonSecondary.horizontalPadding}px`,
textTransform: themeStyle.buttonSecondary.case
},
'.sb-component-link-primary': {
fontWeight: themeStyle.linkPrimary.weight,
letterSpacing: theme(`letterSpacing.${themeStyle.linkPrimary.letterSpacing}`),
textTransform: themeStyle.linkPrimary.case
},
'.sb-component-link-secondary': {
fontWeight: themeStyle.linkSecondary.weight,
letterSpacing: theme(`letterSpacing.${themeStyle.linkSecondary.letterSpacing}`),
textTransform: themeStyle.linkSecondary.case
}
});
})
]
};