Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't compile rwd skin SCSS in Magento CE 1.9

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

like image 377
Tom Griffin Avatar asked Sep 02 '14 15:09

Tom Griffin


1 Answers

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

like image 176
Tom Castleman Avatar answered Oct 06 '22 09:10

Tom Castleman