First, it's important to keep in mind that css support on ebooks significantly lags behind css support on the major browsers. EPUB only supports a subset of css.
Among the many challenges of producing ebooks is that if you test the html first in browsers (as I do), the ebook reading system won't necessarily render it the same.
There used to be a matrix of CSS support for epub 3 reading systems, but it quickly became out of date and wasn't maintained properly. Indeed, I can't even find the URL for it anymore (maybe it's gone offline?) There's a mobileread wiki (I actually helped to create it a while back), but it's not well-organized or maintained.
Also, as Kindle became more dominant in the market, many people cared more about what is supported on Kindle. The Amazon Kindle Publishing Guidelines (PDF) is pretty much the main source of information for everybody, and it is updated several times a year. In the back is a table of supported css. For example, on page 97 of this document, it clearly says that ::before is NOT supported on Kindle devices.
I think Apple publishes a similar guideline, but far less frequently and it's far less detailed.
You can always check the epub spec to see if this css must be supported, but whether it's supposed to be supported and whether it's actually supported on reading systems is another story. So it's still the wild wild west for ebooks...
For this reason, you probably have to do more testing than usual. Besides Kindle, I usually test on one or two IOS devices, Google Play Books and Adobe Digital Editions (Windows edition).
Another thing is that css media queries were quickly supported by all the major platforms. So you could write queries to target different screen resolutions, and could have fallbacks in case the original css wasn't supported.
Postscript: It would be nice if a wiki or a site like Can I use it were to have a section devoted to ebook support. Unfortunately, the ebook world is significantly smaller than the web browser world and unusually dependent on the ability of proprietary reading system's ability to support features.