Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(shadcn): fixes form error color to use text-destructive-foreground #6425

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

petalas
Copy link

@petalas petalas commented Jan 22, 2025

What does this PR do?

  • Changes the color for errors in forms to use text-destructive-foreground instead of text-destructive

Preview

Before:

image

After:

image

Explanation:

If I understand correctly, generally:

  • --destructive is for the background color of destructive components
  • --destructive-foreground is for the text / foreground elements of destructive components

Testing with catppuccin mocha colors

@layer base {
  .dark {
    --background: 240 21% 15%;
    --foreground: 226 64% 88%;
    --destructive: 240 23% 9%;
    --destructive-foreground: 343 81% 75%;
  }
}

Here is how a toast looks with these colors as a sanity check.

image

Hopefully this makes sense, let me know if I'm misunderstanding something, new to shadcn.

Copy link

vercel bot commented Jan 22, 2025

@petalas is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants