News for hackers. Stuff that matters.
Re:Object Oriented CSS by Silhouette on Wednesday February 09, 2011 @09:07PM (#2200362)
There are few things in the software development world that are more annoying than buzzwords.

One of them is people who completely misuse buzzwords in an attempt to seem more relevant/knowledgeable/important than they really are.

It is not often that I wish I could actively downvote an article on HN, but today I do.

Re:Object Oriented CSS by voidfiles on Thursday February 10, 2011 @12:30AM (#2200920)
It wasn't an attempt to use buzzwords, I think it's probably something more akin to cargo culture then blatant misuse.

However if the naive understanding of objects is that you define a base object, and then extend, or orverride that base object then I think this fits the bill.

Re:Object Oriented CSS by howardr on Wednesday February 09, 2011 @11:38PM (#2200798)
I do agree with the buzzword comment, but her pattern, however it is named, is a good one. We have been using at uShip.com for about 20 months.

It is also worth noting that facebook contracted her to help them reduce their out-of-control CSS. I don't remember her exact numbers, but I know she cut down the size down by >50%

Re:Object Oriented CSS by rimantas on Thursday February 10, 2011 @02:37AM (#2201174)
How much did she increase the weight of HTML? CSS file can be downloaded once cached and never bothered again (if expires is set correctly). Bunch of classes attributes in your HTML will travel down the line every single time you request a page.
Re:Object Oriented CSS by hoopadoop on Thursday February 10, 2011 @05:30AM (#2201479)
By an insignificant amount.
Re:Object Oriented CSS by DTrejo on Wednesday February 09, 2011 @09:52PM (#2200490)
Re:Object Oriented CSS by cloudhead on Wednesday February 09, 2011 @11:20PM (#2200752)
It gets to me too. It's what happens when a non-programmer uses programming terminology to describe something. The goal is to confuse us, and make us think "what am I missing here?".
Re:Object Oriented CSS by tibolan on Thursday February 10, 2011 @01:22AM (#2201032)
This a great framework, but you need to use it as it has to be !

I love the grid without overflow:hidden, bring by the "X X X X X..." on a :after. More of a framework, OOCSS supply a philosophy: reuse, reuse and reuse.

The way I understand and I use the Oriented Object concept in CSS, is to provide "graphical" behavior to DOM element: ie: a <div> can extend the shadow behavior with one class and the red border with another. It permit to keep the CSS short, highly maintanable and to make the CMS more flexible, by giving more options to remix a block.

But the risk using this framework is to multiply className on a element, this fact have to be known, not to fall on a trap with double sized html !

The bases of OOCSS: - the template: <div class="page"> is the wrapper you can add the 'liquid' class to make your design fluid

- the grid: line / unit sizeXonY or lastUnit, the sizeXonY give the width of the 'cell', lastUnit permit the last <div> of a line to take the left place.

line contains unit, no margin or padding on unit (Groxx , to keep the percentage true (4 x25% = 100% vs 4x(25% + 10px (ie.margin)) > 100%)

- the block : see http://oocss.org/module.html but to be concise, the mod structure is bullet proof to insert corner, shadow on a block, without CSS3.

- fews plugins (not always useful) to supply solution to main CSS trick.

You can have more info here: http://oocss.org/ or in looking the demo in the git repository.

And a last thing, the resume of Nicole Sullivan (Stubbornella) give her credibility (to me): W3C, Yahoo!, Facebook... She's also the co-creator of http://www.smushit.com/ysmush.it/, the image size burner by Yahoo!

Hope it could help you to go deeper in this framework,

Keep goin' on Nicole !

Re:Object Oriented CSS by rimantas on Thursday February 10, 2011 @02:40AM (#2201182)
I hate OOCSS even more than grid frameworks, because it takes that horrible idea even further. It throws the whole idea of separating structure and presentation and throws it out of the window. Seriously, if one is so desperate to keeps CSS organized, then do like it was already advised here: use Compass or whatever tool which let's you define mix-ins.