shadcn-ui/ui

[bug]: The style overrides by shadcn for sonner are not working.

Opened this issue · 4 comments

Describe the bug

image

From the screenshot, it is evident that the styles added by shadcn have a lower priority than the inherent styles of sonner , and therefore cannot override them correctly.

Affected component/components

Sonner

How to reproduce

  1. install shadcn/ui
style: default
baseColor: gray
cssVariable: false
  1. install sonner by npx shadcn-ui@latest add sonner
  2. use sonner in my project

Codesandbox/StackBlitz link

No response

Logs

No response

System Info

System: macOS 14.2.1
Browser: Arc Version 1.39.0 (48951) / Chromium Engine Version 124.0.6367.61

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues

I think this issue started with the upgrade from sonner 1.4.3 to 1.4.41.
In my project, I'm sticking to sonner 1.4.3 because the style override still works in that version.

I tried using 1.4.3 and still same issue :/

the problem is still in production

I think I'm having this issue also, my popup didn't have a border style. Rolling back to 1.4.3 corrected the issue.