infomedia
8/14/2019 - 4:47 PM

Column Grid Percentage

// Casey Lee

SASS function to calculate the percentage of a bourbon/neat grid column e.g; 70% = 70 * 12 / 100 (can be added to _grid-settings.scss in kronos)

/**
 * Calculate the percentage of grid columns (70% = 70 * 12 / 100)
 * @param  {int} $percent
 * @return {float}
 * @usage: @include span-columns(column-percentage(30));
 */
@function column-percentage($percent) {
    @return ($percent * $grid-columns) / 100;
}