Created
February 19, 2017 23:24
-
-
Save belozerskiy/def95ceff4545908dd3e88a7941a045d to your computer and use it in GitHub Desktop.
Full height flexbox grid template
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
| * { | |
| margin: 0; | |
| padding: 0; | |
| } | |
| *:before, *:after{ | |
| box-sizing: border-box; | |
| } | |
| body { | |
| height: 100vh; | |
| width: 100vw; | |
| } | |
| .grid { | |
| display: flex; | |
| flex-direction: row; | |
| flex-grow: 1; | |
| flex-wrap: wrap; | |
| background: gray; | |
| height: inherit; | |
| width: inherit; | |
| } | |
| .grid-x { | |
| display: flex; | |
| flex-direction: column; | |
| flex-grow: 1; | |
| flex-wrap: wrap; | |
| background: gray; | |
| height: inherit; | |
| width: inherit; | |
| margin: 5px; | |
| } | |
| .grid-row { | |
| display: flex; | |
| flex-direction: row; | |
| flex-grow: 1; | |
| background: green; | |
| margin: 5px; | |
| } | |
| .grid-left-column { | |
| display: flex; | |
| width: 50px; | |
| height: inherit; | |
| flex-direction: column; | |
| background: black; | |
| } | |
| .grid-column { | |
| display: flex; | |
| flex-direction: row; | |
| flex-grow: 1; | |
| background: yellow; | |
| margin: 5px; | |
| } | |
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
| <div class="grid"> | |
| <div class="grid-left-column"> | |
| </div> | |
| <div class="grid-column"> | |
| <div class="grid-col"> | |
| <div class="grid-row"> | |
| <div class="grid-column"></div> | |
| <div class="grid-column"></div> | |
| <div class="grid-column"></div> | |
| </div> | |
| <div class="grid-row"> | |
| <div class="grid-column"></div> | |
| <div class="grid-column"></div> | |
| <div class="grid-column"></div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://jsfiddle.net/qgdk3bc2/3/