Last active
April 22, 2021 23:55
-
-
Save karlazz/0f6ff048eb350857fed6b5e01673fd67 to your computer and use it in GitHub Desktop.
Automated reponsive grid from Heydon Pickering and further grid notes
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
.container { | |
display: grid; | |
grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); | |
grid-gap: 1rem; | |
} |
Most of my reading started here:
https://webdesign.tutsplus.com/articles/flexbox-vs-css-grid-which-should-you-use--cms-30184
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
And here is a CSS trick with @supports for incompatible browsers for Grid feature:
.main {
width: 100%;
overflow: hidden;
}
.main > div {
width: 30%;
float: left;
}
@supports (display: grid) {
.main {
display: grid;
}
}