feat: replace Tailwind with UnoCSS
Faster dev HMR, native Astro 6 support, same utility class names. Tokens migrated to uno.config.ts. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { defineConfig } from 'astro/config';
|
||||
import tailwind from '@astrojs/tailwind';
|
||||
import UnoCSS from '@unocss/astro';
|
||||
|
||||
export default defineConfig({
|
||||
integrations: [tailwind()],
|
||||
integrations: [UnoCSS({ injectReset: true })],
|
||||
});
|
||||
|
||||
2818
package-lock.json
generated
2818
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -13,7 +13,7 @@
|
||||
"astro": "^6.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@astrojs/tailwind": "^6.0.2",
|
||||
"tailwindcss": "^3.4.19"
|
||||
"@unocss/astro": "^66.6.8",
|
||||
"unocss": "^66.6.8"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
/* UnoCSS handles reset and utilities via astro.config.mjs injectReset */
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
export default {
|
||||
content: ['./src/**/*.{astro,html,js,jsx,md,mdx,ts,tsx}'],
|
||||
theme: {
|
||||
extend: {
|
||||
colors: {
|
||||
brand: '#f28a4b',
|
||||
'text-primary': '#2e2a28',
|
||||
'text-secondary': '#7a726d',
|
||||
surface: '#f8f3ee',
|
||||
'surface-alt': '#f2eae3',
|
||||
'surface-footer': '#efe6de',
|
||||
'border-light': '#e3d9d1',
|
||||
},
|
||||
fontFamily: {
|
||||
sans: ['Inter', 'sans-serif'],
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [],
|
||||
}
|
||||
19
uno.config.ts
Normal file
19
uno.config.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { defineConfig, presetWind } from 'unocss'
|
||||
|
||||
export default defineConfig({
|
||||
presets: [presetWind()],
|
||||
theme: {
|
||||
colors: {
|
||||
brand: '#f28a4b',
|
||||
'text-primary': '#2e2a28',
|
||||
'text-secondary': '#7a726d',
|
||||
surface: '#f8f3ee',
|
||||
'surface-alt': '#f2eae3',
|
||||
'surface-footer': '#efe6de',
|
||||
'border-light': '#e3d9d1',
|
||||
},
|
||||
fontFamily: {
|
||||
sans: ['Inter', 'sans-serif'],
|
||||
},
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user