I have the same question as this guy: "Compile" CSS into HTML as inline styles
Except that I use asp.net mvc razor or to be more correct RazorEngine: https://github.com/Antaris/RazorEngine
I compile .cshtml files into html files. While I do this or after this process is done I want that all .css files and their id`s, tags, classes and their properties/values are rendered as inline styles directly into the html tag as style attribute.
I need to use style attributes because the result html is a template to be shown in email clients like gmail/outlook/mobile etc...
How would you start with the process of converting the css stylesheet definitions into the appropriate style attributes?