vanng822 / go-premailer

Inline styling for html mail in golang
MIT License
139 stars 19 forks source link

Import css files #1

Closed vanbroup closed 5 years ago

vanbroup commented 8 years ago

It would be useful if the package would automatically import local css files. This would really help to keep your source html template clean and to reuse the same style in multiple mail templates.

vanng822 commented 8 years ago

Hi @vanbroup

Thanks for the suggestion and sorry for the delay, I got stressed for sometimes and try not to do any unnecessary coding beside work.

I didn't think about local when I coded the package. The use case we had was that application rendered template which also imported css and everything. I just assumed that most people do that way.

However remote and local would be nice to support. If you're interested please help out?

/VN

vanng822 commented 5 years ago

One simple example that I did in am-lich.com project

  <head>
    <style>
    {{ template "css/common.css" }}
    {{ template "css/event.css" }}
    </style>
  </head>
adueck commented 5 years ago

@vanbroup Yes I @vanng822 's suggestion works great with html/template I found. 👍 I would suggest closing this issue.

vanng822 commented 5 years ago

Seems that @vanbroup is not active. I think that we should use the option available and keep the package simple. I close this for now