-
Notifications
You must be signed in to change notification settings - Fork 14
/
tailwind.config.js
110 lines (109 loc) · 5.42 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
const plugin = require('tailwindcss/plugin');
const themeStyle = require('./content/data/style.json');
module.exports = {
presets: [require('@stackbit/components/styles/tailwind.default.config.js')],
theme: {
extend: {
colors: {
main: themeStyle.main,
light: themeStyle.light,
'on-light': themeStyle.onLight,
dark: themeStyle.dark,
'on-dark': themeStyle.onDark,
primary: themeStyle.primary,
'on-primary': themeStyle.onPrimary,
secondary: themeStyle.secondary,
'on-secondary': themeStyle.onSecondary,
complementary: themeStyle.complementary,
'on-complementary': themeStyle.onComplementary,
'complementary-alt': themeStyle.complementaryAlt,
'on-complementary-alt': themeStyle.onComplementaryAlt
},
fontFamily: {
'sans': ['Poppins', 'sans-serif'],
'serif': ['"Noto Serif"', 'serif']
}
}
},
variants: {
extend: {}
},
plugins: [
plugin(function ({ addBase, addComponents, theme }) {
addBase({
body: {
fontFamily: theme(`fontFamily.${themeStyle.fontBody}`)
},
'h1,h2,h3,h4,h5,h6': {
fontFamily: theme(`fontFamily.${themeStyle.fontHeadlines}`)
},
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: {
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: {
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: {
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}`),
borderStyle: theme(`borderStyle.${themeStyle.buttonSecondary.borderStyle}`),
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': {
fontWeight: themeStyle.link.weight,
letterSpacing: theme(`letterSpacing.${themeStyle.link.letterSpacing}`),
textTransform: themeStyle.link.case
}
});
})
]
};