Page is a not externally linkable
- Code, Content, and Presentation
-- CSS
---- CSS Crib Sheet, cheatsheets, shortcut lists, syntax lists, & others


SuzyUK - 6:59 pm on Sep 15, 2004 (gmt 0)


Import makes older browsers ignore CSS when they dont understand it.

Yup this is one good reason for using it, especially if you have the luxury of not having to support <=v4 browsers.

I wanted to ask about this anyway, if you look back to post #24 you'll note I've made an amendment explaining that the reason I was using @import without url()
@import "mystyle.css";
is because it also hides from IE4 as well as NN4, whereas the @ import that uses ():
@import url(mystyle.css);
only hides from NN4, is that correct? can anyone confirm.. (you see that's the problem with using things, you know there's a reason you just can't always remember why.. :o)

edited
-- Also can anyone confirm, give opinions about the PDA's use of media type handheld, I think that previously although most handheld devices didn't actually support "handheld" they did support "screen" media in error, I don't know if that's still the case or not? --
edit: above is OT sorry.. what was I thinking.. I still would like to know though in order to keep media types section correct.. but I've moved myself ;) here [webmasterworld.com]

Wrapdida
Seperate style sheets into layout.css, font.css, color.css. You'll save 75% of your time trying to locate your own concoction of properties.

Not sure I'm a fan of this idea, unless it's a personal site that you understand where you've put everything .. I would think that maybe globallayout.css, then everythingelse.css.. but seperating colors and fonts hmm.

Grouping selectors saves so much more time and space, and the cascade is easier to read if the whole elements CSS is in one place?

I've had to debug stylesheets, that have been split into 4-5 sheets and to a newcomer (me) coming into this scenario it can be a nightmare (time consuming) trying to figure cascade and inheritance and someone elses logic let alone when it's all over the place

Certainly for advanced sites like ronin talked about using @import to cascade the globallayout.css into a subsite's CSS, there has to be some benefit, but when tasks are split between a team the rules about what you can change and can't would need to be strictly adhered to.. just my thoughts of course, but I don't see this on a "neophyte" list yet.. splitting the cascade might only complicate things in the beginning, like running before walking?


/* Always comment your CSS and group them according to zones of your page. */

Agreed this takes care of the above situation and passes reminders onto someone following/working with you or even yourself at a later date..

ID vs Class. Its like Neat vs Cluttered. So I personally prefer neat.

I think it's more IDentification v's CLASSification, you're right though IDentify a logical area on page = header, nav, footer, newslinks, then as jetboy 'says' classes still have their place because each division within an identified area may not necessarily be classified the same for instance in your newslinks identified area are you may have some links classified as "hot", some as "funny" , "boring" ..etc..

dcrombie
Thank you, I've literally copy/pasted that post, on the hex color summary, into my notes.. do you mind if I use it? I won't change my post on colors, but would advise anyone who's copying this to add that into their notes.. ;)

noah you're right about the ID and Class names, I think it has been mentioned already and it is in one of the summaries yet to follow..

Suzy

[edited by: SuzyUK at 10:12 am (utc) on Sep. 16, 2004]


Thread source:: http://www.webmasterworld.com/css/4514.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com