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

close button dark mode patch #537

Closed
flazouh opened this issue Jan 14, 2025 · 1 comment
Closed

close button dark mode patch #537

flazouh opened this issue Jan 14, 2025 · 1 comment

Comments

@flazouh
Copy link

flazouh commented Jan 14, 2025

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch sonner@1.7.1 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/sonner/dist/styles.css b/node_modules/sonner/dist/styles.css
index 5ad26c3..3e8f76d 100644
--- a/node_modules/sonner/dist/styles.css
+++ b/node_modules/sonner/dist/styles.css
@@ -440,7 +440,9 @@
 
 [data-sonner-toaster][data-theme='dark'] {
   --normal-bg: #000;
+  --normal-bg-hover: hsl(0, 0%, 12%);
   --normal-border: hsl(0, 0%, 20%);
+  --normal-border-hover: hsl(0, 0%, 25%);
   --normal-text: var(--gray1);
 
   --success-bg: hsl(150, 100%, 6%);
@@ -460,6 +462,17 @@
   --error-text: hsl(358, 100%, 81%);
 }
 
+[data-sonner-toaster][data-theme='dark'] [data-sonner-toast] [data-close-button] {
+  background: var(--normal-bg);
+  border-color: var(--normal-border);
+  color: var(--normal-text);
+}
+
+[data-sonner-toaster][data-theme='dark'] [data-sonner-toast] [data-close-button]:hover {
+  background: var(--normal-bg-hover);
+  border-color: var(--normal-border-hover);
+}
+
 [data-rich-colors='true'][data-sonner-toast][data-type='success'] {
   background: var(--success-bg);
   border-color: var(--success-border);

This issue body was partially generated by patch-package.

@emilkowalski
Copy link
Owner

Fixed in #531

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

No branches or pull requests

2 participants