CSS in email: now *that* is annoying
Sep. 2nd, 2013 11:43 am![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
I just went to send a nicely-styled email through Querki, and was distressed to find that it *completely* failed. I had figured that email support wouldn't be complete CSS, but absolutely nothing stylistic happened.
A bit of research, and what do I find? It turns out that many mail readers (including, notably, Gmail) simply do not support modern CSS in the slightest. You can't do anything with real stylesheets -- you have to go back to 1990's styling, with explicit inline styles everywhere.
Of course, Querki was built to modern spec -- it *thinks* in terms of stylesheets, and exposes and uses styles that way. There is, quite deliberately, no support for old-fashioned inline styles, since they are deprecated by most good style guides these days.
*Sigh*. Pain in the tuchus. I've added style support in email to the to-do list, but folks should note that it'll be a fair while before it happens -- it's going to be a lot of work to make it work even minimally, and email is very much a "because we have to" feature. For now, Querki-sent email will necessarily be fairly plain...
A bit of research, and what do I find? It turns out that many mail readers (including, notably, Gmail) simply do not support modern CSS in the slightest. You can't do anything with real stylesheets -- you have to go back to 1990's styling, with explicit inline styles everywhere.
Of course, Querki was built to modern spec -- it *thinks* in terms of stylesheets, and exposes and uses styles that way. There is, quite deliberately, no support for old-fashioned inline styles, since they are deprecated by most good style guides these days.
*Sigh*. Pain in the tuchus. I've added style support in email to the to-do list, but folks should note that it'll be a fair while before it happens -- it's going to be a lot of work to make it work even minimally, and email is very much a "because we have to" feature. For now, Querki-sent email will necessarily be fairly plain...
(no subject)
Date: 2013-09-02 07:34 pm (UTC)I sorta wonder how you could support non-inline CSS in Gmail without security holes. iframes, I guess?
(no subject)
Date: 2013-09-02 07:47 pm (UTC)(no subject)
Date: 2013-09-03 09:41 pm (UTC)(no subject)
Date: 2013-09-03 10:08 pm (UTC)(no subject)
Date: 2013-09-03 11:07 pm (UTC)(no subject)
Date: 2013-09-17 05:36 pm (UTC)[joking] You could always have the system generate a PDF and send it as an attachment. Email has no interactivity beyond html links, and a PDF is just as good. [/joking]
(no subject)
Date: 2013-09-17 05:53 pm (UTC)I expect that we'll get email formatting eventually, and I've planned out how it's likely to happen. But it requires me to write a proper CSS parser first (to transform CSS into style tags) -- probably useful in the long run for various reasons, but enough work that it'll be a while yet...
(no subject)
Date: 2013-09-17 06:00 pm (UTC)In retrospect, I should have known that would happen.