I want to create an upgrade-safe child theme mypackage/mytheme
of the default rwd/default
theme.
Magento's RWD dev guide says:
To customize styles for an existing Magento theme, you should edit existing Sass partials.
This sounds as if it was best practice to copy the existing Sass partials to one's own theme to override them and edit them there. The problem is that with each Magento update, one would again need to compare the files and merge the changes manually. I would consider it best practice to always define new Sass partials similarly named as the default ones and make all customisations there. For instance, in order to customise the header, I would do the following:
- Create a new file
mypackage/mytheme/scss/layout/_custom_header.scss
with my modifications to the header CSS. Edit the file
mypackage/mytheme/scss/_core.scss
and add the following line at the end:@import "layout/custom_header";
This would make an upgrade easy as it should normally not be necessary to compare the changed rwd/default
Sass partials with the custom ones. So why does Magento / Classy Llama suggests copying the files? Do I overlook some disadvantages of the describes method?
I have read the text directly behind the cited sentence where Magento suggests a similar method. Anyway, they say you should use it "if you are building a highly custom theme". I think it is good to use it for any theme. I do not see any disadvantage of this method