Files
iistwin/tailwind.config.ts
Ильяс Султанов 95279b8fcc feat: skin engine + Twenty CRM theme for iistwin
- Add client/src/themes/ with tokens, built-in skins (iistwin, twenty, omegaprom)
- Add ThemeProvider with data-skin/data-theme and runtime CSS for custom skins
- Add npm run skins:generate script for build-time CSS generation
- Add organization_skins table, migration and CRUD API
- Add activeSkinId to organizations and expose it in /api/auth/me
- Add skin switcher in /profile and admin skin editor in /settings/appearance
- Adapt index.css hardcoded colors to skin tokens
- Update AGENTS.md and Obsidian notes
2026-07-09 20:25:49 +03:00

133 lines
4.0 KiB
TypeScript

import type { Config } from "tailwindcss";
export default {
darkMode: ["class"],
content: ["./client/index.html", "./client/src/**/*.{js,jsx,ts,tsx}"],
theme: {
extend: {
borderRadius: {
lg: "var(--radius)",
md: "calc(var(--radius) - 2px)",
sm: "calc(var(--radius) - 4px)",
"tw-xs": "var(--tw-border-radius-xs)",
"tw-sm": "var(--tw-border-radius-sm)",
"tw-md": "var(--tw-border-radius-md)",
"tw-lg": "var(--tw-border-radius-lg)",
"tw-xl": "var(--tw-border-radius-xl)",
},
colors: {
background: "var(--background)",
foreground: "var(--foreground)",
card: {
DEFAULT: "var(--card)",
foreground: "var(--card-foreground)",
},
popover: {
DEFAULT: "var(--popover)",
foreground: "var(--popover-foreground)",
},
primary: {
DEFAULT: "var(--primary)",
foreground: "var(--primary-foreground)",
},
secondary: {
DEFAULT: "var(--secondary)",
foreground: "var(--secondary-foreground)",
},
muted: {
DEFAULT: "var(--muted)",
foreground: "var(--muted-foreground)",
},
accent: {
DEFAULT: "var(--accent)",
foreground: "var(--accent-foreground)",
},
destructive: {
DEFAULT: "var(--destructive)",
foreground: "var(--destructive-foreground)",
},
border: "var(--border)",
input: "var(--input)",
ring: "var(--ring)",
chart: {
"1": "var(--chart-1)",
"2": "var(--chart-2)",
"3": "var(--chart-3)",
"4": "var(--chart-4)",
"5": "var(--chart-5)",
},
sidebar: {
DEFAULT: "var(--sidebar)",
foreground: "var(--sidebar-foreground)",
primary: "var(--sidebar-primary)",
"primary-foreground": "var(--sidebar-primary-foreground)",
accent: "var(--sidebar-accent)",
"accent-foreground": "var(--sidebar-accent-foreground)",
border: "var(--sidebar-border)",
ring: "var(--sidebar-ring)",
},
status: {
done: "var(--status-done)",
progress: "var(--status-progress)",
overdue: "var(--status-overdue)",
paused: "var(--status-paused)",
},
// Twenty-style extended tokens
"tw-background": {
DEFAULT: "var(--background)",
secondary: "var(--tw-background-secondary)",
tertiary: "var(--tw-background-tertiary)",
},
"tw-font": {
DEFAULT: "var(--foreground)",
primary: "var(--tw-font-primary)",
secondary: "var(--tw-font-secondary)",
tertiary: "var(--tw-font-tertiary)",
light: "var(--tw-font-light)",
},
"tw-border": {
DEFAULT: "var(--border)",
light: "var(--tw-border-light)",
medium: "var(--tw-border-medium)",
strong: "var(--tw-border-strong)",
},
},
fontSize: {
"tw-xs": "var(--tw-font-size-xs)",
"tw-sm": "var(--tw-font-size-sm)",
"tw-md": "var(--tw-font-size-md)",
"tw-lg": "var(--tw-font-size-lg)",
"tw-xl": "var(--tw-font-size-xl)",
},
fontFamily: {
sans: ["var(--font-sans)"],
serif: ["var(--font-serif)"],
mono: ["var(--font-mono)"],
},
keyframes: {
"accordion-down": {
from: {
height: "0",
},
to: {
height: "var(--radix-accordion-content-height)",
},
},
"accordion-up": {
from: {
height: "var(--radix-accordion-content-height)",
},
to: {
height: "0",
},
},
},
animation: {
"accordion-down": "accordion-down 0.2s ease-out",
"accordion-up": "accordion-up 0.2s ease-out",
},
},
},
plugins: [require("tailwindcss-animate"), require("@tailwindcss/typography")],
} satisfies Config;