Skip to content

Instantly share code, notes, and snippets.

@JJCLane
Created July 24, 2018 23:39
Show Gist options
  • Save JJCLane/bc16dc57c643d6b3de580e4b959a4180 to your computer and use it in GitHub Desktop.
Save JJCLane/bc16dc57c643d6b3de580e4b959a4180 to your computer and use it in GitHub Desktop.
Calculate percentage column width for Masonry/Isotope
@function gridWidth($gutter, $numColumns) {
$totalSpace: ( $numColumns - 1 ) * $gutter;
@return calc((100% - #{$totalSpace}) / #{$numColumns});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment