Created
July 16, 2021 13:26
-
-
Save design-innovations/aa7008bb9a1d24743e7d4739ecfa3807 to your computer and use it in GitHub Desktop.
CSS - Fab four
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
.fab-four { | |
--threshold: 600px; | |
--gap: 1rem; | |
--items: 3; | |
--gap-spacing: calc(var(--gap) * (var(--items) - 1)); | |
display: flex; | |
flex-flow: row wrap; | |
gap: var(--gap); | |
} | |
.fab-four > * { | |
min-width: calc((100% - var(--gap-spacing)) / var(--items)); | |
max-width: 100%; | |
width: calc((var(--threshold) - 100%) * 100000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment