stevengreen22 Posted August 25, 2011 Share Posted August 25, 2011 Hi all, So, opinions and thoughts on whether style sheets shoudl be seperate or contained in one file? I know for larger sites there can be several different css files and this makes its easier but it is neccesary for smaller sites to have nav.css and typeography.css and stucture.css etc? Is this the preferred way or does it just come down to scale and preference? Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/245683-what-is-the-best-pratice-for-multiple-style-sheets/ Share on other sites More sharing options...
cssfreakie Posted August 25, 2011 Share Posted August 25, 2011 It comes down to how many header request you find acceptable. The more request you make on your site the slower it will load. That said. The only reason why i would use extra separate stylesheet is when using conditional comments for older versions of IE. Than it is not an option to combine them, unless you want to use all kinds of css hacks which I never use. Quote Link to comment https://forums.phpfreaks.com/topic/245683-what-is-the-best-pratice-for-multiple-style-sheets/#findComment-1261913 Share on other sites More sharing options...
stevengreen22 Posted August 26, 2011 Author Share Posted August 26, 2011 So, you'd just have the one sheet and comment the appropriate sections to make navigation easier? Theres a prog called cssedit that looks pretty tidy in terms of being able to 'group' categories so to speak. Quote Link to comment https://forums.phpfreaks.com/topic/245683-what-is-the-best-pratice-for-multiple-style-sheets/#findComment-1262161 Share on other sites More sharing options...
cssfreakie Posted August 26, 2011 Share Posted August 26, 2011 So, you'd just have the one sheet and comment the appropriate sections to make navigation easier? no I don't comment for production, I have a specific order I always use. In production i use a compressed stylesheet without comments at all. I test locally with a non compressed and commented stylesheet though. Conditional comments are something different btw Quote Link to comment https://forums.phpfreaks.com/topic/245683-what-is-the-best-pratice-for-multiple-style-sheets/#findComment-1262225 Share on other sites More sharing options...
stevengreen22 Posted August 26, 2011 Author Share Posted August 26, 2011 I see, for the time being I think I'll use comments until I know what I'm doing. I understnad the compression to enable it to be read quicker. When you say conditional, I think 'if, else, or, then' etc - I'll take a stab at it being browser specific? If IE then do this? Time to google. Quote Link to comment https://forums.phpfreaks.com/topic/245683-what-is-the-best-pratice-for-multiple-style-sheets/#findComment-1262243 Share on other sites More sharing options...
cssfreakie Posted August 26, 2011 Share Posted August 26, 2011 Time to google. yep ....first link Quote Link to comment https://forums.phpfreaks.com/topic/245683-what-is-the-best-pratice-for-multiple-style-sheets/#findComment-1262246 Share on other sites More sharing options...
stevengreen22 Posted August 26, 2011 Author Share Posted August 26, 2011 yup - quite impressed I got it right But this is only geared towards IE. Does that mean that the -webkit / -moz are not conditional although they do the same thing? but...they're quite generic in taht they don't specify versions and the browsers are generally better equipped than IE. But (to drag this on) would you really write statements for IE 5?!? ...it's slightly shocking to think that IE would be allowed to be weak in areas that it's competition are not?!? Quote Link to comment https://forums.phpfreaks.com/topic/245683-what-is-the-best-pratice-for-multiple-style-sheets/#findComment-1262276 Share on other sites More sharing options...
cssfreakie Posted August 26, 2011 Share Posted August 26, 2011 Does that mean that the -webkit / -moz are not conditional although they do the same thing? Well in a way they are. ...it's slightly shocking to think that IE would be allowed to be weak in areas that it's competition are not?!? it's not shocking at all, each browser has it's own things and if you want you can make your own. The good thing is if you would develop for firefox (properly) the only thing you have to tweak is for ie 6 7 and sometimes 8 so in that sense, it doesn't matter that it is only supported by IE. P.s. if your topics are solved mark them, saves others time reading through. Quote Link to comment https://forums.phpfreaks.com/topic/245683-what-is-the-best-pratice-for-multiple-style-sheets/#findComment-1262278 Share on other sites More sharing options...
stevengreen22 Posted August 26, 2011 Author Share Posted August 26, 2011 That makes sense with something one of those video's mentioned. Design for the newest browsers and work backwards so to speak. I'm really liking some of the css3 stuff - There's always walking before running though Quote Link to comment https://forums.phpfreaks.com/topic/245683-what-is-the-best-pratice-for-multiple-style-sheets/#findComment-1262286 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.