In Firefox 67, one can use media queries to detect user preference on light or dark theme.
In my version of Firefox (under Ubuntu), it seems that my preference is light
You can update the style used by Firefox by going to about:config
and adding a new property ui.systemUsesDarkTheme
of integer type with value 1
.
It doesn't automatically update the value on active pages in the same way that it does when you're updating OS settings in Windows or Mac, but if you refresh the page after updating it will pick up.
You can confirm the browser setting is correct by viewing the example on mdn
Edit: On firefox 71 the update is applied to active pages without refresh