Without digging too much, it seems like the problem is caused by having one media query (likely-light-button function) inside another (when we call it inside @media (prefers-color-scheme: dark)) -- and oh no, we're losing our scope, having this in the resulting CSS:
This PR achieves removing this block so that our theme-based CSS looks like this:
which corresponds to our hardcoded dark theme (unchanged compared to master):
@NikolayRys could you verify? There also might be a more elegant solution, but this separation was the first thing that came to my mind and it seems to do the trick.
Good job, thanks :)
Yeah, seems that @media queries cannot really be nested with our CSS preprocessor but rather need to be explicitly chained through and.
Without digging too much, it seems like the problem is caused by having one
media
query (likely-light-button
function) inside another (when we call it inside@media (prefers-color-scheme: dark)
) -- and oh no, we're losing our scope, having this in the resulting CSS:This PR achieves removing this block so that our theme-based CSS looks like this:
which corresponds to our hardcoded dark theme (unchanged compared to
master
):@NikolayRys could you verify? There also might be a more elegant solution, but this separation was the first thing that came to my mind and it seems to do the trick.