0

I have created a custom Magento 2 theme called 'gvtheme'. The folder layout for the css is: frontend->Magento->gvtheme->web->css->source->style.css

In style.css I have put body: background-color: red; just to test if it is working. When I inspect the body tag in chrome it is not showing up, not even as an overridden style.

In Content/Design/Configuration in the Magento 2 backend it's showing that the 'Default Store View' and the other two views have 'gvtheme' as their theme. It was previously showing as 'Luma'. On the frontend of the site it is no longer showing the 'Luma' logo and style. I have flushed all the caches including 'Flush Javascript/CSS Cache'. Does anyone have any ideas why this might not be working? Any help would be greatly appreciated!

2
  • You might try asking this at magento.stackexhange.com. Commented Sep 23, 2016 at 19:40
  • Thanks jmargolistv, I'll do that! Commented Sep 26, 2016 at 7:59

1 Answer 1

1

Turns out I needed to add 'custom-theme'->'Magento_Theme'->'layout'->'default_head_blocks.xml'. In that file I needed to add:

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

Sign up to request clarification or add additional context in comments.

1 Comment

If you are still having problems check this: magento.stackexchange.com/a/322495/91580

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.