Repository navigation
Expand file tree
/
Copy pathtailwind.config.cjs
More file actions
67 lines (66 loc) · 2.07 KB
/
Copy pathtailwind.config.cjs
File metadata and controls
67 lines (66 loc) · 2.07 KB
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
const defaultTheme = require('tailwindcss/defaultTheme')
const plugin = require('tailwindcss/plugin')
/** @type {import('tailwindcss').Config} */
module.exports = {
corePlugins: {
container: false,
},
content: ['./.vitepress/theme/**/*.{vue,ts,tsx}', './src/content/**/*.md'],
theme: {
fontFamily: {
sans: ['Geist', 'system-ui', '-apple-system', ...defaultTheme.fontFamily.sans],
mono: ['IBM Plex Mono', 'ui-monospace', 'SFMono-Regular', 'monospace'],
},
extend: {
transitionDuration: {
long: '5000ms',
},
keyframes: {
pingDelay: {
'0%': { transform: 'scale(1)', opacity: 1 },
'25%,100%': { transform: 'scale(2)', opacity: 0 },
},
},
animation: {
ping: 'pingDelay 4s linear infinite',
},
textColor: {
white: 'rgb(var(--site-foreground) / <alpha-value>)',
},
fill: {
white: 'rgb(var(--site-foreground) / <alpha-value>)',
},
backgroundColor: {
white: 'rgb(var(--site-foreground) / <alpha-value>)',
},
colors: {
primary: 'rgb(var(--site-accent) / <alpha-value>)',
// Existing neutral utilities share the theme's surface/contrast scale.
neutral: Object.fromEntries(
[50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950].map((shade) => {
return [shade, `rgb(var(--site-neutral-${shade}) / <alpha-value>)`]
}),
),
},
},
},
variants: {
animation: ['motion-safe', 'motion-reduce'],
},
plugins: [
require('@tailwindcss/container-queries'),
plugin(({ addUtilities }) => {
addUtilities({
/**
* Fade the top of an element's borders into the background so a
* divider doesn't poke into the whitespace above it. Fade length
* is controlled by "--border-fade" (defaults to the heading gap).
*/
'.border-fade-t': {
'border-image':
'linear-gradient(to bottom, transparent, rgb(var(--site-neutral-800)) var(--border-fade, 6rem)) 1',
},
})
}),
],
}