RadStyleSheetManager and Media Types

3 posts, 1 answers
  1. Mike
    Mike avatar
    76 posts
    Member since:
    Mar 2013

    Posted 22 Jun 2016 Link to this post

    Is there a way to have references to css files and indicate which media type they are for?

    site.css - used for viewing in the browser

    print.css - used if/when a user tries to print the page

    <telerik:RadStyleSheetManager runat="server" id="radStyles" EnableHandlerDetection="True" EnableStyleSheetCombine="True" OutputCompression="AutoDetect">
            <telerik:StyleSheetReference Path="~/site.css"/>
            <telerik:StyleSheetReference Path="~/print.css"/>

    If I did this, print.css overrides.  I understand I can play with orders, but I need a way to work with different media types - if possible.

  2. Answer
    Veselin Tsvetanov
    Veselin Tsvetanov avatar
    878 posts

    Posted 27 Jun 2016 Link to this post

    Hello Mike,

    You cannot assign different stylesheets for different media types using the RadStylesheetManager. You will have to use instead media queries within your CSS files.

    Veselin Tsvetanov
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. Mike
    Mike avatar
    76 posts
    Member since:
    Mar 2013

    Posted 27 Jun 2016 in reply to Veselin Tsvetanov Link to this post

    Ok cool, thanks!
Back to Top