-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.js
60 lines (59 loc) · 2.21 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
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: {
body: themeStyle.body,
headlines: themeStyle.headlines,
primary: themeStyle.primary,
secondary: themeStyle.secondary,
neutral: themeStyle.neutral,
complementary: themeStyle.complementary,
'complementary-alt': themeStyle.complementaryAlt
},
fontFamily: {
body: themeStyle.fontBody,
headlines: themeStyle.fontHeadlines
}
}
},
variants: {
extend: {}
},
plugins: [
plugin(function ({ addBase, addComponents }) {
addBase({
h1: {
fontWeight: themeStyle.h1.weight,
textDecoration: themeStyle.h1.decoration,
textTransform: themeStyle.h1.case,
letterSpacing: themeStyle.h1.letterSpacing
},
h2: {
fontWeight: themeStyle.h2.weight,
textDecoration: themeStyle.h2.decoration,
textTransform: themeStyle.h2.case,
letterSpacing: themeStyle.h2.letterSpacing
},
h3: {
fontWeight: themeStyle.h3.weight,
textDecoration: themeStyle.h3.decoration,
textTransform: themeStyle.h3.case,
letterSpacing: themeStyle.h3.letterSpacing
}
}),
addComponents({
'.sb-component-button-primary': {
borderRadius: themeStyle.buttonPrimary.radius,
textTransform: themeStyle.buttonPrimary.case
},
'.sb-component-button-secondary': {
borderRadius: themeStyle.buttonSecondary.radius,
textTransform: themeStyle.buttonSecondary.case
}
});
})
]
};