1

enter image description here

I created the default_head_blocks.xml file in app/design/frontend/Magento_Theme/luma/layout and the local-m.css file in app/design/frontend/web/css/ and the code for the xml is: enter image description here

ben
  • 13
  • 2

1 Answers1

2
  1. Set your Magento application to the developer mode for this testing.
  2. Add the following folders to your custom theme
    • app / design / frontend / [vendor] / [theme] / Magento_Theme / layout
    • app / design / frontend / [vendor] / [theme] / web / css
  3. Create the following files:
    • app / design / frontend / [vendor] / [theme] / Magento_Theme / layout / default_head_blocks.xml
    • app / design / frontend / [vendor] / [theme] / web / css / local-m.css
  4. place this code within default_head_blocks.xml
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../vendor/magento/framework/Module/etc/module.xsd">
  <head>
    <css src="css/local-m.css" />
    <css src="css/local-l.css" media="screen and (min-width: 768px)"/>
  </head>
</page>
  1. After that please run the below command:
php bin/magento s:up
php bin/magento s:static-content:deploy -f 
php bin/magento c:f
Grazitti Dev
  • 520
  • 1
  • 11