diff --git a/.agents/skills/design-taste-frontend/SKILL.md b/.agents/skills/design-taste-frontend/SKILL.md index f7f472a74e9..11ad6fa3e86 100644 --- a/.agents/skills/design-taste-frontend/SKILL.md +++ b/.agents/skills/design-taste-frontend/SKILL.md @@ -4,7 +4,7 @@ source: https://github.com/leonxlnx/taste-skill — skills/taste-skill/SKILL.md description: Anti-slop frontend skill for landing pages, portfolios, and redesigns. The agent reads the brief, infers the right design direction, and ships interfaces that do not look templated. Real design systems when applicable, audit-first on redesigns, strict pre-flight check. --- -> **In this repo:** Tailwind 3.4 (`apps/sim/tailwind.config.ts`); animation via `import { motion } from 'framer-motion'` (not `motion/react` — rewrite every `motion/react` import in the samples below); icons from `@sim/emcn/icons`; colors through the CSS-variable tokens in `.claude/rules/sim-styling.md` (no hardcoded `text-gray-*`/hex/`zinc` utilities, no paired `dark:` utilities). This note overrides any conflicting guidance or code sample anywhere in this file. +> **In this repo:** Tailwind 4 (CSS-first config in `apps/sim/app/_styles/globals.css`); animation via `import { motion } from 'framer-motion'` (not `motion/react` — rewrite every `motion/react` import in the samples below); icons from `@sim/emcn/icons`; colors through the CSS-variable tokens in `.claude/rules/sim-styling.md` (no hardcoded `text-gray-*`/hex/`zinc` utilities, no paired `dark:` utilities). This note overrides any conflicting guidance or code sample anywhere in this file. # tasteskill: Anti-Slop Frontend Skill diff --git a/.claude/rules/sim-settings-pages.md b/.claude/rules/sim-settings-pages.md index 763803ed7db..9893028c352 100644 --- a/.claude/rules/sim-settings-pages.md +++ b/.claude/rules/sim-settings-pages.md @@ -113,7 +113,7 @@ Adding a new settings page: ## Text-scale tokens (no literal pixel sizes) Settings pages never use a literal `text-[Npx]` class — always the named Tailwind -scale token from `apps/sim/tailwind.config.ts`'s `fontSize` extension (`text-micro` +scale token from the `@theme` block in `apps/sim/app/_styles/globals.css` (`text-micro` 10px, `text-xs` 11px, `text-caption` 12px, `text-small` 13px, `text-sm` 14px [Tailwind default, unmodified], `text-base` 15px, `text-md` 16px, `text-lg` 18px [Tailwind default]). A literal size is either a straight rename to the equivalent diff --git a/.claude/rules/sim-styling.md b/.claude/rules/sim-styling.md index 3fd18753f46..51a882f8607 100644 --- a/.claude/rules/sim-styling.md +++ b/.claude/rules/sim-styling.md @@ -46,7 +46,7 @@ setWidth: (width) => { ## Text Scale -Custom font sizes (`apps/sim/tailwind.config.ts`): `text-micro`=10px, `text-xs`=11px, `text-caption`=12px, `text-small`=13px, `text-base`=15px. `text-sm` is Tailwind default 14px. Field titles use `text-small` (13px); hints/errors use `text-caption` (12px). +Custom font sizes (the `@theme` block in `apps/sim/app/_styles/globals.css`): `text-micro`=10px, `text-xs`=11px, `text-caption`=12px, `text-small`=13px, `text-base`=15px. `text-sm` is Tailwind default 14px. Field titles use `text-small` (13px); hints/errors use `text-caption` (12px). Icons default `size-[14px]`. Equal h/w → `size-*` (`size-[14px]`, `size-4`), never `h-N w-N`. diff --git a/.cursor/rules/sim-styling.mdc b/.cursor/rules/sim-styling.mdc index 8b407a204b7..e4688808503 100644 --- a/.cursor/rules/sim-styling.mdc +++ b/.cursor/rules/sim-styling.mdc @@ -40,7 +40,7 @@ setWidth: (width) => { ## Text Scale -Custom font sizes (`apps/sim/tailwind.config.ts`): `text-micro`=10px, `text-xs`=11px, `text-caption`=12px, `text-small`=13px, `text-base`=15px. `text-sm` is Tailwind default 14px. Field titles use `text-small` (13px); hints/errors use `text-caption` (12px). +Custom font sizes (the `@theme` block in `apps/sim/app/_styles/globals.css`): `text-micro`=10px, `text-xs`=11px, `text-caption`=12px, `text-small`=13px, `text-base`=15px. `text-sm` is Tailwind default 14px. Field titles use `text-small` (13px); hints/errors use `text-caption` (12px). Icons default `size-[14px]`. Equal h/w → `size-*` (`size-[14px]`, `size-4`), never `h-N w-N`. diff --git a/apps/docs/app/global.css b/apps/docs/app/global.css index aa2e6f740c8..b0f169b33fb 100644 --- a/apps/docs/app/global.css +++ b/apps/docs/app/global.css @@ -7,7 +7,7 @@ /* Every @sim/emcn component expresses hover through `hover-hover:` so touch devices never latch a sticky hover state. The app registers it as a plugin - variant in apps/sim/tailwind.config.ts; docs is CSS-first Tailwind v4 with no + variant in apps/sim/app/_styles/globals.css; docs is CSS-first Tailwind v4 with no config, so without this declaration the variant compiles to nothing and every emcn hover state silently no-ops here. */ @custom-variant hover-hover { @@ -35,7 +35,7 @@ body { --color-fd-primary: var(--color-fd-foreground); /* Sim's custom type scale — emcn components (Label, Badge, the shared block views) use these names, so they must resolve here or text falls back to the - inherited size. Mirrors apps/sim/tailwind.config.ts. */ + inherited size. Mirrors apps/sim/app/_styles/globals.css. */ --text-micro: 10px; --text-xs: 11px; --text-caption: 12px; @@ -47,7 +47,7 @@ body { --text-caption and --text-small, because the mono face reads small at 12px. */ --text-code: 0.78125rem; - /* The platform's code face. `apps/sim/tailwind.config.ts` lists `var(--font-martian-mono)` + /* The platform's code face. `apps/sim/app/_styles/globals.css` lists `var(--font-martian-mono)` first, but nothing in the app ever defines that variable — `apps/sim/app/layout.tsx` applies only `season.variable` — so every code surface in the product resolves to the system stack below. Docs match what the app actually renders rather than the token it diff --git a/apps/docs/lib/utils.ts b/apps/docs/lib/utils.ts index 2a18386f2dc..a7b128a8254 100644 --- a/apps/docs/lib/utils.ts +++ b/apps/docs/lib/utils.ts @@ -1,12 +1,15 @@ -import { type ClassValue, clsx } from 'clsx' -import { twMerge } from 'tailwind-merge' - /** - * Combines multiple class names into a single string, merging Tailwind classes properly + * Re-exported from the design system rather than built here, so docs runs one + * merge engine instead of two: its own components already import `cn` from + * `@sim/emcn` indirectly, and a second `cn` entry point would ship a duplicate + * engine and lookup tables. + * + * It also carries emcn's `font-size` class group, which docs needs — its + * `global.css` defines the same `--text-micro/caption/small/md` scale, and the + * stock merger does not treat those as font sizes, so `cn('text-small', + * 'text-sm')` emitted both and let CSS source order pick the winner. */ -export function cn(...inputs: ClassValue[]) { - return twMerge(clsx(inputs)) -} +export { cn } from '@sim/emcn' /** * Get the full URL for an asset stored in Vercel Blob diff --git a/apps/docs/package.json b/apps/docs/package.json index 66ba9567c52..67b822703ae 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -23,7 +23,6 @@ "@sim/workflow-renderer": "workspace:*", "@xyflow/react": "12.11.3", "class-variance-authority": "^0.7.1", - "clsx": "^2.1.1", "drizzle-orm": "^0.45.2", "fumadocs-core": "16.8.5", "fumadocs-mdx": "14.3.2", @@ -35,7 +34,6 @@ "react-dom": "19.2.4", "remark-breaks": "^4.0.0", "shiki": "4.3.1", - "tailwind-merge": "^3.0.2", "framer-motion": "^12.5.0", "zod": "4.3.6" }, diff --git a/apps/sim/app/(interfaces)/chat/components/input/input.tsx b/apps/sim/app/(interfaces)/chat/components/input/input.tsx index abb1460c955..e488f8a8ea9 100644 --- a/apps/sim/app/(interfaces)/chat/components/input/input.tsx +++ b/apps/sim/app/(interfaces)/chat/components/input/input.tsx @@ -124,7 +124,7 @@ export const ChatInput: React.FC<{ const canSubmit = (inputValue.trim().length > 0 || attachedFiles.length > 0) && !isStreaming return ( -