Skip to content

Email css not processed

At header template is:

    <style type="text/css">
        {{var template_styles|raw}}
        {{css file="css/email.css"}}
    </style>

At email html is content of file (css/email.css) :

<style type=3D"text/cs=
s">=0A        =0A=0A        =0A=0A=0A=0A=0A=0A@import 'source/lib/_lib.l=
ess'; // Global lib=0A@import 'source/lib/variables/_email.less'; // Glo=
bal email variables=0A@import 'source/_theme.less'; // Global variables=20=
override=0A@import 'source/_variables.less'; // Local theme variables=0A=
@import 'source/_email-variables.less'; // Theme variables for emails=0A=
=0A=0A=0A@import (reference) 'source/_email-base.less'; // Contains prim=
ary email styles=0A@import (reference) 'source/_email-extend.less'; // C=
ontains theme-specific adjustments to email styles=0A=0A=0A=0A=0A@import=
 (reference) '../Magento_Bundle/css/source/_email.less';=0A@import (refe=
rence) '../Magento_Rma/css/source/_email.less';=0A@import (reference) '.=
=2E/Magento_Customer/css/source/_email.less';=0A@import (reference) '../Ma=
gento_Sales/css/source/_email.less';=0A=0A=0A=0A=0A@import 'source/lib/_=
responsive.less';=0A=0A@media-target: 'all';=0A=0A=0A=0A=0A.email-non-in=
line();=0A=0A    </style>

On another Magento2 is ok:

style type=3D"text/css">=0A    =20=
   =0A=0A        @import url("http://domain.test/static/version=
1648309504/frontend/VENDOR/NAME/en_GB/css/email-fonts.css");=
=0Ahtml {=0A  font-size: 62.5%;=0A  -webkit-text-size-adjust: 100%;=0A =20=
-ms-text-size-adjust: 100%;=0A  font-size-adjust: 100%;=0A}=0Abody {=0A=20=
 color: #333333;=0A  font-family: 'Open Sans', 'Helvetica Neue', Helveti=
ca, Arial, sans-serif;=0A  font-style: normal;=0A  font-weight: 400;=0A=20=
 line-height: 1.42857143;=0A  font-size: 14px;=0A}=0Ap {=0A  margin-top:=
 0;=0A  margin-bottom: 10px;=0A}=0Aabbr[title] {=0A  border-bottom: 1px=20=
...

Why Magento don’t process @import 'source...' to CSS?
How it change?