jonkemp / inline-css

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

Support for @font-face #42

Open mylescc opened 8 years ago

mylescc commented 8 years ago

At the moment when I run inline-css it seems to remove all @font-face queries from my html file. Is there some way that, like media queries, these can be ignored?

Thanks!

elliottregan commented 8 years ago

@font-face won't work in nearly every email client, so I don't see the purpose if keeping it in: https://www.campaignmonitor.com/blog/email-marketing/2010/03/does-font-face-work-in-email/

Edit: See my newer comment below: https://github.com/jonkemp/inline-css/issues/42#issuecomment-297469162

mylescc commented 8 years ago

fair enough! I'm guessing support for font-face isn't going to improve any time soon either.

rafibomb commented 8 years ago

What if you're not using this for emails? Still would be good to preserve.

elliottregan commented 8 years ago

Then I'd say it should be handled in the same way as outlined in this issue: https://github.com/jonkemp/inline-css/issues/31

shrpne commented 7 years ago

@elliottregan your link to font-face support article is outdated Here is actual support list (which is much more bigger): https://www.campaignmonitor.com/resources/guides/web-fonts-in-email/

elliottregan commented 7 years ago

@shrpne Great! I've definitely changed my perspective since then. I don't think that this package should be the arbiter of what is valid CSS. it should just inline all CSS as best it can.

jonkemp commented 6 years ago

Juice seems to support this. You can try that. The reason I made this in the first place is that Juice was no longer being maintained. It is now. I am not really interested in developing new features at this time.

https://github.com/Automattic/juice

overbyte commented 4 years ago

note you can add another