Created
May 14, 2021 17:41
-
-
Save scottkellum/bb46ea68c23e630842ee80c37513a3e6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
html { | |
--max-width: 1200px; | |
--columns: 6; | |
--gutter: 1.5rem; | |
} | |
* { | |
--grid: minmax(var(--gutter), 1fr) | |
repeat( | |
var(--columns), | |
minmax( | |
0, | |
calc( | |
(var(--max-width) - (var(--gutter) * (var(--columns) - 1))) / | |
var(--columns) | |
) | |
) | |
) | |
minmax(var(--gutter), 1fr); | |
--subgrid: repeat(var(--columns), 1fr); | |
} | |
@media (min-width: 30em) { | |
html { | |
--columns: 12; | |
} | |
} | |
@media (min-width: 50em) { | |
html { | |
--columns: 24; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment