-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtailwind.config.cjs
235 lines (229 loc) · 7.43 KB
/
tailwind.config.cjs
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
/** @type {import('tailwindcss').Config} config */
//--------------------------------------------------------------------------
// Tailwind site configuration
//--------------------------------------------------------------------------
//
// Use this file to completely define the current sites design system by
// adding and extending to Tailwinds default utility classes.
//
const defaultTheme = require('tailwindcss/defaultTheme')
const plugin = require('tailwindcss/plugin')
const colors = require('tailwindcss/colors')
module.exports = {
content: ['./index.php', './app/**/*.php', './resources/**/*.{php,vue,js}'],
presets: [require('tailwindcss/defaultConfig')],
theme: {
// Here we define the default colors available. If you want to include
// all default Tailwind colors you should extend the colors instead.
colors: {
black: '#000',
blue: '#2A7DE1',
orange: '#FF6B00',
pink: '#F97FB5',
white: '#fff',
yellow: '#FFB71B',
// Neutrals: neutral colors, with a default fallback if you don't need shades. Always set a DEFAULT when you use shades.
neutral: {
DEFAULT: colors.black,
...colors.slate
},
// Primary: primary brand color with a default fallback if you don't need shades. Always set a DEFAULT when you use shades.
primary: {
DEFAULT: colors.black
},
},
extend: {
zIndex: {
'60': '60',
'70': '70',
'80': '80',
'90': '90',
'100': '100',
},
padding: {
'18': '4.5rem',
},
// Set default transition durations and easing when using the transition utilities.
transitionDuration: {
DEFAULT: '300ms',
},
transitionTimingFunction: {
DEFAULT: 'cubic-bezier(0.4, 0, 0.2, 1)',
},
animation: {
appearsin: 'appearsIn 1.2s ease forwards',
appearsout: 'appearsOut 0.6s ease forwards',
},
},
// that is actual animation
keyframes: theme => ({
appearsIn: {
'0%': {
opacity: 0,
transform: 'translateY(40px)',
},
'100%': {
opacity: 1,
transform: 'translateY(0)',
},
},
appearsOut: {
'0%': {
opacity: 1,
transform: 'translateY(0)',
},
'100%': {
opacity: 0,
transform: 'translateY(40px)',
},
},
}),
// Remove the font families you don't want to use.
fontFamily: {
mono: [],
sans: [
'Aeonik',
...defaultTheme.fontFamily.sans,
],
serif: [],
},
// The font weights available for this site.
fontWeight: {
// hairline: 100,
// thin: 200,
// light: 300,
normal: 400,
// medium: 500,
// semibold: 600,
bold: 700,
// extrabold: 800,
// black: 900,
},
fontSize: {
sm: '0.8rem',
base: '1rem', // 20px
'xl': '1.25rem', // 25px
'2xl': '1.5rem', // 30px
'3xl': '1.875rem', // 37.5px
'4xl': '2.25rem', // 45px
'5xl': '3rem', // 60px
'6xl': '3.75rem', // 75px
'7xl': '4.5rem', // 90px
'8xl': '6rem', // 120px
'9xl': '8rem', // 160 px
},
letterSpacing: { //tracking
//tightest: '-.075em',
//tighter: '-.05em',
tight: '-.025em',
normal: '0',
//wide: '.025em',
//wider: '.05em',
//widest: '.1em',
//widest: '.25em',
},
lineHeight: { //leading
none: '1',
tight: '1.25',
snug: '1.375',
}
},
plugins: [
plugin(function({ addBase, theme }) {
addBase({
':root': {
// Fluid typography from 1 rem to 1.2 rem with fallback to 20px.
fontSize: '20px',
letterSpacing: '-0.2px',
lineHeight: '1.2',
fontWeight: '450',
// Safari resize fix.
minHeight: '0vw',
},
// Default color transition on links unless user prefers reduced motion.
'@media (prefers-reduced-motion: no-preference)': {
'a': {
transition: 'color .3s ease-in-out',
},
},
'html': {
color: theme('colors.neutral.DEFAULT'),
//--------------------------------------------------------------------------
// Set sans, serif or mono stack with optional custom font as default.
//--------------------------------------------------------------------------
// fontFamily: theme('fontFamily.mono'),
fontFamily: theme('fontFamily.sans'),
// fontFamily: theme('fontFamily.serif'),
},
'mark': {
backgroundColor: theme('colors.primary.DEFAULT'),
color: theme('colors.white')
},
})
}),
// Custom components for this particular site.
plugin(function({ addComponents, theme }) {
const components = {
'.fluid-container, .container': {
width: '100%',
maxWidth: '100%',
marginLeft: 'auto',
marginRight: 'auto',
// Use safe-area-inset together with default padding for Apple devices with a notch.
paddingLeft: `calc(env(safe-area-inset-left, 0rem) + ${theme('padding.5')})`,
paddingRight: `calc(env(safe-area-inset-right, 0rem) + ${theme('padding.5')})`,
},
'@media screen(sm)': {
'.container': {
maxWidth: theme('screens.md'),
},
},
'@media screen(md)': {
// Larger horizontal padding on larger screens.
'.fluid-container , .container': {
// Use safe-area-inset together with default padding for Apple devices with a notch.
paddingLeft: `calc(env(safe-area-inset-left, 0rem) + ${theme('padding.10')})`,
paddingRight: `calc(env(safe-area-inset-right, 0rem) + ${theme('padding.10')})`,
},
'.container': {
maxWidth: theme('screens.md'),
},
},
'@media screen(lg)': {
'.container': {
maxWidth: theme('screens.lg'),
},
},
'@media screen(xl)': {
'.container': {
maxWidth: theme('screens.xl'),
},
},
'@media screen(2xl)': {
'.container': {
maxWidth: theme('screens.2xl'),
},
},
'.main': {
paddingTop: 0,
paddingBottom: 0,
rowGap: 0,
},
}
addComponents(components)
}),
// Custom utilities for this particular site.
plugin(function({ addUtilities, theme, variants }) {
const newUtilities = {
}
addUtilities(newUtilities)
}),
// Custom variants for this particular site.
plugin(function ({ addVariant }) {
// Instead of hard-coded px use sm, md, lg breakpoints value from config.
addVariant('mobile-only', "@media screen and (max-width: calc(theme('screens.sm') - 1px) ) ");
addVariant('tablet-only', "@media screen and (min-width: theme('screens.sm')) and (max-width: calc(theme('screens.lg') - 1px) )");
addVariant('mbtb-only', "@media screen and (max-width: calc(theme('screens.lg') - 1px) )");
}),
]
}