Skip to content

Commit ec05c45

Browse files
committed
Enhance alert styling with blur effect and theme-aware background colors
1 parent 6dbc434 commit ec05c45

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

public/css/theme.css

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -298,30 +298,33 @@ html, body {
298298
padding: var(--spacing-md);
299299
border-radius: var(--border-radius-md);
300300
margin-bottom: var(--spacing-md);
301+
box-shadow: var(--shadow-md);
302+
border: 1px solid var(--border-color);
303+
backdrop-filter: blur(4px);
301304
}
302305

303306
.alert-success {
304-
background-color: rgba(16, 185, 129, 0.1);
307+
background-color: rgba(16, 185, 129, 0.9);
305308
border-left: 4px solid var(--success-color);
306-
color: var(--success-color);
309+
color: white;
307310
}
308311

309312
.alert-warning {
310-
background-color: rgba(245, 158, 11, 0.1);
313+
background-color: rgba(245, 158, 11, 0.9);
311314
border-left: 4px solid var(--warning-color);
312-
color: var(--warning-color);
315+
color: white;
313316
}
314317

315318
.alert-error {
316-
background-color: rgba(239, 68, 68, 0.1);
319+
background-color: rgba(239, 68, 68, 0.9);
317320
border-left: 4px solid var(--error-color);
318-
color: var(--error-color);
321+
color: white;
319322
}
320323

321324
.alert-info {
322-
background-color: rgba(186, 24, 170, 0.1);
325+
background-color: rgba(186, 24, 170, 0.9);
323326
border-left: 4px solid var(--info-color);
324-
color: var(--info-color);
327+
color: white;
325328
}
326329

327330
/* Utility classes */

public/js/alerts.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ function initAlertContainer() {
2222
alertContainer.style.zIndex = '9999';
2323
alertContainer.style.width = '80%';
2424
alertContainer.style.maxWidth = '500px';
25+
26+
// Add background color based on current theme
27+
const currentTheme = document.documentElement.getAttribute('data-theme') || 'light';
28+
alertContainer.style.backgroundColor = currentTheme === 'dark' ? 'var(--background-color, #121212)' : 'var(--background-color, #ffffff)';
29+
2530
document.body.appendChild(alertContainer);
2631

2732
return alertContainer;

0 commit comments

Comments
 (0)