OOCSS Validation

30 views
Skip to first unread message

Murray

unread,
Nov 8, 2009, 5:36:29 PM11/8/09
to Object Oriented CSS
I've been asked to provide a solid reason why my css doesn't validate
and I wanted other opinions on this.

Using the conditional comment method, to provide older browsers with
the correct styles, makes maintainance, and cascading styles more
difficult to manage.

w3c blog has this to say about their oocss site [http://www.w3.org/
Help/about-redesign#limitations]:
"Because of known interoperability issues, we have accepted to use CSS
that does not validate with the CSS validator. Over time we hope to
evolve towards valid CSS."

http://www.webstandards.govt.nz/technical/, only has this to say about
stylesheets:
"Stylesheets. Sites must work properly (be navigable, present
information intelligibly) with stylesheets disabled."

It doesn't say that the css must validate, it just says that the site
must work correctly without css.

I can't find any mention of css validation in the WCAG2.0 (AA)
Guidelines either.

What is our stance on css validation?

Nicole Sullivan

unread,
Nov 8, 2009, 9:15:54 PM11/8/09
to object-or...@googlegroups.com
Hi Murray,

I've written up my reasons for choosing the _ and * hacks over other options. You can check that out here.


Cheers,
Nicole

 
--
Nicole Sullivan

Smush it  http://smush.it
Book  Even Faster Websites with O'Reilly

Murray Nuttall

unread,
Nov 8, 2009, 9:27:12 PM11/8/09
to object-or...@googlegroups.com
Yeah, I'm thinking this might be a good way to put it.

The trouble is that OOCSS uses (very minimal) hacks, to deal with  slight display mismatches between older and newer browsers, rather than conditional comments. A couple of reasons are explained here, http://wiki.github.com/stubbornella/oocss/faq#hacks, but personally I like that:

 

·         It makes the code easier to maintain for other developers where the slight variation of values sit side by side rather than in another file.

·         Fewer http calls makes it more efficient.

 

The WCAG2.0(AA) Guidelines doesn’t say anything about css validation.

 

OOCSS also uses bits of CSS3 which also don’t validate, but so do many “lightbox” solutions. The reason CSS3 may be present is that, in an ideal world, older techniques, such as background images for rounded corners, would be served using a javascript which could be removed when CSS3 is accepted in all browsers (when IE6,7,and 8, are dead).

 

 

So far I have spoken to one of the guys at webstandards.govt.nz who agrees that there is currently nothing in the NZ standards which states that CSS must validate. He said that the Web Standard Working Group no longer felt that it was necessary.

 

However I have written him a long email, about my approach, and some questions, for him to discuss with his colleague in the next day or so. I am interested to hear what they think but I’ll be sure to summarise it for you when I know more.

 

In the mean time the W3C (http://www.w3.org) are using OOCSS for their site. This is their stance on the subject:

 

Is the CSS invalid? The CSS does not validate with the W3C CSS validator. We mentioned this as one limitation of the site back in March. As we wrote then, “Because of known interoperability issues, we have accepted to use CSS that does not validate with the CSS validator. Over time we hope to evolve towards valid CSS.”

 

They are The Web Standards Authority, and I took a sigh of relief when they released the new OOCSS site because it means we’re all heading in a good direction.


m.
Reply all
Reply to author
Forward
0 new messages