Email-builder / grunt-email-builder

Build Emails from HTML / CSS code in grunt
Other
94 stars 14 forks source link

What is linked CSS file path relative to? #41

Closed matt-bailey closed 9 years ago

matt-bailey commented 9 years ago

Hi, I'm having some trouble getting this working with linked CSS files, i.e.:

<link rel="stylesheet" type="text/css" href="../css/email/email.css">

It works if I use an absolute url, e.g. http://my-site.dev/skin/frontend/my-site/default/css/email/email.css (it's a Magento site, hence that long path). However, I would prefer to use a relative path than a hardcoded full domain path.

I've tried a path relative to where the HTML email template is located. I've also tried a path relative to where the CSS file is in relation to the Gruntfile. Neither seem to work. I'm sure it's a simple thing that I'm missing, but any help would be appreciated, thanks.

matt-bailey commented 9 years ago

My bad - the CSS path should be relative to the HTML file. Magento's file structure is so nested it was tricky to figure out how many ../ to put in the path (I had the wrong number of course). Works now :)