oy icon indicating copy to clipboard operation
oy copied to clipboard

Advanced CSS rules validation

Open Rendez opened this issue 8 years ago • 2 comments

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?

Rendez avatar May 08 '17 15:05 Rendez

Thanks for sharing! I'll review this weekend.

revivek avatar May 25 '17 11:05 revivek

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.

revivek avatar May 29 '17 22:05 revivek