oy
oy copied to clipboard
Advanced CSS rules validation
The react-htmt-email project features a great approach to validating styles based on a map of allowed/supported email clients. I like how Oy has very useful custom propTypes for markup, but as of now only one ShorthandFontRule actually validates style.
Would be ideal to borrow that repo's approach in order to configure a style validator the same way for Oy.
Thoughts?
Thanks for sharing! I'll review this weekend.
This is a great idea. Users shouldn't have to worry about any specific rules—they provide what clients they'd like to support, and we provide the appropriate checks. It's actually something I was thinking about when I built this little scraper: https://github.com/revivek/email-css-support
Thinking about an API, one place to put this config would be in Oy.renderTemplate (side: I'm wary of the growing size of the config). We alternatively could pursue a static config method similar to the react-html-email project (i.e. Oy.configure or Oy.configurePlatforms). I lean towards the first to minimize API changes.