difference btw styles.css and styles.base.css

Hello to everyone. I have opened this files and wondered why there are similar classes and id. For example in both files after comment /* Styles for the fixed width layout */ we can find the same id #container but with different content.



Styles.css

#container {

width: auto;

padding: 0px;

}



Styles.base.css

#container {

padding: 0px 11px;

width: 968px;

margin: 0px auto;

}



There are a lot of another examples (body, Page 404, product notifications). What file should I change to see the results?

I believe Styles.base.css is common to all cs-cart templates and Styles.css adds and overwrites and css settings specific to your chosen template.

Does this mean we can simply just use styles.css if we are using a custom template?



Id love to be able to reduce down the size of my style sheets but I didnt have time to go in and see what was and wasnt being overwritten.

No.



Not every css style is customized for a template. Much of the common cart functionality css remains in the base file.

[quote name=‘Triplets’]No.



Not every css style is customized for a template. Much of the common cart functionality css remains in the base file.[/QUOTE]



Thanks, i used winmerge to check for duplicates in styles.css and styles.base.css and there were not many, so it wouldnt really matter if I tried to merge them together or not.



I think the best thing to do (and most work) would be to determine which selectors arent being used at all and remove them.



Anyone want to be a guinea pig? :wink: (yes this will differ from person to person but for example if youre not using a fixed width layout you could remove quite a bit).

Triplets, thanks. Another two questions


  1. styles.css is included through the common_templates/styles.tpl, and there i found a hook

    {hook name=“index:styles”}{/hook}. So we can just make changes to style.css using addon my_changes and new file style.css there and style.post.tpl. It’s not difficult, but…

    But i don’t know how to change styles.base.css through the hook because it is included not through the hook but through @import url in style.css.



    2.what i should do If i need a hook in a file that doesn’t have any ? Is it possible to add my own hook to any place i want ?

[quote name=‘breezee’]Triplets, thanks. Another two questions


  1. styles.css is included through the common_templates/styles.tpl, and there i found a hook

    {hook name=“index:styles”}{/hook}. So we can just make changes to style.css using addon my_changes and new file style.css there and style.post.tpl. It’s not difficult, but…

    But i don’t know how to change styles.base.css through the hook because it is included not through the hook but through @import url in style.css.



    2.what i should do If i need a hook in a file that doesn’t have any ? Is it possible to add my own hook to any place i want ?[/QUOTE]



    I cant answer your 2nd question but to get around the first you can combine styles.base.css and styles.css into a single styles.css (if you are set with the skin you want to use). This is what I did originally. However styles.css overrides styles.base.css so just make the change in the styles.css hook and thats all that matters anyway. There is no real need to modify styles.base.css I dont believe.