3 ms·
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 fr
by tibolan 16y ago
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 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/ 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/ 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 !
- rimantas 16y agoI 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.