| Page 1 of 1 | [ 4 posts ] |
MarcYUI Contributor
|
Hi,
I use a custom comboloader that basically stitches together scripts and gives that back. http://www.mydomain.com/yui/?dir/comp.js&/dir2/comp2.js When certain modules use their own css files, these are loaded also by the comboloader. But when these module css files contain image references, things go wrong because they are interpreted by the browser as http://www.mydomain.com/yui/component_image.png because they are referenced in the css file simply as background:url(component_image.gif) I'm just wondering how to deal with this? Kind regards, Marc |
|
The paths in the CSS files will need to be rewritten, either as absolute URLs or as paths relative to the combo root. For YUI, we do this at build time when our CDN resources are generated.
Daniel Stockman sent a pull request for my Node.js combohandler that can rewrite paths in CSS files on demand, but I haven't integrated it yet because I need to do some architecture work first. It might give you some ideas, though: https://github.com/rgrove/combohandler/pull/3 |
MarcYUI Contributor
|
Am I correct in assuming this will not work with non "sam" based assets?
|
MarcYUI Contributor
|
No, actually, not a problem if you use the combo css url as a basis for inserting your image urls.
|
| Page 1 of 1 | [ 4 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group