jonkemp / inline-css

Inline css into an html file.
MIT License
429 stars 85 forks source link

Possible to add styles from file #81

Closed magnuspaaske closed 5 years ago

magnuspaaske commented 5 years ago

I'm using this script to add inline styles to emails. Right now I render the email with a template that includes the same CSS that's used on the front page. Right now the script will fetch the CSS from the CDN when running on production, but I was thinking if there's a way to simply inject the CSS from the file system?

It's possible I may have overlooked this in the documentation – if not, I was thinking if it was something we should add? :)

jonkemp commented 5 years ago

Yeah I think you just need to update the path to the stylesheet in your html.

magnuspaaske commented 5 years ago

I figured out the solution – the file that gets processed simply doesn't have any styles in its head and I use the extraCss feature with my full CSS file.