How to calculate columns equal to the Skeleton

4

The .col-md-1 is calculated as: 100/12 = 8.3333...3 in Skeleton was calculated in another way that returned the following result:

.one.column,
.one.columns {
  width: 4.66666666667%;
}

What logic did the developer use? What calculation?

    
asked by anonymous 22.08.2016 / 21:03

1 answer

3

It really is a complex puzzle to solve. After some tests and some searches, it was not possible to get the result of 4.66..67% , but I got in 4,25% .

According to this problem in github , it appears that the column base of skeleton was formerly 16, rather than conventional 12 (used by many currently - Bootstrap ).

Another point that I analyzed was the method that many were calculating the skeleton grid when converted to SASS or LESS , instead of decreasing the margin value for each side (left and right), it was only removed 1 side.

See the formula used in this conversion example for LESS / SASS :

.one.columns {
    width: @column-width*1-(@column-margin/2)*1%;
}

//Essa área é a interessante para a análise: (@column-margin/2)

Considering that github itself is not updated to 2 years and that the developer himself said he was absent from the updates, using some values of% original% of CSS and some formulas used in Skeleton and LESS I arrived at this calculation:

  

@largeTotal = 100;
  @colunas = 16;
  @margem = 4%;
  Formula: @largeTotal / @colunas - (@margem / 2);

  100/16 - (4% / 2) = 4.25%

Remembering that the current formula used in SASS and LESS already differs from the calculation I made, because today the system is based on a SASS grid, so the account will not hit. I used the calculation logic with 12 colunas (based on the grid used before) to try to answer why to get the value of 16 colunas found in the 4,66..67% original file of CSS .     

22.08.2016 / 22:54