SnowdogApps / magento2-theme-blank-sass

SASS based version of Magento 2 Blank theme
MIT License
383 stars 150 forks source link

Magento 2.3 - styles-m.css and styles-l.css not generating #210

Closed NBlanchette closed 5 years ago

NBlanchette commented 5 years ago

As stated in the title, I'm running into an odd issue relating to the generation of the styles-m and styles-l css files.

On local - while running in developer mode - they are generated on page load. No problem there.

However on our EC2 staging version - while running developer mode - Magento 2 does not generate those 2 files.

Any ideas?

Igloczek commented 5 years ago

How do you compile those files? Magento is not handling SASS compilation out of the box, you can for example use Frontools to do it.

NBlanchette commented 5 years ago

I'm using Frontools, which works flawlessly on my local environment. Also using Frontools on staging.

Januszpl commented 5 years ago

But why you want to generate those files? By default in sass-blank you will have only styles.css file. Please give us more details.

NBlanchette commented 5 years ago

The issue is that on my local environment - the styles-l.css and styles-m.css contain styles from extensions (at least some extensions). Since they generate when loading the page in development mode on local - there is no issue and everything displays properly.

However, in development mode on staging - these files do not generate and are not called in the DOM on page load.

This issue only occurs with this theme - not with Blank or Luma.

Igloczek commented 5 years ago

This theme will never output styles-l.css and styles-m.css because it's merged to one styles.css, so please check if you are using this theme.

https://github.com/SnowdogApps/magento2-theme-blank-sass/blob/master/Magento_Theme/layout/default_head_blocks.xml#L4

SASS compilation is not related to Magento, so it doesn't matter if you have the store in developer or production mode, it just will not automagically compile SASS to CSS.

I'm closing this issue, because is not related to the codebase. If you need help with setting up your Magento instance, please provide a detailed description of your environment and steps to reproduce your issue, as a new Stackoverflow question