ClientDependency
ClientDependency copied to clipboard
Commented @import in CSS file results in invalid CSS
Hi @Shazwazza,
Thanks for your work on ClientDependency - we use it in all of our sites and appreciate the work that's gone in to it.
I've seen an issue with ClientDependency v1.9.1 when a CSS file is processed. We have a commented line lower down the CSS file that contains an @import (from a CSS framework unminified file). It looks like the comment is being ignored and the @import part is getting moved to the top by ClientDependency. This causes invalid CSS which results in no CSS being loaded on the website.
The offending line in our CSS is
/* @import must be at top of file, otherwise CSS will not work */
The comment has existed in the CSS file for over 18 months with no problems, but since we upgraded Umbraco to v7.5.4 and Client Dependency to v1.9.1 a few months ago, we have seen the issue, so I'm wondering if something has changed within ClientDependency?
I have removed the commented line on the production website and the issue is resolved.
Thanks and kind regards,
James.
Ah quite interesting, yet another JSMin issue that we'll need to resolved (JSMin issues are never a fun thing to fix). I'll have a look when i find some time.