Copied to clipboard

Flag this post as spam?

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


  • TimMather 67 posts 78 karma points
    Oct 02, 2015 @ 15:08
    TimMather
    0

    Umbraco 7.2.8 Client Dependency Css Trouble

    So I am using Client Dependancy for MVC (1.8), everything fine in debug mode but when I move to production and the minification occurs none of the styles are working within the stylesheets. The stylesheet is produced but it is like it isn't linked? Javascript is working fine, any suggestions?

    I am doing this:

    @{
        Html.RequiresCss("~/css/icons.css");
        Html.RequiresCss("~/css/bootstrap.css");
        Html.RequiresCss("~/css/uniform.css");
        Html.RequiresCss("~/css/magnific.css");
        Html.RequiresCss("~/css/animate.css");
        Html.RequiresCss("~/css/jquery.sidr.dark.css");
        Html.RequiresCss("~/css/cookiecuttr.css");
        Html.RequiresCss("~/css/default.css");
        Html.RequiresCss("~/css/overrides.css");
    }
    
    @Html.RenderCssHere()
    

    and the output (when in production) is:

    /DependencyHandler.axd?s=L2Nzcy9pY29ucy5jc3M7L2Nzcy9ib290c3RyYXAuY3NzOy9jc3MvdW5pZm9ybS5jc3M7L2Nzcy9tYWduaWZpYy5jc3M7L2Nzcy9hbmltYXRlLmNzczsvY3NzL2pxdWVyeS5zaWRyLmRhcmsuY3NzOy9jc3MvY29va2llY3V0dHIuY3NzOy9jc3MvZGVmYXVsdC5jc3M7L2Nzcy9vdmVycmlkZXMuY3NzOw&t=Css&cdv=1

    Which is what you would expect, did wonder whether the fact it doesn't end in .css is having an effect? I pasted the generated stylesheet here but it is huge and seems to contain everything it should. I installed the latest ClientDependency nuget package but still nothing?

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    Oct 02, 2015 @ 15:18
    Dave Woestenborghs
    0

    Maybe try this

    <link rel="stylesheet" href="@Hmtl.RenderCssHere()" />
    

    Dave

  • TimMather 67 posts 78 karma points
    Oct 02, 2015 @ 15:21
    TimMather
    0

    Sorry, it already renders the stylesheet reference correctly, I only posted the link because the forum editor wouldn't allow me to post with the html tag.

    Anyway I fixed the problem. The icon.css had @charset "UTF-8"; at the top of the page and that through it out! All working now.

Please Sign in or register to post replies

Write your reply to:

Draft