Skip to content

Instantly share code, notes, and snippets.

@luckyshot
Created September 14, 2020 08:34
Show Gist options
  • Save luckyshot/6344bbfb09bcf98a12948100e3740ab9 to your computer and use it in GitHub Desktop.
Save luckyshot/6344bbfb09bcf98a12948100e3740ab9 to your computer and use it in GitHub Desktop.
Tiny Minimal Flexbox Grid
.flex-grid {
display: flex;
}
.col {
flex: 1;
}
/* Break on mobile? */
@media (max-width: 400px) {
.flex-grid {
display: block;
}
}
/*
Credits, gutters, margins and more:
https://css-tricks.com/dont-overthink-flexbox-grids/
*/
<div class="flex-grid">
<div class="col"></div>
<div class="col"></div>
<div class="col"></div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment