Reader small image

You're reading from  Mastering Adobe Commerce Frontend

Product typeBook
Published inMar 2024
PublisherPackt
ISBN-139781837637072
Edition1st Edition
Concepts
Right arrow
Author (1)
Jakub Winkler
Jakub Winkler
author image
Jakub Winkler

Jakub Winkler is the Founder & CEO of Q-Solutions Studio, an expert in Adobe Commerce development since 2015, and an active member of the Magento community. He has a decade of experience in eCommerce theme development and has created solutions to improve developers' work. He trains Magento development teams and has deep insights into what merchants expect from development teams. Jakub has found a way to teach and pass knowledge to ensure developers follow best practices when working with the Adobe Commerce platform.
Read more about Jakub Winkler

Right arrow

Customizing Email CSS

I haven’t shown you a way to customize email styles. This process is very simple and comes down to those three lines of code in the header.html file:

        {{var template_styles|raw}}
        {{css file="css/email.css"}}
[...]
<body>
{{inlinecss file="css/email-inline.css"}}

The first directive inserts custom CSS from the template configuration in the Admin Panel:

Figure 7.22 – Template styles in the email template form

Figure 7.22 – Template styles in the email template form

The second directive simply tells the PHP code that in this place it should insert the content of the web/css/email-inline.css file from the current theme used.

I encourage you to try and see the differences between those LESS files in the blank theme directory:

  • web/css/email.less
  • web/css/email-inline.less

Their content is almost identical. There are two simple reasons...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Mastering Adobe Commerce Frontend
Published in: Mar 2024Publisher: PacktISBN-13: 9781837637072

Author (1)

author image
Jakub Winkler

Jakub Winkler is the Founder & CEO of Q-Solutions Studio, an expert in Adobe Commerce development since 2015, and an active member of the Magento community. He has a decade of experience in eCommerce theme development and has created solutions to improve developers' work. He trains Magento development teams and has deep insights into what merchants expect from development teams. Jakub has found a way to teach and pass knowledge to ensure developers follow best practices when working with the Adobe Commerce platform.
Read more about Jakub Winkler