Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There really wasn't a specific reason for the naming convention. Although adding "col-" to all of the columns allowed me to easily select every column using [class*='col-'].


I just don't think I'm understanding when it comes to something like

.col-2-12 & col-10-12


It signifies the number of columns and how many columns each section, or div, takes.

In your example, the first section would take 2 columns out of twelve. The second section takes the remaining 10 columns.

Or, col-3-12 & col-9-12; first section would take 3 columns out of twelve and the second takes the remaining nine.

What I'm curious about is if doing something like this: col-2-12 & col-8-12. But I'm too lazy to download the css to see for myself.


I had the same problem as it seems the convention isn't explained on the website. However as soon as I took a look at the code it became clear that the numbers represent fractions. .col-2-12 is a column that is 2/12 in width (same as 1/6) and .col-10-12 is 10/12, respectively.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: