10

I am attempting to create a Magento skin based off of the rwd skin provided in CE 1.9 / EE 1.14. However when I attempt to compile the SCSS (on a clean install, after deleting the files in /skin/frontend/rwd/default/css), I get the following error:

$ compass compile scss
    write css/madisonisland-ie8.css
    write css/madisonisland.css
    write css/scaffold-forms.css
    error scss/styles-ie8.scss (Line 541 of scss/core/_common.scss: Invalid CSS after "a:not(": expected ")", was "".button")")
Sass::SyntaxError on line ["541"] of /var/www/development/magento-mirror/skin/frontend/rwd/default/scss/core/_common.scss: Invalid CSS after "a:not(": expected ")", was "".button")"
Run with --trace to see the full backtrace

Line 541 in scss/core/_common.scss is:

a:not(".button") {

And if I remove the surrounding quotes from .button - it compiles successfully. However, as this is a fresh install of Magento, should I really need to be editing files in order to get them to compile? Could there be a config setting in compass I have missed etc?

Thanks

Tom Griffin
  • 435
  • 4
  • 9
  • The problem is in code *you've* written or code written by someone else? – cimmanon Sep 02 '14 at 15:13
  • This is unmodified core code from the Magento project, so yes - written by someone else. But I would assume a fresh install would compile. I can't find anything else about it online so I'm guessing it is config related? – Tom Griffin Sep 02 '14 at 15:15
  • You would like to think that a fresh install would compile. Sadly, no. The line containing the problem is not valid SCSS *or* CSS. This issue needs to be taken to the maintainers of the code. – cimmanon Sep 02 '14 at 15:17
  • The offending line of code: https://github.com/OpenMage/magento-mirror/blob/magento-1.9/skin/frontend/rwd/default/scss/core/_common.scss#L541 - thanks for your help @cimmanon – Tom Griffin Sep 02 '14 at 15:24
  • I had the same issue above , its weird to have it in core files – tawfekov Sep 04 '14 at 09:21
  • Just unpackaged a fresh tar.gz from magento's server. Issue remains. Edited _common.scss to remove quotes, then it compiled perfectly. – Joshua34 Sep 18 '14 at 17:16
  • I ran into this problem after updating the Sass gem. Someone at Magento is using an old version. – DSG Dec 23 '14 at 16:29

3 Answers3

6

I too experienced this issue while doing exactly the same as Tom Griffin - creating a new custompackage/customtheme with rwd/default as the parent.

Copying core/_common.scss into my customtheme folder and removing the quotes as per Tom's initial message fixes the issue and allows compass to compile correctly.

It's quite poor that Magento is shipping with invalid SCSS files which don't compile. Certainly hasn't helped me when learning SASS and Compass for the first time!

As Tom postulated perhaps it's a SASS/Compass version or setting which the Magento theme developers have. I am using SASS 3.4.1 and Compass 1.0.0.

Thanks

Tom

6

Open scss/core/_common.scss and edit line 541 only remove quotes from ".button"

a:not(.button) {
Amer
  • 61
  • 3
3

This is a compatibility issue with compass. When the Magento 1.9 rwd theme was shipped, the latest version of compass was 0.12.6 which compiled correctly. I have at least tested with 1.12.3 and had no problems compiling. I suspect this will be fixed in the next release since the developers will have been compiling on a later version of compass as they came out. Removing the quotes will achieve your desired result and compiles correctly under the 1.0.0 & 1.0.1 versions at least. This really is more of a compass compatibility issue than a Magento core bug but I am sure it will be taken care of soon.