-
Notifications
You must be signed in to change notification settings - Fork 9
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
CSS filename gets prepended to url() string #9
Comments
Thanks @zourtney! We wouldn't have caught this since we only bundle our "structure" css rules, leaving the "skin" rules in a theme file external to the main app code. (oocss) There has to be some level of translation unless the bundled file will stay at the baseUrl. Hm, maybe this isn't a bad restriction to have in place until we figure out a universal strategy for this. Seems like we'd have to do a mix of build-time and run-time translations to get it right 100% of the time. Thoughts? -- John P.S. we're also on #cujojs on freenode if you prefer to chat live. |
This might be trickier than I first imagined. My assumption was that cram did an ignorant dump of the CSS contents. Clearly it's smarter than that :-) I was thinking the
Of course, that's an overly simple example. I'm referencing resources with relative pathnames (ack!), so this isn't what we want, ultimately, but it's predictable starting point. Moving to a more OOCSS approach might be the best approach, but likely won't be practical on my current project. Does cram provide a way of ignoring all |
Hey @zourtney, I updated curl's cram/css plugin on the dev branch. Here's how it works:
I just realized that a more flexible approach would be to run the urls through curl's path mapping routine again at run time. This would allow you to redirect the urls to anywhere. Let me know if you need that and I'll get it in asap. Sorry, but this code is minimally tested, atm. :( cram will support a way to exclude certain modules/files, but it's only half implemented. It should be easy to finish, actually. I could get it done relatively quickly. Let me know if you think that's a better option for you. -- John |
I also updated the curl/plugin/style.js file. Just FYI in case you're copying files instead of pulling the whole repo. |
Well, the option to exclude files would be more beneficial in the short term. I'll want to deploy this project with a stitched, master "style.css" anyway. And then cram all Javascript into its own file(s). That said, I did try out the edge version. I'm getting a leading I'm still trying to get my head around this. Am I missing something simple? Or misunderstand the current implementation? My test project is set up something like the following: style.css
run-deploy.js
output.js (partial)
cram'ed via something like
Thanks again for your help, and active development on this project! |
This should be fixed in dev. |
Got another one for you :-) When pulling in styles via the
css!
plugin, I'm seeing the file/module name prepended to CSSurl(...)
contents.For example:
index.html
style.css
crammed, the URL becomes
url(\"style.cssniceBackground.jpg\")
. Full module output:Whereas I'd expect it to still be
url(niceBackground.jpg)
(...right?). I get the same result with and without quoting the URL.The text was updated successfully, but these errors were encountered: