Shopify / slate

Slate is a toolkit for developing Shopify themes. It's designed to assist your workflow and speed up the process of developing, testing, and deploying themes.
https://shopify.github.io/slate
MIT License
1.28k stars 364 forks source link

Sass doesn't compile &-- #997

Closed victorjanin closed 5 years ago

victorjanin commented 5 years ago

Problem

When using & -- I get an error in console Refused to apply style from 'https://cdn.shopify.com/s/files/1/1125/3830/t/22/assets/layout.theme.styleLiquid.scss.css?16127461793031031666' because its MIME type ('text/plain') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

And in the 'layout.theme.styleLiquid.scss.css' file it is written Failed to compile SCSS file

Replication steps

.pfeil{
    &--close {
      right:0;
    }
}

might this be a yarn problem? Any thoughts? Thanks!

dan-gamble commented 5 years ago

I think this comes from Shopify's Sass version being 3.2 where as &-- is only supported in 3.4 and above.

For what it's worth &-- is bad practice so i'd try to avoid it if you can. It makes finding the source code much much harder.

victorjanin commented 5 years ago

@dan-gamble Thx for the reply!

I'm recoding a theme with slate, so I'm using code from previous programmer, did not know this was bad practice, thank you for that!

Removed it from my code anyways as it didn't bring that much value Closing this now

dan-gamble commented 5 years ago

Happy to help @peke314

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.