[ 6 posts ]

Christoph Feddersen

  • Offline
  • Profile
Tags:

Combine and relative path to images in CSS files

Post Posted: Sat Oct 24, 2009 1:29 pm
+0-
While experimenting with the combine option, I noticed that some images were missing.

The way the combo script works, all urls to images within css files need to be absolute (http://), because the file can be fetched from anywhere. The CSS files of the standard distribution does contain relative urls, so it's not usable.

I had a look at the builder tool, but it doesn't seem to be able to generate css files with absolute urls. So how do you generate the css with absolute urls?

Chad Auld

  • Username: chadauld
  • Joined: Mon Sep 14, 2009 2:46 pm
  • Posts: 7
  • Location: Colorado
  • Twitter: chadauld
  • GitHub: cauld
  • Gists: cauld
  • Offline
  • Profile
Tags:

Re: Combine and relative path to images in CSS files

Post Posted: Mon Oct 26, 2009 3:33 pm
+0-
If you are enabling the "combine" option and overriding "comboBase" then you must also set the "base" value on your instance of YAHOO_util_Loader. The "base" setting should point the YUI build directory on your local server for the YUI version you intend to utilize.

Chad Auld

  • Username: chadauld
  • Joined: Mon Sep 14, 2009 2:46 pm
  • Posts: 7
  • Location: Colorado
  • Twitter: chadauld
  • GitHub: cauld
  • Gists: cauld
  • Offline
  • Profile
Tags:

Re: Combine and relative path to images in CSS files

Post Posted: Mon Oct 26, 2009 7:10 pm
+0-
Disregard my last message. After digging a bit deeper I can see the issue. I'll work on a fix for the next version and post up some code for review once I've got something worth testing. Thanks for the report.

Christoph Feddersen

  • Offline
  • Profile

Re: Combine and relative path to images in CSS files

Post Posted: Wed Nov 04, 2009 4:16 am
+0-
Great! If anyone else runs into this issue: I did a search&replace in the CSS files I needed and inserted an absolute url.

Chad Auld

  • Username: chadauld
  • Joined: Mon Sep 14, 2009 2:46 pm
  • Posts: 7
  • Location: Colorado
  • Twitter: chadauld
  • GitHub: cauld
  • Gists: cauld
  • Offline
  • Profile

Re: Combine and relative path to images in CSS files

Post Posted: Wed Nov 04, 2009 9:44 am
+0-
I've checked in some changes to the combo script that I'll be reviewing with the team today. I've added a number of regex statements to handle on the fly conversions of CSS image paths. I've done a good bit of testing and everything seems to be working as expected now. If you'd like to grab the changes and review them on your end as well that would be great.

Christoph Feddersen

  • Offline
  • Profile

Re: Combine and relative path to images in CSS files

Post Posted: Fri Nov 13, 2009 4:32 am
+0-
Looking good! Tested the latest version with my use case. Didn't run into any problems.
  [ 6 posts ]
Display posts from previous:  Sort by  
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