Skip to content

Instantly share code, notes, and snippets.

@cjwd-snippets
Created February 16, 2019 16:25
Show Gist options
  • Select an option

  • Save cjwd-snippets/ab6911d64300ab6e326a47c6f1030ba5 to your computer and use it in GitHub Desktop.

Select an option

Save cjwd-snippets/ab6911d64300ab6e326a47c6f1030ba5 to your computer and use it in GitHub Desktop.
CSS Grids using minmax
$col: calc((1200px - (11 * 10px)) / 12); // ($wrapperWidth - ($numberOfGutters * $gutterWidth)) / $numberOfColumns
.grid {
display: grid;
}
.grid-12 {
display: grid;
grid-template-columns: minmax(20px, 1fr) repeat(12, minmax(auto, $col)) minmax(20px, 1fr);
grid-gap: 10px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment