-
Notifications
You must be signed in to change notification settings - Fork 279
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
CSSRewriter should support rewriting @import #446
Comments
Someone should confirm whether I'm right or wrong on these, and let's close or fix. @Pomax I can't remix your thing above, so I'm not sure what it is. |
yeah this project no longer seems to exist. Older Thimble maybe? |
@humphd I tried importing a css file using |
@aayushsanghavi sure, if you want to give it a try. The code in question is here: https://github.com/mozilla/brackets/blob/master/src/filesystem/impls/filer/lib/CSSRewriter.js#L20-L89. That should find and rewrite all relative file paths in a Further, we need to deal with the special case of there being no |
Yes I tried that too, the |
@humphd I started work on this issue and I've added functionality of using |
Sorry, that this issue has been kept waiting for quite some time. I went out of town for a couple of weeks. I just got back 2 days ago so I'll be working on this again. @humphd regarding my previous comment, what do you think is the best way to go ahead with the css imports? What I had suggested earlier looks quite complicated. |
You're going to need to do one of two things. Either:
You don't need to do anything other than that, since the existing code will handle everything else: you just need to find all these URLs. @Pomax is the best regex'er I know, so you might get his advice here. |
Thanks @humphd. I'll get onto it then. I'll let you know if I have doubts or if I'm stuck somewhere. |
We support some, but not all the possible ways of doing URL imports in CSS (see https://developer.mozilla.org/en/docs/Web/CSS/@import):
The ones that don't use
url()
aren't going to work with our parsing, see https://github.com/humphd/brackets/blob/bramble/src/filesystem/impls/filer/lib/CSSRewriter.js#L19-L72.@Pomax, if you get bored, this would be something you could help with.
The text was updated successfully, but these errors were encountered: