Skip to content

Instantly share code, notes, and snippets.

@WagnerMoreira
Last active August 16, 2017 20:49
Show Gist options
  • Save WagnerMoreira/3149a0b25fdb1bb05129cd3b2cf1e85b to your computer and use it in GitHub Desktop.
Save WagnerMoreira/3149a0b25fdb1bb05129cd3b2cf1e85b to your computer and use it in GitHub Desktop.
grid layout
#garden {
display: grid;
grid-template-columns: 20% 20% 20% 20% 20%;
grid-template-rows: 20% 20% 20% 20% 20%;
}
#poison {
grid-column-start: -3;
}
//crazy column sizes
//grid-template-columns doesn't just accept values in percentages, but also length units like pixels and ems. You can even mix //different units together.
//Here, set three columns to 100px, 3em, and 40% respectively.
//answer: grid-template-columns: repeat(3 , 100px 3em 40%);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment