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.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Evgeny's avatar
13.2k
Evgeny
asked 14 years ago

Comments

see more comments