Created
September 14, 2020 08:34
-
-
Save luckyshot/6344bbfb09bcf98a12948100e3740ab9 to your computer and use it in GitHub Desktop.
Tiny Minimal Flexbox Grid
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
.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/ | |
*/ |
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
<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