nzakas / cssembed

A tool for embedding data URIs in CSS files.
http://www.nczonline.net/
389 stars 30 forks source link

CSS file output untouched #2

Closed Ceriak closed 14 years ago

Ceriak commented 14 years ago

java -jar cssembed-0.1.2.jar screen.css -o screen.emb.css outputs the file untouched. The stylesheet uses relative paths (../images/someimage.png), I’m on an Ubuntu 8.10.

nzakas commented 14 years ago

Can you try running with the -v flag? If you can include that output, it will probably give a clue as to what the problem is.

Ceriak commented 14 years ago

Ah. You do not handle quotes inside url(). Both single and double quotes are allowed.

[INFO] Using charset UTF-8
[INFO] Using '/home/ceriak/Asztal/css/' as root for relative file paths.
[INFO] Output file is '/home/ceriak/Asztal/screen.emb.css'
[INFO] Found URL '../images/search.png' at line 56, col 17.
[INFO] Applying root to URL, URL is now '/home/ceriak/Asztal/css/../images/search.png'.
[INFO] Opening file '/home/ceriak/Asztal/css/../images/search.png' to generate data URI.
[INFO] No MIME type provided, defaulting to 'image/png'.
[INFO] Generated data URI for '/home/ceriak/Asztal/css/../images/search.png'.
[INFO] Found URL ''../images/current-page.png'' at line 192, col 23.
[INFO] Applying root to URL, URL is now '/home/ceriak/Asztal/css/'../images/current-page.png''.
[INFO] URL ''../images/current-page.png'' is not an image, skipping.
[INFO] Found URL '"../images/tag.png"' at line 236, col 17.
[INFO] Applying root to URL, URL is now '/home/ceriak/Asztal/css/"../images/tag.png"'.
[INFO] URL '"../images/tag.png"' is not an image, skipping.
[INFO] Found URL '"../images/info.png"' at line 287, col 17.
[INFO] Applying root to URL, URL is now '/home/ceriak/Asztal/css/"../images/info.png"'.
[INFO] URL '"../images/info.png"' is not an image, skipping.
[INFO] Found URL '"../images/bell.png"' at line 377, col 17.
[INFO] Applying root to URL, URL is now '/home/ceriak/Asztal/css/"../images/bell.png"'.
[INFO] URL '"../images/bell.png"' is not an image, skipping.
nzakas commented 14 years ago

Ah, nice catch. That's definitely a bug. I'll get to work on that.

nzakas commented 14 years ago

Fixed in version 0.2.5. See Downloads section for the fix.

Ceriak commented 14 years ago

Nice, thank you.