Home > OS >  why is default_head_blocks.xml not removing the css files?
why is default_head_blocks.xml not removing the css files?

Time:09-30

I have put 2 remove tags inside default_head_blocks.xml:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <remove src="css/print.css"/>
        <remove src="css/styles-m.css"/>
    </head>
</page>

The file is under app/design/frontend/<theme>/Magento_Theme/layout/

But the css files are not being removed. Should I put the file in a different directory?

CodePudding user response:

Directory is correct. can you please try to flush cache and check again.

  • Related