1

Please note the current development is in dev mode & writing to pub/static. It is using browser sync and the sass snowdog theme for magento2.

I've got my theme running and using the Sass Snowdog theme, had it all running fine like so:

Theme directory:

app/design/frontend/Vender/Theme/

With the snowdog themes.json file looking like so:

{
  "blank": {
    "src": "vendor/snowdog/theme-blank-sass",
    "dest": "pub/static/frontend/Snowdog/blank",
    "locale": ["en_US"],
    "ignore": [".test"]
  },
  "lovelane": {
    "src": "app/design/frontend/Vender/Theme",
    "dest": "pub/static/frontend/Vender/Theme",
    "locale": ["en_GB"],
    "localeOverwrites": true,
    "parent": "blank"
  }
}

And when I do:

gulp styles watch browser-sync

The files are watched inside of:

app/design/frontend/Vender/Theme/web/css

And get written to the pub/static folder. However when i try to add these styles to the page with the following inside of:

app/design/frontend/Vender/Theme/Magento_Theme/layout/default_head_blocks.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <css src="/web/css/mysuperstyles.css"/>
        <css src="//fonts.googleapis.com/css?family=Roboto:100,300,400,700" src_type="url" />
    </head>
</page>

The styles don't get pulled through onto the page. Im stuck, I've run:

bin/magento setup:di:compile

And done the static content deploy but, the files just don't load on to the page.

Any help would be awesome.

  • did you solve it? – Anthony Oct 12 '17 at 10:01
  • I didn't however, i could probably work it out now. Its been a while since i've touched snowdog, so i might come back to it. I'll try and post an answer today. Are you having the same issue? – andy jones Oct 12 '17 at 10:58
  • I have smth similar. On my local machine it works but on the production server - does not. Files exist but i do not see styles.css in the html. – Anthony Oct 12 '17 at 11:16

Your Answer

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

Browse other questions tagged or ask your own question.