I've tried to make a design template that uses different colors depending on light/dark mode via TemplateStyles, but it doesn't work. I think it doesn't work because TemplateStyles is scoped to the template.
The CSS I used looked something like this, and works outside of TemplateStyles.
.theme-fandomdesktop-light .themed {
color: green;
}
.theme-fandomdesktop-dark .themed {
color: blue;
}
I was wondering if anyone knew a way to make it work without having to use regular CSS pages. Because having to do it that way is really inconvenient (as I am not an admin on the wiki of interest) and defeats the purpose of TemplateStyles.
UPDATE:
I took a closer look at TemplateStyle's documentation and realized that I need to specify the body element. I guess TemplateStyles can look beyond its scope if you specify which element to look at?
In other words, the previous CSS didn't work, and this CSS does:
body.theme-fandomdesktop-light .themed {
color: green;
}
body.theme-fandomdesktop-dark .themed {
color: blue;
}