Thanks for the response!
I'm using Firefox 57 on Linux, with the default theme, using the Arc-Dark gtk+ theme.
I was able to fix it by applying a Stylus theme which sets foreground dark and background light, which I think is what your CSS expects.
Best!