Compact CSS grid system
.g1, .g2, .g3, .g4, .g5, .g6, .g7, .g8, .g9, .g10, .g11, .g12{ display:inline; float:left; margin-left:10px; margin-right:10px; }
.g1{ width:60px; } .g2{ width:140px; }
.g3{ width:220px; } .g4{ width:300px; }
.g5{ width:380px; } .g6{ width:460px; }
.g7{ width:540px; } .g8{ width:620px; }
.g9{ width:700px; } .g10{ width:780px; }
.g11{ width:860px; } .g12{ width:940px; margin-left:auto; margin-right:auto; }
.f{ margin-left:0; }
.l{ margin-right:0; clear:right; }
I really don't like the lengthy class names in Blueprint and 960gs. I especially don't like the confusing names in other systems/rewrites that that convert the incremental numbering to actual pixel widths.
My argument for this compact version:
- A grid system doesn't need to be semantic since it is for layout, not content
- Shorter class names result in less mark up
- The letter
gfully describes what the class is for after seeing it once - The classes
.fand.lalso fully describe their purpose within the grid system - The classes
.firstand.lastshould/will probably be used better elsewhere, like to denote the last item of a list - The class names
.alphaand.omegajust seem a little ridiculous to me
Yes, the .push, .pull, .prepend, and .append classes have all been stripped. That's just because I personally never use them.
I'm looking forward to suggestions and concerns.