stubbornella / oocss

Object Oriented CSS Framework
http://stubbornella.org/
Other
6.23k stars 714 forks source link

Grids: .size2of4 missing #28

Closed casio closed 14 years ago

casio commented 14 years ago

Hey folks,

theres no .size1of4 in grids.css. I can imagine thats on purpose since users can apply .size1of2 instead. However, imho this is a bit misleading and also makes it unnecessarily 'unstraight' to use grids in cms.

What do you think?

Cheers, Carsten

martinklepsch commented 14 years ago

did you mean .size2of4 or .size1of4 ? (topic)

casio commented 14 years ago

Oops, sorry: there was an issue with my issue report : ) I'm talking of the missing class .size2of4, of course.

martinklepsch commented 14 years ago

okay, could you then please explain a bit more why it's misleading? i dont really get the point ... to me it seems absolutely clear that there is no need for 2of4 because that would be identical with 1of2 ... also it would increase code size :)

casio commented 14 years ago

I just think, its a bit more intuitive and explicit to have it there. (I was dumb enough to spend several minutes trying to figure why my 2of4|1of4|1of4 layout looked so totally broken , before I found 2of4 was not existing : )

Also, when you have some server- or even client-side scripting that builds .lines for you(for example an CMS, allowing the user to divide rows into columns in a WYSIWYG editor), you'd need to extra-branch stuff for 4ths.

That being said, I think the extra bytes for ', .size2of4' in line 5 of grids.css wouldnt weigh in that that dramatically : )

Btw. is there a benefit/reason behind .size1of1?

stubbornella commented 14 years ago

Seems like the CMS should offer the user the option of 2/4, then just convert that to 1/2 when it is building out the html, no?

size1of1 just eliminates the float so the elem takes the full width. I'm anti "width: 100%" because it can be dangerous for layouts if the parent has weird padding.

bjrn commented 14 years ago

I've been adding the .size2of4 class in a recent project, since it is so easy for people to miss the 2/4 to 1/2 thingy, and the extra code for handling the conversion will probably add more code size somewhere else in a project ... so +1 for including it in grids.css

levito commented 14 years ago

-1 from me. Keep it simple. OOCSS is no "throw in and use" kind of library, so the codebase should remain as clean as possible. Adding .size2of4 might be a small step. But I believe it would be the wrong direction.

stubbornella commented 14 years ago

-1 from me too. If individual projects need 2/4 it seems easy enough for them to add as an extension. Much the way other's have added additional dividers (up to 7ths I believe). I don't want to have two classes that do the same thing. This goes beyond bloat (which is a slippery slope) and into a design principal, which is not to code the same thing twice unnecessarily.

casio commented 14 years ago

Okok, point taken : ) It surely is a good idea to keep the codebase clean and follow DRY principles.

However, I still think, from a visual point of view, 2of4 might help(think beginners, designers, template-devs playing with classes in html docs) and also that no script-code should have to workaround/branch for this issue. But, fair enough - users can add stuff like that to their project, of course.

While we're at it, talking about bloat, clean codebase, etc: some classes in template.css are for educational purposes only, right? .gs960, .gmail, .gcal, etc. I'll add a ticket for these, since imho these classes should go in the educational _doc.html files, then.