Hi Dainius If I understood you right you have many THOUSAND lines of CSS code for a (still) more or less simple webshop? I'm sorry to say but I think if you have so many lines of CSS code then there's another problem to begin with.
You should do a redesign and implement the CSS the way it was meant to be: cascading styles. I know by hard learned experience that sometimes you have to reuse (read: copying) styles from one element to another because of project dead lines or simply because of the costs that would arise if you want a really well thought, well implemented, still flexible CSS. But if you try to optimize the CSS then do it from where it starts and that's with the layout/design. You don't have to change the design as it looks but you probably have to change the way you use classes and IDs. That way you I'm sure you can save many many lines of CSS code that would have been redundant anyway. May be also this tiny little Firefox Addon helps: https://addons.mozilla.org/en-us/firefox/addon/dust-me-selectors/ Or try to search for other automated ways to clean up CSS throughout a whole web app. Greetings from Basel Marc ORCA Services AG Herrenmattstrasse 26 CH-4132 Muttenz Office Basel: Aeschengraben 10, CH-4051 Basel [email protected]<mailto:[email protected]> T. +41 61 205 80 80 T. +41 61 205 80 73 (direkt) F. +41 61 205 80 81 www.orca.ch<http://www.orca.ch>, www.orca-services.ch<http://www.orca-services.ch> "We convert your visitors into customers." ________________________________ Von: [email protected] [mailto:[email protected]] Im Auftrag von Dainius Bigelis Gesendet: Donnerstag, 16. Juni 2011 15:44 An: [email protected] Betreff: [oxid-dev-general] Split CSS files to smaller ones Hi, Currently we are working to improve the code and structure of CSS files. Just we are not sure about one idea, that we want to implement, so we would like to ask you about your opinion regarding that. Currently (in eShop 4.5.0 verson) we have ~10 css files, where one of these (elements) have ~4000 lines of code. Making any change in that and maintain it became really difficult for developers. So we thought that would be good to split this file to the smaller ones (according the type of elements) and change the structure of other files. As a result of that would be 3-5 files according to the type of page (details page, list, checkout, main page...). These files would do nothing, just include the smaller css files for elements, which are really used used in this particular page. The advantage of such structure: - Much more easy development/changes and maintenance; - Scalability of pages, as elements which are not needed in this page would not be loaded (i.e. elements used only in checkout would not be loaded in details page). Disadvantage: - There are some ideas, that loading more files may reduce the performance. But we think that such effect may be noticed only during the first load of the page and then it is cached. But considering what we have now - it parses all the long (4k lines) file even of some big part of this is not needed in the page. Also, one of solutions to work with smaller files and deliver one file as result - is to use the dedicated tools for compiling the css files into one during deployment. So - please tell your ideas about this concept or any arguments for one or other solution. Best regards, Dainius Bigelis
_______________________________________________ dev-general mailing list [email protected] http://dir.gmane.org/gmane.comp.php.oxid.general
