SnowdogApps / magento2-theme-blank-sass

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

You may only @extend selectors within the same directive. #165

Closed benoitrenaud closed 6 years ago

benoitrenaud commented 6 years ago

Hi, when I try to compile the scss, I get this error:

/vendor/magento-ui/_utilities.scss (Line 66: You may not @extend an outer selector from within @media. You may only @extend selectors within the same directive. From "@extend .abs-add-clearfix-desktop" on line 254 of /Magento_Sales/styles/_module.scss.

On my side, I build it with another frontools that uses gulp-ruby-sass, do you have any idea why it does not work?

Thanks

Januszpl commented 6 years ago

Can you write more about your "frontools" ? Can you change to gulp-sass ? ps. There were/are some discussion on libsass / ruby sass https://github.com/sass/ ... related to @extend within media queries so there you probably will find the answer earlier. Unless someone here can give specific answer

Igloczek commented 6 years ago

It looks to be related to two things:

  1. LESS ignore extends that cannot be fulfilled, without throwing any errors, so "it works" in the core
  2. There are differences in implementation between older Ruby based SASS compiler and libasss

I'll take a look on this extends, to check if it's really an issue or just compiler bug.

For now, I'll recommend you to switch to libsass based solution, b/c there is really no point to stay on Ruby based compiler.

Igloczek commented 6 years ago

Check this one https://github.com/SnowdogApps/magento2-theme-blank-sass/issues/87

Igloczek commented 6 years ago

Fixed in 1.0.5

Changes are reflected in https://github.com/magento/magento2/pull/14395