Given a web page that has loaded (possibly several) CSS files, and inline styles, through the use of:
<link rel="stylesheet" type="text/css" href="some_file.css" />
<style type="text/css"> /* some css rules */ </style>
<link rel="stylesheet" type="text/css" href="some_other_file.css" />
<style type="text/css"> /* some other css rules */ </style>
<!-- etc -->
How would one go about writing a function (possibly with jQuery) to extract all the net CSS rules in effect?