Is there a tool available that can efficiently convert class-based styles to inline styles? I am designing an email and find it much easier and quicker to work with classes, but the final output requires inline styles. It seems like there should be software that specializes in this task, but my search has been unsuccessful.
<table class="g">
<tr>
<td>
<p>
content should be bright green
</p>
<span>
content should be red and bold
</span>
</td>
</tr>
</table>
<style>
table.g p{
color:#3f0;
}
table.g span{
color:#f00;
font-weight:bold;
}
</style>
Is there an automated solution for converting it to
<table>
<tr>
<td>
<p style="color:#3f0;">
content should be bright green
</p>
<span style="color:#f00;font-weight:bold;">
content should be red and bold
</span>
</td>
</tr>
</table>
that leverages an understanding of how CSS rules function and can execute the conversion automatically?
*tagged with javascript and jquery in case there is a method to accomplish this using those technologies.