Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commented @import in CSS file results in invalid CSS #117

Open
jameswilki opened this issue Apr 11, 2017 · 1 comment
Open

Commented @import in CSS file results in invalid CSS #117

jameswilki opened this issue Apr 11, 2017 · 1 comment

Comments

@jameswilki
Copy link

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.

@Shazwazza
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants