• goodweather

    (@goodweather)


    Hello

    I have a problem with email templates on mobile Gmail app.
    Font size is getting really big and not fitting the line.
    This is about especially h1 string in header.

    I tried to specify font size in css and use !important but this does not help.
    Font should be 28px but Gmail “your message has been modified to fit the screen” is making it 45px
    similar issue is described here

    This is the case withe every woocommerce instance I was working with.

    I know its not the Gmail app support but I would like to know how to make woocommerce email templates mobile friendly.

    • This topic was modified 10 months ago by goodweather.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello goodweather

    Thank you for contacting Woo support.

    Could you share a few screenshots of your phone?
    I want to see how it appears.

    Also, may I ask which phone are you using?
    I will try to simulate the same screen settings and check how the emails are appearing.

    Looking forward to your response. ??

    Best regards.

    Thread Starter goodweather

    (@goodweather)

    Hello Zubair,

    thank you for your response.
    I am using iphone 13, but I was able to replicate this also using browser dev tools (chrome) on my laptop – you just need to simply login to gmail and then use developer tools with (i guess) any mobile Dimensions setting. Gmail will switch to mobile version.

    Here are 2 examples of this behaviour:
    Example 1:
    Default message view in gmail mobile app: link
    Revert auto-sizing view in gmail mobile app: link
    Example 2:
    Default message view in gmail mobile app: link
    Revert auto-sizing view in gmail mobile app: link

    By “revert auto-sizing” I mean first option from menu which is placed next to “reply” arrow in message view.

    I also need to mention that second view is desired when auto-size feature is off. Gmail sometimes call it “original message” (when used above developer tools on desktop view).

    Any insight will be helpful here.

    Thanks

    • This reply was modified 10 months ago by goodweather.
    Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello goodweather,

    Thank you for your reply.

    If you wish to change the default font size of the email header then you will need to add this PHP snippet to your site.

    add_action('woocommerce_email_header', 'add_css_to_email');
    
    function add_css_to_email() {
    echo '
    <style type="text/css">
    #header_wrapper h1 {font-size: 12px !important;}
    </style>
    ';
    }

    You can change the value 12px in font-size: 12px as per your needs.
    I suggest using the Code Snippets plugin to add this PHP snippet to your site.

    If you are not comfortable with code, then I will recommend consulting a web developer.
    Please make sure to create a full backup of your website before making any changes.

    Here are a few screenshot for your reference:

    PHP snippet added via Code Snippets plugin
    Heading is now of 12px

    Please don’t hesitate to contact us again if you have more questions or concerns.
    We are here to help ??

    Best regards.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Font Size on mobile Gmail app’ is closed to new replies.