How to make CSS consistent between the site and emails?

asked 2011-03-07 22:22:52 -0500

Evgeny's avatar

To format email reliably it turns out that style must be inlined, while the site uses static css file.

How to avoid duplication of css for email and the site?

So far two methods seem possible - (1) store some css in the database - "live settings" and print it to HTML head; (2) - have a way to parse out certain css rules from the main style sheet on startup - for the use in the emails.

Do you know of a good css parser that allows extracting rules matching some selector? Thanks.

edit retag flag offensive close merge delete