Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Tom Allen 50 posts 71 karma points
    Oct 27, 2011 @ 13:36
    Tom Allen
    0

    ClientDependency and CSS media attribute issues

    I'm incorporating ClientDependency into the front end of my Umbraco site for CSS/JS speed optimization purposes.

    I've installed the latest version of CD, which allows HTML attributes to be rendered. However I am stuck on the syntax of the attribute and can't find any information on it anywhere.

    This works:

    <CD:CssInclude ID="CssInclude3" runat="server" FilePath="Print.css" PathNameAlias="Styles" HtmlAttributesAsString="media:print" />

    This breaks:

    <CD:CssInclude ID="CssInclude3" runat="server" FilePath="Print.css" PathNameAlias="Styles" HtmlAttributesAsString="media:screen, projection" />

    It's clearly to do with the comma and space, which aren't parsed correctly, but I can't find any info on how to escape them correctly.

    Any ideas appreciated!

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies