Forum Moderators: not2easy
This way you will overwrite the standard styles with more specific ones that start with: body#pageID element ...
This will save you a lot of @import's. (It's better to have a 30Kb CSS file.. - that will be cached on the first load of the page.. rather than 6 files of 5KB each that will be downloaded from the server when someone loads a new page.
This is the way I make custom-styles for particular pages in a big website. It's a best practice to have all the css-info in one file, such that any update will be easier to finish.
Create one file that will act as your master stylesheet. Every page should include this, and it should include any styles that are shared by multiple pages. This file would be cached the first time it's loaded.
Next, for each page create a file that will include only the page-specific styles. This way, you're only going to be getting at most 2 CSS files for a single page. The master will get cached and as users visit each individual page, those individual sheets will be getting cached as well.
This will save you a lot of @import's. (It's better to have a 30Kb CSS file.. - that will be cached on the first load of the page.. rather than 6 files of 5KB each that will be downloaded from the server when someone loads a new page.
With my method above, you will only have at most 2 files. So there won't be 6 files of 5k downloaded when someone loads a new page. Only the page-specific css would be downloaded (and after the first visit, that will also be cached, so it won't need to be downloaded for future visits).
It's a best practice to have all the css-info in one file, such that any update will be easier to finish.