Question

Cursor changed my Tailwind config and now nothing has color

Solved · 73 viewsasked by rosa_m

Asked for a new brand color. It rewrote tailwind.config.ts, removed content paths, and now every class is missing.

What I’ve tried

Reverted with git, asked again, same result.

Comment
Restore the old config from git and ask again. Don't let it fix its own fix. katie_on_cursor

2 answers

Marked as helpful by the asker
dev_ana

It rewrites the file because you ask for a change to the file. Ask for a change to the theme: 'Add brand: "#5E6AD2" under theme.extend.colors in tailwind.config.ts. Change nothing else in that file.' The word 'extend' and 'nothing else' are what keep the content array alive.

Comment
Restored from git, then asked the narrow version. One line changed. rosa_m
nomvula_b

Worth checking which Tailwind version you're on before the next round. In v4 there is no content array and colors live in your CSS:

@theme {
  --color-brand: #5E6AD2;
}

Cursor mixes v3 and v4 syntax a lot, and a v3 config in a v4 project also looks like "nothing has color". npm ls tailwindcss tells you which one you have.

Comment
Still on v3 here, but I'll remember this for the upgrade. rosa_m