I have different css files depending on the browser and device. One bundling approach would be to register each combo "phone.ie", "desktop.ie", "phone.chrome", etc. and have the Render method string.format for the right bundle ("~/content/{0}.{1}", device, browser). This would work, but there's a lot more maintenance involved than should be necessary. Additional css files would mean registering a bunch more bundles.
What would be really cool is if I could register a single bundle:
bundles.Add(new StyleBundle("~/content/css")
.Include("~/content/css/styles.{device}.{browser}.css"));
and render simply
@Styles.Render("~/content/css")
Where {device} and {browser} is a placeholder for a runtime variable. How could I go about doing this? There is the {version} placeholder used for jQuery bundles, but doesn't seem very extendable for custom values.
Would be neat to maybe feed the render a dictionary
@Styles.Render("~/content/css", new { device = runtimeDevice, browser = runtimeBrowser })