Skip to content

Overwriting an existing style #296

@irene-chi19

Description

@irene-chi19

Hello everyone,

Right now if I pass on in head's style tag

<head>
  <style>
      p {
        font-size: 50px;
      }
  </style>
</head>

and my <p> in email already has inline styling like font-size: 15px for example, then the incoming style (50px) is ignored, only with adding !important, the existing style will be overwritten with font-size: 50px !important;

Is there a way to do this without writing !important for every style? I have taken a look into the Premailer capabilities and didn't find anything that would help me solve this.
https://www.rubydoc.info/gems/premailer/Premailer:initialize

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions