import type { Config } from "tailwindcss"; // Wrap CSS variable values with color-mix so opacity modifiers (bg-primary/10, ring-ring/50, etc.) // work in Tailwind 3.x. Without the /N syntax produces nothing on bare var(--x). const token = (name: string) => `color-mix(in srgb, var(--${name}) calc( * 100%), transparent)`; const config: Config = { darkMode: "class", content: [ "./app/**/*.{js,ts,jsx,tsx,mdx}", ], theme: { extend: { // Ported from src/styles/_variables.scss + tailwind.css (Tailwind 4 // @theme inline). Values are plain custom properties, wrapped with color-mix // so opacity modifiers work. colors: { border: token("border"), input: token("input"), ring: token("ring"), background: token("background"), foreground: token("foreground"), primary: { DEFAULT: token("primary"), foreground: token("primary-foreground"), }, secondary: { DEFAULT: token("secondary"), foreground: token("secondary-foreground"), }, destructive: { DEFAULT: token("destructive"), foreground: token("destructive-foreground"), }, muted: { DEFAULT: token("muted"), foreground: token("muted-foreground"), }, accent: { DEFAULT: token("accent"), foreground: token("accent-foreground"), strong: token("accent-strong"), }, popover: { DEFAULT: token("popover"), foreground: token("popover-foreground"), }, card: { DEFAULT: token("card"), foreground: token("card-foreground"), }, "table-head": { DEFAULT: token("table-head"), foreground: token("table-head-foreground"), }, positive: token("positive"), negative: token("negative"), warning: token("warning"), chart: { "1": token("chart-1"), "2": token("chart-2"), "3": token("chart-3"), "4": token("chart-4"), "5": token("chart-5"), }, sidebar: { DEFAULT: token("sidebar"), foreground: token("sidebar-foreground"), primary: token("sidebar-primary"), "primary-foreground": token("sidebar-primary-foreground"), accent: token("sidebar-accent"), "accent-foreground": token("sidebar-accent-foreground"), border: token("sidebar-border"), ring: token("sidebar-ring"), }, }, borderRadius: { // Read through vars so a card can re-point them for what it holds (nested radius, globals.css). sm: "var(--radius-sm)", md: "var(--radius-md)", lg: "var(--radius-lg)", xl: "var(--radius-xl)", table: "var(--table-radius)", }, boxShadow: { card: "var(--shadow-card)", }, fontFamily: { heading: ["var(--font-heading)"], sans: ["var(--font-sans)"], mono: ["var(--font-mono)"], }, }, }, plugins: [], }; export default config;