How to make CSS consistent between the site and emails?

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.

Evgeny's avatar
13.2k
Evgeny
asked 2011-03-07 22:22:52 -0600
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments