To add some css or js file, Magento allow different ways to do that via xml:

Add CSS file:

1- <action method="addItem"><type>skin_css</type><name>css/custom.css</name></action>


2- <action method="addCss"><stylesheet>css/custom.css</stylesheet></action>


3- <action method="addItem"><type>js_css</type><name>folder/custom.css</name></action>

Add JS file:

4- <action method="addItem"><type>skin_js</type><name>js/custom.js</name></action>


5- <action method="addJs"><script>folder/custom.js</script></action>

Now my question is:

In the line 3 what is js_css ? from what I understood, it is to add css but why we don't add it in css/ file with all files css skin/frontend/package/theme/css/ instead of js/

1 Answer 1


This is for JavaScript libraries that bundle their CSS together like many sliders/scrollers do. For example slick (https://github.com/kenwheeler/slick).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.