High level overview question about the parsing and painting of an HMTL DOM:
Does the browser search stylesheets for classes found when it parses the DOM or does it search the DOM for classes found in the stylesheets?
I appreciate this question could be browser specific, and might not be applicable to all use cases, but find it an interesting question when it comes to optimisation, for example is it less efficient to have redundant classes in the DOM or in stylesheets.
Many thanks for any help.