Scope dark-mode form and notification styles to the explicit theme
The form-control and notification-tint blocks applied on the OS prefers-color-scheme alone, so a machine in OS dark mode leaked dark widget styling into the app's explicit light theme - dropdown options rendered near-black on black. The theme store always stamps data-theme at startup, so scope these rules to [data-theme=dark]. Dropdown options in dark mode use the solid card background instead of the text color.
This commit is contained in:
@@ -624,26 +624,26 @@ input[type="radio"] {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dark mode form adjustments */
|
/* Dark mode form adjustments. Scoped to the explicit theme attribute (the
|
||||||
@media (prefers-color-scheme: dark) {
|
theme store always stamps it at startup) - a bare prefers-color-scheme
|
||||||
.form-control {
|
query here leaks dark widget styles into light mode on dark-OS machines. */
|
||||||
|
[data-theme="dark"] .form-control {
|
||||||
background: var(--bg);
|
background: var(--bg);
|
||||||
border-color: var(--border);
|
border-color: var(--border);
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-control:focus {
|
[data-theme="dark"] .form-control:focus {
|
||||||
background: var(--bg);
|
background: var(--bg);
|
||||||
box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
|
box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
select.form-control {
|
[data-theme="dark"] select.form-control {
|
||||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
|
||||||
background-color: var(--bg);
|
background-color: var(--bg);
|
||||||
}
|
}
|
||||||
|
|
||||||
select.form-control option {
|
[data-theme="dark"] select.form-control option {
|
||||||
background: var(--text);
|
background: var(--bg-card-solid);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Form grid */
|
/* Form grid */
|
||||||
@@ -1726,17 +1726,15 @@ td.actions .btn + .btn {
|
|||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (prefers-color-scheme: dark) {
|
[data-theme="dark"] .notification-item.type-incident {
|
||||||
.notification-item.type-incident {
|
|
||||||
background: rgba(245, 54, 92, 0.1);
|
background: rgba(245, 54, 92, 0.1);
|
||||||
}
|
}
|
||||||
.notification-item.type-change {
|
[data-theme="dark"] .notification-item.type-change {
|
||||||
background: rgba(255, 136, 0, 0.1);
|
background: rgba(255, 136, 0, 0.1);
|
||||||
}
|
}
|
||||||
.notification-item.type-awareness {
|
[data-theme="dark"] .notification-item.type-awareness {
|
||||||
background: rgba(4, 185, 98, 0.1);
|
background: rgba(4, 185, 98, 0.1);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* Light mode is now default, dark mode via prefers-color-scheme */
|
/* Light mode is now default, dark mode via prefers-color-scheme */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user