Files
bookhoard/tailwind.config.ts
T
john-okeefe c2cc2361d9 feat: make docs theme-aware using CSS variables
- Update Tailwind config to use CSS variables instead of hardcoded colors
- Colors now reference theme variables: var(--text-primary), var(--text-secondary), etc.
- Fix Tokyo Night theme: text-secondary corrected from #565f89 to #9aa5ce
- Typography plugin now uses var() for theme-aware prose styling
- Enables docs to respect theme system like rest of app
2026-02-03 09:55:51 -05:00

66 lines
1.6 KiB
TypeScript

import type { Config } from 'tailwindcss';
const config: Config = {
content: [
"./templates/**/*.{templ,html}",
"./web/static/**/*.{html,js}"
],
theme: {
extend: {
colors: {
primary: {
DEFAULT: '#7aa2f7',
50: '#f0f9ff',
100: '#e0f2fe',
200: '#bae6fd',
300: '#7dd3fc',
400: '#38bdf8',
500: '#0ea5e9',
600: '#0284c7',
700: '#0369a1',
800: '#075985',
900: '#0c4a6e',
},
'bg-primary': 'var(--bg-primary)',
'bg-secondary': 'var(--bg-secondary)',
'text-primary': 'var(--text-primary)',
'text-secondary': 'var(--text-secondary)',
'accent': 'var(--accent)',
'border': 'var(--border)',
},
typography: ({ theme }) => ({
invert: {
css: {
'--tw-prose-pre-bg': 'var(--bg-secondary)',
code: {
backgroundColor: 'var(--bg-primary)',
color: 'var(--text-primary)',
fontWeight: '400',
},
'code::before': {
content: '""',
},
'code::after': {
content: '""',
},
'pre code': {
backgroundColor: 'transparent',
color: 'inherit',
},
pre: {
backgroundColor: 'var(--bg-secondary)',
color: 'var(--text-primary)',
},
},
},
}),
}
},
plugins: [
require('@tailwindcss/forms'),
require('@tailwindcss/typography'),
],
};
export default config;