Instruction file imported from mgetf/website-next (
.cursor/rules/no-raw-tailwind-in-routes.mdc). Copyright stays with the author.
No Raw Tailwind Colors in Route Files
Route .svelte files must use shared components and design tokens, not raw Tailwind palette classes.
Always use components, never inline:
- Colored button / CTA:
Buttonfrom$lib/components/ui/Button.svelte - Dark bordered container:
Cardfrom$lib/components/ui/Card.svelte - Status pill / label:
Badgefrom$lib/components/ui/Badge.svelte - Labeled text input:
FormInputfrom$lib/components/ui/form/FormInput.svelte - Labeled dropdown:
FormSelectfrom$lib/components/ui/form/FormSelect.svelte - Destructive confirmation:
ConfirmDialogfrom$lib/components/ui/ConfirmDialog.svelte(neverwindow.confirm()) - Data table / list:
DataTablefrom$lib/components/ui/DataTable.svelte(never raw<table>with inline styles)
For any remaining color needs, use semantic tokens:
bg-surface-card (not bg-zinc-900)
bg-surface-input (not bg-zinc-800)
bg-surface-hover (not bg-zinc-700)
border-border-default (not border-zinc-800)
border-border-input (not border-zinc-700)
text-text-body (not text-gray-400 / text-zinc-400)
text-text-label (not text-gray-300 / text-zinc-300)
text-text-muted (not text-gray-500 / text-zinc-500)
bg-primary-600 (not bg-orange-600 for brand actions)
bg-danger-600 (not bg-red-600)
bg-success-600 (not bg-green-600 / bg-emerald-600)
bg-warning-600 (not bg-yellow-600 / bg-amber-600)
focus:ring-primary-500 (not focus:ring-blue-500 / focus:ring-orange-500)
Format colors (only use in format-specific contexts):
bg-format-2v2-600 (2v2 league pages, 2v2 signup cards)
bg-format-1v1-600 (1v1 league pages, 1v1 signup cards)
CI will fail if raw bg-(blue|orange|indigo)-600 hover:bg-* patterns appear in route files.