This is my default_head_blocks.xml file code

<css src="css/source/_style-l.css" />   
    <css src="css/source/styles-m.css" />
    <css src="css/source/styles-l.css" media="screen and (min-width: 768px)"/>
    <css src="css/source/print.css" media="print" />

Is an application set to developer mode and all the CSS file incorrect location?

  • Are you inheriting from Blank or Luma? – Fayyaz Khattak Aug 9 '16 at 14:02

Use This: (Change the css path as required)

<action method="addCss" ifconfig="porto_settings/general/rtl" condition="0"><stylesheet>css/local.css</stylesheet></action>

  • kindly check your answer may be u have given answer for M1 not M2 check it once – NIPPU May 28 '18 at 5:21

First you have to configure compilation of style in admin path given below

Store -> Configuration -> Advanced -> Developer -> Front-end development workflow

change to

Client side less compilation

Then edit your theme styles module wise and other web/css/source (common style)


You need to refer below link.


also you need to run command for deploy, you can use anyone command

php bin/magento setup:static-content:deploy
php bin/magento dev:source-theme:deploy

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.