I do disagree with the solution of Mr Storm.
ref: http://www.magentocommerce.com/knowledge-base/entry/magentos-theme-hierarchy
Those documents recommend You avoid to use the package default (as the base package too)
You have to creating Your own package 'mytheme' and to define a theme 'default'
ref: http://info.magento.com/rs/magentocommerce/images/MagentoDesignGuide.pdf
"Please ignore legacy Magento instructions and tutorials that instruct
you to create your custom theme inside of the default design package,
or to edit files in the default/default directory directly.
Rather,
the method that affords the best upgrade path for your theme and the
most protection from accidental changes is to create a new designpackage
and to create your custom theme inside of there."
So the correct answer is
app/design/frontend/your-package/default
Do NOT use:
app/design/frondend/default/your-theme
Magento will process local.xml
file after processing every layout files. So if you want to extend something or need to remove something, local.xml
file can be used.
Normally the css files that are included through layout.xml
will load at last. Suppose you are trying to load different css files through different layout files. See the demo
LAYOUT FILE STYLE NAME HANDLER USED
-----------------------------------------------------
layout1.xml => style1.css => default
=> style2.css => cms_page
layout2.xml => style3.css => default
layout3.xml => style4.xml => default
=> style5.xml => cms_page
local.xml => style6.xml => default
Note: layout files are shown in the loaded order in Magento.
Here as you can see local.xml
file is loaded at last. But it adds style6.css
using a handler default
. Please note that some of other layout files that are loaded above local.xml
file also uses some other handlers. Here layout3.xml
and layout1.xml
uses cms_page
handler to add some css files. Of course those css files only going to load when a cms page is used.
So suppose we loaded a page that uses cms page inside it. Example is home page of Magento. So the order of layout handles there for
ORDER OF LAYOUT HANDLE INVOKES
----------------------------------
default
cms_page
Note: Ignores other layout handlers that are using to load
home page of magento for the sake of simplicity
Due to this, for the above depicted scenario, styles will loaded in this format
ORDER OF STYLES LOADING
------------------------
style1.css
style3.css
style4.css
style6.css (style that we added through local.xml)
style2.css
style5.css
Why this order
Magento first consider default
handler. Then it will add css files that are specified under default
handler from layout files. Layout files will be processed in the order they are loaded. After loaded all css files that are added through default
handler, magento now consider cms_page
handler and the process continues. So in our case, above css file order will generate and will load them in that order.
Specific to this problem
Here it seems that styles.css
is added after your css file. This will not happen normally. That is because styles.css
is added via page.xml
file and through default
handler. So it will loaded first before your css file loaded. So there must some wierd thing happens in your case for sure.
Special NOte: You dont want use this code
<action method="addCss"><stylesheet>css/wc_styles.css</stylesheet></action>
in your local.xml file. This is enough
<?xml version="1.0"?>
<layout>
<default>
<reference name="head">
<action method="addItem">
<type>skin_css</type>
<file>css/wc_styles.css</file>
</action>
</reference>
</default>
</layout>
Best Answer
First of all, creating a new package is something that Magento Official user guide is required to do.
http://info.magento.com/rs/magentocommerce/images/MagentoDesignGuide.pdf
Here is what it says: "Please ignore legacy Magento instructions and tutorials that instruct you to create your custom theme inside of the default design package, or to edit files in the default/default directory directly. Rather, the method that affords the best upgrade path for your theme and the most protection from accidental changes is to create a new design package and to create your custom theme inside of there."
My personal logic for creating a new package is if Magento requires few store views and they have differences, I need to have my own 'default' theme and that's exactly what I get by creating my own package (Magento will look for files in the my_theme theme in custom design package, then in the default theme and then fallback to the base package)