-
-
Notifications
You must be signed in to change notification settings - Fork 54
/
windi.config.ts
100 lines (93 loc) · 2.78 KB
/
windi.config.ts
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
import defaultColors from 'windicss/colors'
import { defineConfig } from 'windicss/helpers'
import plugin from 'windicss/plugin'
export default defineConfig({
extract: {
include: ['**/*.{jsx,tsx,css}'],
exclude: ['node_modules', '.git', '.next'],
},
darkMode: 'class',
plugins: [
require('windicss/plugin/line-clamp'),
require('windicss/plugin/aspect-ratio'),
plugin(({ addComponents, addDynamic, variants }) => {
const styles = {
'.content-auto': {
'content-visibility': 'auto',
},
'.shadow-out-sm': {
'box-shadow':
'0 0 10px rgb(120 120 120 / 10%), 0 5px 20px rgb(120 120 120 / 20%)',
},
}
addComponents(styles)
addDynamic(
'contain-intrinsic',
({ Utility, Style }) => {
return Utility.handler
.handleStatic(Style('contain-intrinsic'))
.handleNumber(0, Infinity, 'int', (number) => `${number}px`)
.handleSize((size) => {
return size
})
.createProperty('contain-intrinsic-size')
},
variants('contain-intrinsic'),
)
}),
],
theme: {
extend: {
cursor: {
'zoom-in': 'zoom-in',
'zoom-out': 'zoom-out',
},
screens: {
'light-mode': { raw: '(prefers-color-scheme: light)' },
'dark-mode': { raw: '(prefers-color-scheme: dark)' },
phone: { raw: '(max-width: 568px)' },
desktop: { raw: '(min-width: 1100px)' },
tablet: { raw: '(max-width: 1099px)' },
wider: { raw: '(min-width: 1500px)' },
w900: { raw: '(max-width: 900px)' },
},
fontFamily: {
serif: 'var(--serif-font)',
sans: 'var(--sans-font)',
mono: 'var(--monospace-font)',
},
colors: {
primary: 'var(--primary)',
secondary: 'var(--secondary)',
accent: 'var(--accent)',
red: 'var(--red)',
yellow: 'var(--yellow)',
blue: 'var(--blue)',
green: 'var(--green)',
brown: 'var(--brown)',
'light-brown': 'var(--light-brown)',
purple: 'var(--purple)',
'light-bg': 'var(--light-bg)',
'light-font': 'var(--light-font)',
'bg-opacity': 'var(--bg-opacity)',
deepgray: 'var(--deep-gray)',
shallow: 'var(--shallow)',
pink: 'var(--pink)',
gray: {
'1': 'var(--gray-1)',
'2': 'var(--gray-2)',
'3': 'var(--gray-3)',
'4': 'var(--gray-4)',
'5': 'var(--gray-5)',
'6': 'var(--gray-6)',
},
shizuku: {
text: 'var(--shizuku-text-color)',
theme: 'var(--shizuku-theme-color)',
bg: 'var(--shizuku-background-color)',
},
always: { ...defaultColors },
},
},
},
})