Mautic Community Forums

Add class to data-slot for a better email styling #3459

Initially reported on https://github.com/mautic/mautic/issues/3459

Description:
Google for instance, do not take account of data-slot. So the style given to it is not displayed in Gmail.
It would be great that fo each data-slot type, it adds to the <div> the class with the same name of the data-slot, then in the style of the theme, you can add the style to the data-slot + the class with the same name.

Today
Here is a button for instance.

<div data-slot="button" data-param-background-color="" data-param-float="1" data-param-button-size="1" style="position: relative; left: 0px; top: 0px;" data-param-href="#" data-param-link-text="Le programme complet" data-param-color="#ffffff " align="center">
    <a href="#" target="_blank" style="font-size: 16px; color: rgb(255, 255, 255); text-decoration: none; border-radius: 3px; padding: 12px 18px; background-color: rgb(94, 10, 79); display: inline-block;">text</a>
    <div style="clear:both"></div>
</div>

Improvement
Should add class=“data_slot_button” to the div to apply same style.