BUG: System theme overrides anki theme in css

In user interface I am using
style=anki
instead of native and
them = light ,
whereas my system them is dark. before doing updateprefers-color-scheme seems to respect the anki own light and dark theme but now its just behaving according to system light and dark theme

specifically

/* ============== */
:root {
    --odd-row-color-light: #cbcfd9; /* Light mode color */
    --odd-row-color-dark: #2e2e2e;  /* Dark mode color */
}

/* Apply odd row color based on the user's color scheme */

@media (prefers-color-scheme: light) {
    table tbody tr:nth-child(odd) {
        background-color: var(--odd-row-color-light);
    }
}

it used to work before updating

System: Nixos-unstable kde plasma 6.3
qt 6.8.2
anki version: Anki 24.11

i got it working using

.card.nightMode table tbody tr:nth-child(odd) {
    background-color: #2e2e2e; /* Dark mode color */
}

.card:not(.nightMode) table tbody tr:nth-child(odd) {
    background-color: #cbcfd9; /* Light mode color */
}
1 Like