Critical CSS file position
-
11-05-2021 - |
Question
Is there a way to include inline styles after the <title>
tag as shown on this image:
If I edit the file default_head_blocks.xml
I can only get this to show after the merged css file which defeats the purpose of using critical-css. One possible way is to add this bit of code into default.xml
but then the inline css is rendered right at the top of <head>
before all the <meta>
tags so I'm not sure if this is bad practice or not
<referenceBlock name="require.js">
<action method="setTemplate">
<argument name="template" xsi:type="string">Magento_Theme::/header/inline-css.phtml</argument>
</action>
</referenceBlock>
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange