Skip to content

Close button color incorrect, might be a problem, need discussΒ #162

@kylooh

Description

@kylooh

I am using shadcn-vue's sonner component, and i found the close button's icon color and border color are incorrect while using dark mode.

Image

As you can see, there is a "X" button while using light theme

Image

But when i switch to dark mode, the color of "X" is still black, and the border's color is too bright and too thick.


I checked out the source code, I found shadcn-vue overwrite the --normal-border, which works fine with the toast main body. But the change did not works on close button.

color: var(--gray12);
background: var(--normal-bg);
border: 1px solid var(--gray4);

Here is the reason that icon's color and border's color not changed. The close button is using fixed --gray12 and --gray4. I am wondering, why did not use normal-text and normal-border like toaster content. Is it a bug or not?


If it is a bug, i created a PR to change the setting, I looked the definition for dark and light theme, it is using --gray3 for border, which is slightly different with current --gray4, please notice if it is important.

Also, i noticed that hover for close button is using --gray fixed color too. If need help, i can submit another change too.


If this is not bug, pls close my PR and this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions