Skip to content

Commit

Permalink
CSS Images fix
Browse files Browse the repository at this point in the history
The CSS base path was not including the cwd base path and failing to find referenced images.
  • Loading branch information
micahblu committed Jul 23, 2014
1 parent 4e6c841 commit 2dea32f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inline-styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = function(html, base, minify) {
el = dom(el);
var href = el.attr('href');
if (el.attr('rel') === 'stylesheet' && isLocal(href)) {
var dir = path.dirname(href);
var dir = base + path.dirname(href);
var file = path.join(base, href);
var style = fs.readFileSync(file);
var inlined = inliner.css(style.toString(), { cssBasePath: dir });
Expand Down

0 comments on commit 2dea32f

Please sign in to comment.