Eric Nguyen Posted October 25, 2013 Share Posted October 25, 2013 (edited) So it seems the CSS files in my theme directory are used instead of the ones from the modules e.g. /themes/fashionbird/css/modules/homefeatured/homefeatured.css instead of /modules/homefeatured/homefeatured.css Fair enough, I will need to play with the modules' CSS anyway. However, shouldn't the moduels' original CSS be included anyway? The CSS files in my theme directory are meant to override, not replace or reinvent the wheel or start from scratch, right? Having both CSS files, original from the modules and my theme have a lot of advantages such as consistency, don't you agree? e.g. <link href="/modules/homefeatured/homefeatured.css" rel="stylesheet" type="text/css" media="all" /> <link href="/themes/fashionbird/css/modules/homefeatured/homefeatured.css" rel="stylesheet" type="text/css" media="all" /> Chance are I don't want to duplicate the efforts made in /modules/homefeatured/homefeatured.css but simply make some changes e.g. font-family then I can put those changes in ... Neat, right? Is there anyway I can make this happen or is it already available and I'm missing something? Edited October 25, 2013 by Eric Nguyen (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted October 25, 2013 Share Posted October 25, 2013 no, this is "override" system, it mean, that you can use own .css files from your theme directory. it's usefull when you don't want to change original files. more informations about overrides here: http://doc.prestashop.com/display/PS15/Overriding+default+behaviors 1 Link to comment Share on other sites More sharing options...
Eric Nguyen Posted October 25, 2013 Author Share Posted October 25, 2013 Ok, Vekia. So to confirm, it's not possible at all to include the original CSS files in modules first, then the overriding ones in theme directory? Next, is there any way for me to just stick to the original CSS files in modules? I'm happy to put my CSS in the theme's global.css and I don't need the module-level CSS files in my theme anyway. no, this is "override" system, it mean, that you can use own .css files from your theme directory. it's usefull when you don't want to change original files. more informations about overrides here: http://doc.prestashop.com/display/PS15/Overriding+default+behaviors Link to comment Share on other sites More sharing options...
vekia Posted October 25, 2013 Share Posted October 25, 2013 by default it isn't possible. you can do it only with core modifications. if you don't want css files from /themes/YOUR_THEME/css/modules just empty this directory 1 Link to comment Share on other sites More sharing options...
Eric Nguyen Posted October 25, 2013 Author Share Posted October 25, 2013 Thanks for clarification. Would really appreciate such capability included in Prestashop's next release though. If you are not one of Prestashop's developers/ contributors, pardon me by default it isn't possible. you can do it only with core modifications. if you don't want css files from /themes/YOUR_THEME/css/modules just empty this directory Link to comment Share on other sites More sharing options...
vekia Posted October 25, 2013 Share Posted October 25, 2013 This solution does not comply with the idea of "overrides" moreover: doubled css styles = lack of performance (a little redundant!) Link to comment Share on other sites More sharing options...
Eric Nguyen Posted October 25, 2013 Author Share Posted October 25, 2013 I didn't say "override" though What I'm talking about here should be a separate thing, say "append" mode beside "override" mode - it can be a choice for developers. This idea of "append" by no means encourages redundancy. The original CSS file in a module should have all the default styles. The extra CSS file in theme directory should cover the necessary changes only, not repeating the original styles. If you are worried about having twice many CSS files included in a webpage, I say we combine the CSS files to 1 single file in the end when everything is set so no problem at all, right? This solution does not comply with the idea of "overrides" moreover: doubled css styles = lack of performance (a little redundant!) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now