-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtailwind.config.js
More file actions
176 lines (171 loc) · 4.31 KB
/
Copy pathtailwind.config.js
File metadata and controls
176 lines (171 loc) · 4.31 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
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
/** @type {import('tailwindcss').Config} */
import plugin from 'tailwindcss/plugin'
const colors = require('tailwindcss/colors')
module.exports = {
/**
* Enable JIT mode for on-demand CSS generation.
*/
mode: 'jit',
/**
* Specifies the files to scan for Tailwind CSS classes.
* Includes all React components within the `src/` directory.
*/
content: [
'./src/**/*.{ts,tsx,js,jsx}',
],
/**
* Theme configuration.
* Extends the default Tailwind theme with custom settings.
*/
theme: {
/**
* Custom color palette.
* Adheres to WCAG AA color contrast guidelines for accessibility.
*/
colors: {
transparent: 'transparent',
current: 'currentColor',
black: colors.black,
white: colors.white,
gray: colors.gray,
blue: '#29ABE2', // Primary color
darkGray: '#333333', // Secondary color
teal: '#00FFCC', // Accent color
},
/**
* Custom font families.
* Uses Roboto for headings, Open Sans for body, and Montserrat for UI elements.
*/
fontFamily: {
'roboto': ['Roboto', 'sans-serif'],
'open-sans': ['Open Sans', 'sans-serif'],
'montserrat': ['Montserrat', 'sans-serif'],
},
/**
* Custom spacing scale.
* Uses multiples of 4 for consistent spacing.
*/
spacing: {
'0': '0px',
'1': '4px',
'2': '8px',
'3': '12px',
'4': '16px',
'5': '20px',
'6': '24px',
'7': '28px',
'8': '32px',
'9': '36px',
'10': '40px',
'11': '44px',
'12': '48px',
'13': '52px',
'14': '56px',
'15': '60px',
'16': '64px',
},
/**
* Responsive breakpoints.
* Configured with pixel values for consistent responsive design.
*/
screens: {
sm: '640px',
md: '768px',
lg: '1024px',
xl: '1280px',
'2xl': '1536px',
},
extend: {
/**
* 3D specific extensions to enable more options for webGL rendering
*/
transitionProperty: {
'position': 'transform, translate, translate-x, translate-y, translate-z, top, left, right, bottom',
},
keyframes: {
'fade-in-down': {
'0%': {
opacity: '0',
transform: 'translateY(-10px)'
},
'100%': {
opacity: '1',
transform: 'translateY(0)'
},
},
'fade-out-up': {
'0%': {
opacity: '1',
transform: 'translateY(0px)'
},
'100%': {
opacity: '0',
transform: 'translateY(-10px)'
},
}
},
animation: {
'fade-in-down': 'fade-in-down 0.5s ease-out',
'fade-out-up': 'fade-out-up 0.5s ease-out'
},
},
},
/**
* Safelist configuration.
* Prevents purging of dynamically constructed Tailwind classes.
*/
safelist: [
'bg-blue-500',
'text-white',
'p-4',
'rounded',
'transition-all',
'duration-300',
'ease-in-out',
'hover:bg-blue-700',
'transform',
'rotate-45',
{
pattern: /translate-(x|y|z)-(\d+)/,
variants: ['sm', 'md', 'lg', 'xl', '2xl'],
},
// Add more patterns as needed
],
/**
* Plugin configuration.
* Integrates Tailwind plugins for additional functionality.
*/
plugins: [
plugin(function({ addUtilities }) {
addUtilities({
/*Rotate Y Utility*/
'.rotate-y-180': {
transform: 'rotateY(180deg)',
},
/*Preserve 3D Utility*/
'.preserve-3d': {
transformStyle: 'preserve-3d',
},
/* Backface Visibility Hidden Utility */
'.backface-hidden': {
backfaceVisibility: 'hidden',
}
})
}),
require('@tailwindcss/container-queries'),
],
}
/**
* Example test snippets (not included in the configuration file).
* These snippets are for verifying the correct application of theme settings.
*/
/*
// Test color application
<div className="bg-blue-500 text-white p-4 rounded">Test</div>
// Test font family application
<div className="font-roboto">Test</div>
// Test spacing scale application
<div className="m-4">Test</div>
// Test responsive breakpoints
<div className="text-sm md:text-base lg:text-lg">Test</div>
*/