styling-tailwind-v4
Tailwind CSS v4 conventions used in this template — CSS-first @theme config, OKLCH tokens, and variant composition.
Files1
View on GitHubSKILL.md.claude/skills/styling-tailwind-v4/SKILL.md
GitHub- Design tokens are declared in
src/styles.cssunder@theme, in OKLCH (--color-brand-500: oklch(0.55 0.18 260);), not in atailwind.config.js— Tailwind v4 is CSS-first, there is no JS config file in this template. - Reference tokens through the generated utility classes (
bg-brand-600,text-brand-700), never hard-code a raw color value in a component — if a new brand color is needed, add it to@themefirst. - Compose conditional/variant classes with
cva(seecomponent-conventionsskill) and merge withcn()(clsx+tailwind-merge) so conflicting utility classes (e.g. two differentpx-*values) resolve predictably instead of both landing in the class list. - Prefer Tailwind's built-in responsive/state variants (
sm:,hover:,focus-visible:,disabled:) over custom CSS — reach forsrc/styles.cssonly for@themetokens or truly global resets, not component-level styling. - Respect
color-scheme: light dark(set onbodyinsrc/styles.css) — do not hard-code a light-only background/text color pair on a full-page container without checking it also works against a dark system theme.