CSS files contain server-side code render blocks

2 posts, 0 answers
  1. Jimmie
    Jimmie avatar
    20 posts
    Member since:
    Nov 2008

    Posted 07 Mar Link to this post

    I have created a custom theme with the Theme Builder but I have notice that many, if not all, of the URL references in the css files contain server-side code blocks. Since I am adding links to these files directly the server side code does not get executed.

     

    Example from the SearchBox css file:

    .RadSearchBox_BP_FormDefault .rsbLoadingIcon {   

        background-image: url('<%=WebResource("Telerik.Web.UI.Skins.BP_FormDefault.Common.loading_small.gif")%>'); 

    }

    The example linked in several of the existing threads does not provide any information.

    http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/appearance-and-styling/modifying-existing-skins#creating-a-custom-skin-basic-steps

     

     

     

  2. Magdalena
    Admin
    Magdalena avatar
    465 posts

    Posted 09 Mar Link to this post

    Hello Jimmie,

    Images in our skins are added as embedded web resources. If you would like to keep this approach, you can follow this answer.

    The other option is to reply all those styles by regex, and refer images by their relative paths. You can make it by Find/Replace command in Visual Studio for example by the following regex:
    Find: <%=WebResource\("Telerik.Web.UI.Skins.(.*)\.(.*)\.(.*)\.(.*)"\)%>
    Replace: images/$3.$4


    Regards,
    Magdalena
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top