views:

55

answers:

1

Is it possible to set the media attribute on a link tag using the Telerik MVC Extensions StyleSheetRegistrar method?

<%= Html.Telerik().StyleSheetRegistrar()
    .DefaultGroup(group => group
        .Add("telerik.common.css")
        .Add("telerik." + ConfigurationManager.AppSettings["Telerik Theme"].ToLower() + ".min.css"))
%>

I want to add media="screen,handheld" to all the stylesheet links created by the above.

+3  A: 

Nope, this is not currently possible. You can either modify the source code or use vanilla <link /> tags to register the CSS files. You don't seem to be using compression or combination so using <link /> tags seems feasible.

korchev
thanks for the speedy response.is support planned for this in the near future?
Antony Scott
I am not really sure. It is not clear where the media should be specify - at group level or at asset level. If at group level - the implementation is trivial. If at asset level - we have to make sure we handle compression and combination properly as then we output only one <link /> tag.
korchev
i think group level, then you just have one combined stylesheet for each type of media
Antony Scott