Live data from Hacker News

Gmail will now support CSS media queries

googleappsdeveloper.blogspot.com

61–70 of 70 posts

Re: Gmail will now support CSS media queries

#61
post #53
post #51

For those who are not familiar in Email's CSS support, Gmail is actually a blocker, not a mover: https://www.campaignmonitor.com/css/

You say that like it is a bad thing. I'm really pleased that email cannot set a style header and has limited ability to have the email deviate greatly in presentation from other email I receive.

However Gmail does support inline CSS.

If you want to show your styles to Gmail users and you have to inline your CSS in every HTML tags you want to alter, which is very ugly and made the email size unneeded large.

Re: Gmail will now support CSS media queries

#62

This is a great thing. One more metric by which to filter out spam. If I am receiving an email from an actual person, it will be plain text, perhaps with 1-2 links or images, and will not contain any CSS.

Indeed. If anything is going to be an "e-mail killer", it's not going to be Slack, et al., but allowing more "freedom of design" for the senders. We'll drown in crap, and people will switch to using anything that has stronger restrictions on content (like most IMs).

Re: Gmail will now support CSS media queries

#63
post #10

Earlier quoted context omitted.

Regarding the example in the Wiki page: Is it possible to use hex colors codes or rgb color codes? The example uses color name.

In fact, you have even more options, not just two: 1) RGB: #rrggbb (rgb hex) / rgb(r,g,b) (rgb int 0-255) / rgba(r,g,b,a) (as before, plus alpha). In addition, rgb/rgba support percentage values instead of 0-255. 2) red (color names) 3) hsl(h,s,l) 4) cmyk(c,m,y,k) For compatibility with anything except Thunderbird (which supports all four formats IIRC), stick with #rrggbb or plaintext names. Webmailers are especially…

I'm not seeing that on the text/enriched spec? You might be thinking of HTML email.

Re: Gmail will now support CSS media queries

#64
post #59
post #54

Earlier quoted context omitted.

Why not block styling on web pages too then? I mean, what makes an email different from a web page, other than that it has been sent to you? Just playing devil's advocate here.

> what makes an email different from a web page, other than that it has been sent to you? I think it's to do with perceived ownership of the environment in which the information is consumed. Your website... feel free to style, brand, make pretty or ugly. You can make the experience consistent within your realm. My inbox... I get to control my workflows, how I consume things, in which order, etc. I choose to make the…

It's your client, but the site's content, in both web and email cases.

You are free to set your client to ignore styling on the content, but the content should be stylable for everyone else that wants it to look good.

Re: Gmail will now support CSS media queries

#66
post #34

Earlier quoted context omitted.

One of the benefits of using a text-based email client, is that it forces emails to be text.

Sadly... no it doesn't. I use emacs for my email, and while I could make it not render html email at all, the vast majority of my correspondence is with people sending rich emails through outlook. So... yeah, html it is.

yeah, it does. There are tricks to make it try to look like rendered html, but they all fall flat IME, and it ends up coming across as text. If you get rid of that expectation, it works fine. I get plenty of html emails every day, but all I see is text.

Re: Gmail will now support CSS media queries

#67
post #61
post #53

Earlier quoted context omitted.

You say that like it is a bad thing. I'm really pleased that email cannot set a style header and has limited ability to have the email deviate greatly in presentation from other email I receive.

However Gmail does support inline CSS. If you want to show your styles to Gmail users and you have to inline your CSS in every HTML tags you want to alter, which is very ugly and made the email size unneeded large.

Most every email client supports inline CSS, and in my experience, inlining your CSS for emails is the safest bet to ensure your styling is consistent across all email clients. What you can't inline ever (on email or web) is CSS media queries. IMHO, I don't think media queries are supported broadly enough to use them extensively, though Gmail supporting them is a step in the right direction.

Re: Gmail will now support CSS media queries

#68
post #34

Earlier quoted context omitted.

Sadly... no it doesn't. I use emacs for my email, and while I could make it not render html email at all, the vast majority of my correspondence is with people sending rich emails through outlook. So... yeah, html it is.

yeah, it does. There are tricks to make it try to look like rendered html, but they all fall flat IME, and it ends up coming across as text. If you get rid of that expectation, it works fine. I get plenty of html emails every day, but all I see is text.

I think we were just talking past each other. I took your statement to mean convincing others to stop sending HTML emails. You meant it more to just focus on the text. (If I am reading correctly.)

In that, yes, I agree. Bonus points for being able to inline respond to messages again. (I hate Outlook's forcing top posting.)

Re: Gmail will now support CSS media queries

#69
post #68

Earlier quoted context omitted.

yeah, it does. There are tricks to make it try to look like rendered html, but they all fall flat IME, and it ends up coming across as text. If you get rid of that expectation, it works fine. I get plenty of html emails every day, but all I see is text.

I think we were just talking past each other. I took your statement to mean convincing others to stop sending HTML emails. You meant it more to just focus on the text. (If I am reading correctly.) In that, yes, I agree. Bonus points for being able to inline respond to messages again. (I hate Outlook's forcing top posting.)

Ah yes. I was confused by your response. That makes more sense. No, I generally don't ask push others to use text-based email, but when asked, I explain the difference with a definite preference for text.

One thing that seems to have helped me (but is very much YMMV), is when I reply, it keeps the html code all messed up. Then when the person I'm discussing with sees that, they'll occasionally ask me why their email is messed up. That gives me an opportunity to explain html vs text, and they usually would rather their email "work everywhere".

Re: Gmail will now support CSS media queries

#70

This is mostly a distraction, but I still wish text/enriched had won instead of HTML email: https://en.wikipedia.org/wiki/Enriched_text If only because it's simpler, so it might have been more fully and consistently supported (and it's not a security nightmare).

I was expecting something significantly different from HTML but this is really just pre-CSS HTML with different tags. At this point, I can't imagine another SGML based language for formatting is necessary. If everyone could just agree on a safe subset of HTML for email then that's all we would need.

Unlike HTML, the the syntax is minimal and trivial to parse (there's no attributes or implicitly-closed tags, and there's only a single character entity (In lacking most of HTML's complexity and features, it lacks its security issues, too. And in being very small, you can reasonably expect the whole spec to be implemented.

But yes, with a very strictly validated, very small HTML subset you could get a similar effect. At that point, though, why use HTML?

Post reply on HN