twitter/bootstrap — Issue #2370: Incorrect function for fluid interface
Author: miguel-simoes
Created: 2012-03-02 12:28:19+00:00
State: open

The function used for the generation of the fluid interface grid is incorrect. Looking at the function:

1% * (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1))

Changing the variables, using defaults for span1, and refactoring the function:

1% * (6.382978723% * 1) + (2.127659574% -* (1 -1)) <=> 1% * (6.382978723% ) + 0 <=> 1% * 6.382978723% = 0,06382978723% <=> 0.000638297872

In other other words, the function is asking for 1% of the @fluidGridColumnWidth value.

The correct function should be

1 * (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1))

Refactoring:

1 * (6.382978723% * 1) + (2.127659574% -* (1 -1)) <=> 1 * (6.382978723% ) + 0 <=> 1 * 6.382978723% = 6,382978723% <=> 0.0638297872

which will request for 1 time the value of @fluidGridColumnWidth value, which wil end up being the correct value (and expected) 6.382978723%