Skip to content

Remove @viewport declaration in viewport styles #1618

@hteumeuleu

Description

@hteumeuleu

In the default styles generated by MJML, we have the following block:

<!--[if !mso]><!-->
  <style type="text/css">
    @media only screen and (max-width:480px) {
      @-ms-viewport {
        width: 320px;
      }
      @viewport {
        width: 320px;
      }
    }
  </style>
  <!--<![endif]-->

This was useful to trigger a mobile viewport width on the default email client in Windows Phone 8. This was never used in any other email client as far as I know. Considering Windows Phone 8 is dead, it probably should be a good idea to remove this. Or maybe if some people are still finding this useful, have this only generated when using a special "legacy" option to generate HTML?

Here's an article (in french) about Windows Phone 8 and @viewport declaration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions