I'd like to re-write a HTML file that references several stylesheets into a new HTML file, where the tags contain only the final, computed styles. This is for further processing of the site where styles such as color need to be known, to avoid having to implement the rather complex logic of style deduction (such as CSS selectors) in that later processing.
Is there some recommended, simple way to do this? I tried saving the file in Chrome and Firefox, but they mostly reproduce the original content, including the CSS file(s). Another option would be to write a program that includes some HTML renderer (such as JavaFX) and manually go through the file, but maybe there is a simpler way.