View profile

No tricks, just...

...it depends
...it depends
Hey-oh! Keeping things short today.
While prepping my dark mode talk for Email Camp, I learned an awesome new way to swap your logo. It’s way more elegant than targeting images with hide/show classes.
If you have images off, we're using the <picture> element. Apparently I can't set alt text using Revue - the things one learns.
If you have images off, we're using the <picture> element. Apparently I can't set alt text using Revue - the things one learns.
That’s it! This works wherever media queries are supported. Unfortunately, that means we’re still left with no logo swapping in Gmail and the Outlooks. Sad face. But happy face that this code is way nicer than what I was doing before! HOORAY!
There are two other fun things you can do with this:
  1. Wrap the whole thing in an href to link to your website
  2. Target the logo using a class on a container and using .foo a [data-ogsc] to add the logo as a background image to show in Outlook.com
Enjoy this new bit of info, and happy coding,
Megan
Did you enjoy this issue? Yes No
...it depends
...it depends @megbosh

A semi-regular newsletter about email marketing, design, and development.

In order to unsubscribe, click here.
If you were forwarded this newsletter and you like it, you can subscribe here.
Created with Revue by Twitter.