Skip to content

Gmail ignores @media query blocks that contain class names with ":" or "@" #132

@dcpedit

Description

@dcpedit

Google made a change fairly recently that affects at least the web client, and Android/iOS clients. The following example will not bold or color text until font:b and font@b are removed:

<html>
  <head>
    <style>
      @media (max-width: 500px) {
        .font:b,
        .font@b,
        .font-b {
          font-weight: bold;
        }
        .colored {
          color:red;
        }
      }
    </style>
  </head>
  <body>
    <span class="colored font-b">Hello</span> world.
  </body>
</html>

As a result, all the responsive styles get ignore since some of the utility classes contain : and @ in the suffix. I propose removing these classes completely, and only use - in the suffix.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions