Is it possible to specify a class or an ID and get all the CSS rules for that particular class or ID. I don't mean an element, I want to specify a class and return all CSS for that class.
I know I can use .style
to get inline styles but I don't need inline, it has to come from the stylesheet.
Is it even possible with JS? Can it access the .css file and return a list of properties for a certain class?
Apologies for no code, it's more of a theoretical question although if someone has a function at hand, I'd be happy to study it.