Created
February 10, 2019 10:19
-
-
Save AlekVolsk/b61548dcab20b28151cb002a1ec1a643 to your computer and use it in GitHub Desktop.
Smart grid
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
.grid { | |
display: grid; | |
grid-gap: 10px; | |
grid-template-columns: repeat(12, 1fr); | |
margin: 0 auto; | |
width: 100%; | |
max-width: 1280px; | |
} | |
.one, .two, .three, .four, .five, .six, .seven, .eight, .nine, .ten, .eleven, .twelve { | |
grid-column-end: span 12; | |
} | |
.nested { | |
display: grid; | |
grid-gap: 10px; | |
grid-template-columns: repeat(12, 1fr); | |
} | |
.merge-two-rows { grid-row-end: span 2 } | |
.merge-three-rows { grid-row-end: span 3 } | |
.merge-four-rows { grid-row-end: span 4 } | |
.merge-five-rows { grid-row-end: span 5 } | |
.merge-six-rows { grid-row-end: span 6 } | |
@media only screen and (min-width: 481px) { | |
.one { grid-column-end: span 1 } | |
.two { grid-column-end: span 2 } | |
.three { grid-column-end: span 3 } | |
.four { grid-column-end: span 4 } | |
.five { grid-column-end: span 5 } | |
.six { grid-column-end: span 6 } | |
.seven { grid-column-end: span 7 } | |
.eight { grid-column-end: span 8 } | |
.nine { grid-column-end: span 9 } | |
.ten { grid-column-end: span 10 } | |
.eleven { grid-column-end: span 11 } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment