(disclaimer: very unfamiliar with layout, but this was a fun excuse to poke
around MXR)
You mean in JS or an external component? Because it seems you can ask
nsStylesheetService, but not nsIStylesheetService. In other words, if you're
inside layout, you could directly ask the component, but it isn't exposing that
info via its IDL, as far as I can tell, and it looks like UA ones aren't
included in document.styleSheets. Perhaps nsIStylesheetService could be made to
include this? I don't see a reason not to expose it (and many reasons why it may
be useful).
Cheers,
Gijs