SparkPost / heml

HEML is an open source markup language for building responsive email.
https://heml.io
MIT License
4.33k stars 157 forks source link

Preprocess css #50

Open avigoldman opened 6 years ago

avigoldman commented 6 years ago

This PR moves the CSS processing to the preRender function. This will allow for a couple of different improvements in the near future. It will make optimizations easier and will let us improve the scoping (see #20) and make the selectors safer across all clients.

The main change for the usage (undocumented right now) you'll see if this takes away the ability to use the Style element in the render function and replaces it with a css function that passes a parameter Style that lets you add CSS in.