Last active
April 20, 2020 01:34
-
-
Save vpodk/f429192f38b255d4f81d61167c8041ce to your computer and use it in GitHub Desktop.
Clean Application — Flexible Box Layout
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
* { | |
box-sizing: border-box; | |
margin: 0; | |
padding: 0; | |
} | |
body { | |
display: flex; | |
flex-direction: column; | |
min-height: 100vh; | |
} | |
#main, | |
#main > article { | |
flex: 1; | |
} | |
@media only screen and (min-width: 768px) { | |
#main { | |
display: flex; | |
} | |
#main > aside { | |
flex: 0 0 20%; | |
} | |
#main > aside:first-of-type { | |
order: -1; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
URL: https://levelup.gitconnected.com/clean-application-flexible-box-layout-98e439bb7d96