Can't compile rwd skin SCSS in Magento CE 1.9

元气小坏坏 提交于 2019-12-03 12:25:42

问题


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


回答1:


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




回答2:


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

a:not(.button) {



回答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.



来源:https://stackoverflow.com/questions/25626558/cant-compile-rwd-skin-scss-in-magento-ce-1-9

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!