Skip to content

Commit c7e980a

Browse files
committed
style: fixed the close button hover state
1 parent 6294f32 commit c7e980a

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

packages/styles.css

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,19 +224,26 @@
224224
transition: opacity 100ms, background 200ms, border-color 200ms;
225225
}
226226

227-
:where([data-sonner-toast]) :where([data-close-button]):focus-visible {
227+
[data-sonner-toast] [data-close-button]:focus-visible {
228228
box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1), 0 0 0 2px rgba(0, 0, 0, 0.2);
229229
}
230230

231231
:where([data-sonner-toast]) :where([data-disabled='true']) {
232232
cursor: not-allowed;
233233
}
234234

235-
:where([data-sonner-toast]):hover :where([data-close-button]):hover {
235+
[data-sonner-toast]:hover [data-close-button]:hover {
236236
background: var(--gray2);
237237
border-color: var(--gray5);
238238
}
239239

240+
[data-sonner-toaster][data-theme='dark']
241+
[data-sonner-toast]:hover
242+
[data-close-button]:hover {
243+
background: #000;
244+
border-color: hsl(0, 0%, 30%);
245+
}
246+
240247
/* Leave a ghost div to avoid setting hover to false when swiping out */
241248
:where([data-sonner-toast][data-swiping='true'])::before {
242249
content: '';

0 commit comments

Comments
 (0)