General CSS Path Transform for ASP.NET Bundling

In a couple of ASP.NET projects, I have had CSS path transform problems with bundling and minification. CSS files are coming in from external agencies and from different open-source projects and the number of files is so big that it is problematic to go through all of these after updates. I found a path transform solution that works for me in most cases and it is described here.

What Does CssRewriteUrlTransform Do, Exactly?
It seems there is something up with CssRewriteUrlTransform class. From MSDN, we can read the following about it: ‘Rewrites urls to be absolute so assets will still be found after bundling.’ We can find out about it from the Process() method page: Example: bundle.Include(“~/content/some.css”) will transform url(images/1.jpg) => url(/content/images/1.jpg).