We are having issues targeting Firefox Quantum when it comes to CSS. We know that the following:
@-moz-document url-prefix() { .my-style{ } }
No. There is no reliable way to do this. Some may suggest user agent string but this, too, has been shown to be unreliable.
I suggest you use feature queries or detection through javascript or @supports in CSS.