I am new with Magento.

By following instruction found in here: http://devdocs.magento.com/guides/v2.2/frontend-dev-guide/css-topics/css-themes.html

For me no success to add a css file.

This is what I have done:


<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
  <module name="MYVendor_mytheme" setup_version="1.0.0">
      <module name="Magento_Theme"/>


  __DIR__ );


<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <css src="css/styles-l.css" media="screen and (min-width: 768px)"/>


body {
  background-color: blue;

I also have run:

php bin/magento deploy:mode:set developer
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento indexer:reindex
php bin/magento cache:flush

But no luck.

Can anybody help me please! Thank!

1 Answer 1

  1. You need active your theme in dashboard(content -> Design -> Configuration).
  2. If you active your theme, refresh the site cache in dashboard(System -> Cache Management), and Ctrl+F5 to refresh your browser cache.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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