So on OOCSS, they outline their version of a grid. I can't understand exactly what is happening. I know that it is supposed to account for rounding errors with fluid layouts that causes the last element to fall to the next line. How does each rule help with that?
My scss version of the OOCSS last-child pseudo selector:
.grid__col--last {
display: table-cell;
*display: block;
*zoom: 1;
float: none;
_position: relative;
_left: -3px;
_margin-right: -3px;
width: auto;
&:after {
content: ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .";
visibility: hidden;
clear: both;
height: 0 !important;
display: block;
line-height: 0;
}
}
I've annotated the lines with specific descriptions.
Overall the things it does are:
Take care of IE6/7 bugs
I think you are missing some bits though. You need the base styles from
.col
in order to understand lastcol
.