Last active
March 9, 2022 00:58
-
-
Save huffmanks/fdf2756222200390b1863dc019dbf7ee to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* @title Responsive grid columns | |
*/ | |
/* Equal size grid items */ | |
.el { | |
display: grid; | |
grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); | |
gap: 20px; | |
} | |
/* Alternative if you want grid items to be different sizes */ | |
.el { | |
display: grid; | |
grid-template-columns: repeat(auto-fit, minmax(200px, auto)); | |
gap: 20px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment