Replies: 2 comments 2 replies
-
@bee-san We use a event listener to switch the theme. hugo-PaperMod/layouts/partials/footer.html Lines 54 to 67 in 77ff1e6 |
Beta Was this translation helpful? Give feedback.
0 replies
-
@bee-san If you want to stick to CSS, you can check whether the tbody tr:nth-of-type(even) {
background-color: #f3f3f3;
}
body.dark tbody tr:nth-of-type(even) {
background-color: #383838;
} |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey!
I'm re-designing the CSS for tables.
I have this CSS:
This operates based on what the browser / OS settings are.
But the user can prefer dark mode, but select light mode in the theme and this then breaks.
How would I go around detecting when the switch is flicked so it can change the CSS? :)
Beta Was this translation helpful? Give feedback.
All reactions