-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtailwind.config.js
123 lines (100 loc) · 3.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
import { fluid, makeFluidSpacingDefaults } from './packages/style-utils'
import * as proseStyles from './styles/prose'
// Use CSS min to make a value that is affected by the size of the text but
// never gets too big
const smTranslate = 'min(30px, 1em)'
// The main Tailwind config
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./sanity/**/*.{js,ts,jsx,tsx}',
'./pages/**/*.{js,ts,jsx,tsx}',
'./components/**/*.{js,ts,jsx,tsx}',
'./layouts/**/*.{js,ts,jsx,tsx}',
'./packages/**/*.{js,ts,jsx,tsx}',
],
theme: {
// Overriding fontFamily to use @next/font loaded families
// See pages/_app.tsx
fontFamily: {
sans: 'var(--font-sans)',
},
extend: {
// Make a custom themes for BasicPortableText
typography: {
default: { css: proseStyles.base, },
marketing: { css: proseStyles.marketing, },
article: { css: proseStyles.article, },
},
spacing: {
// Adds "f" suffixed space values for the default scale. Use like:
// `py-8f`.
...makeFluidSpacingDefaults(),
// Add spacing values that are used by BlockLayout
xs: fluid(24),
sm: fluid(48, 32),
md: fluid(64, 48),
lg: fluid(128, 64),
// Add gutter values
gutter: fluid(40, 16),
// The header height
header: fluid(80, 60),
},
animation: {
// Slide in a direction direction and fade in with ease-out-quint
'slide-up-in': 'slide-up-in 1s ease-out-quint both',
'slide-down-in': 'slide-down-in 1s ease-out-quint both',
'slide-left-in': 'slide-left-in 1s ease-out-quint both',
'slide-right-in': 'slide-right-in 1s ease-out-quint both',
// Scale down, like for CTAs
'scale-down-in': 'scale-down-in 1s ease-out-quint both',
// Scale down slowly, like for backgrounds
'slow-scale-down-in': 'scale-down-in 3s ease-out-quint both',
},
keyframes: {
// Fade in and slide up
'slide-up-in': {
'from': {
opacity: 0,
transform: `translateY(${smTranslate})`,
}
},
// Fade in and slide down
'slide-down-in': {
'from': {
opacity: 0,
transform: `translateY(calc(-1 * ${smTranslate}))`,
}
},
// Fade in and slide right
'slide-right-in': {
'from': {
opacity: 0,
transform: `translateX(calc(-1 * ${smTranslate}))`,
},
},
// Fade in and slide left
'slide-left-in': {
'from': {
opacity: 0,
transform: `translateX(${smTranslate})`,
},
},
// Fade in and scale down
'scale-down-in': {
'from': {
opacity: 0,
transform: 'scale(1.1)',
},
},
},
screens: {
// Used with hideWhen layout option
'when-mobile': { max: '767px' },
'when-tablet': { min: '768px', max: '1024px' },
'when-desktop': { min: '1025px' },
}
}
},
plugins: [require('@tailwindcss/typography')],
}