Skip to content

Commit 253fbae

Browse files
authored
Merge pull request #630 from nextcloud/bugfix/noid/fix-darkmode-wiht-nextcloud-25
Fix dark mode with Nextcloud 25
2 parents 1742771 + cdcc469 commit 253fbae

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

styles/toast.scss

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
background-color: var(--color-main-background);
2929
color: var(--color-main-text);
3030
box-shadow: 0 0 6px 0 var(--color-box-shadow);
31-
padding: 0px 12px;
31+
padding: 0 12px;
3232
margin-top: 45px;
3333
position: fixed;
3434
z-index: 10100;
@@ -57,9 +57,23 @@
5757

5858
// icon styling
5959
&.toast-close {
60-
background-image: url('./close.svg');
61-
text-indent: 200%;
60+
text-indent: 0;
6261
opacity: .4;
62+
border: none;
63+
min-height: 44px;
64+
margin-left: 10px;
65+
font-size: 0;
66+
67+
/* dark theme overrides for Nextcloud 25 and later */
68+
&::before {
69+
background-image: url('./close.svg');
70+
content: ' ';
71+
filter: var(--background-invert-if-dark);
72+
73+
display: inline-block;
74+
width: 16px;
75+
height: 16px;
76+
}
6377
}
6478

6579
&.toast-undo-button {
@@ -106,12 +120,12 @@
106120
}
107121
}
108122

109-
/* dark theme overrides */
123+
/* dark theme overrides for Nextcloud 24 and earlier */
110124
.theme--dark {
111125
.toastify.dialogs {
112126
.toast-close {
113127
/* close icon style */
114-
&.toast-close {
128+
&.toast-close::before {
115129
background-image: url('./close-dark.svg');
116130
}
117131
}

0 commit comments

Comments
 (0)