documentcloud / documentcloud-pages

Responsively embed DocumentCloud pages.
https://documentcloud.github.io/documentcloud-pages/examples/
MIT License
22 stars 10 forks source link

Jammit not relativizing URLs as expected #28

Open reefdog opened 9 years ago

reefdog commented 9 years ago

I'm genuinely uncertain how Jammit is supposed to be acting right now.

My CSS contains local references like url('../font/fontello.eot?95329667') which, when compiled, are converted to reference my local filesystem structure with a weirdly part-relative / part-absolute syntax, e.g. url(../Users/justin/Projects/documentcloud-pages/src/css/vendor/fontello/font/fontello.eot?1433297684).

I would expect it to either:

  1. Keep the existing path
  2. Restructure the path to maintain relative traversal to the original resource
  3. Replace it with an absolute reference to the original resource
  4. Or something?

I'm genuinely unsure of correct behavior, as this Jammit issue acknowledges the problem and points to public_root as the answer, but I was unable to make public_root work. My guess is that the out-of-Rails use case isn't well tended.

Trying to resolve that led to fa0966512d65543c587baba5516f275567dd64e9 as a prerequisite.

reefdog commented 9 years ago

Partially worked around this by manually datauri'ing assets and not worrying about pre-datauri browsers (IE7).