Last active
December 16, 2016 00:27
-
-
Save joelstransky/4fd79bca8994ab2640b78f0ba124bf79 to your computer and use it in GitHub Desktop.
Sticky footer for WordPress
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
| /** | |
| * https://philipwalton.com/articles/normalizing-cross-browser-flexbox-bugs/ | |
| * 1. Avoid the IE 10-11 `min-height` bug. | |
| * 2. Set `flex-shrink` to `0` to prevent Chrome, Opera, and Safari from | |
| * letting these items shrink to smaller than their content's default | |
| * minimum size. | |
| */ | |
| .Site { | |
| display: flex; | |
| flex-direction: column; | |
| height: 100vh; /* 1 */ | |
| &.admin-bar { | |
| height: calc(100vh - 32px); | |
| @media screen and ( max-width: 782px ) { | |
| height: calc(100vh - 46px); | |
| } | |
| } | |
| } | |
| .Site-header, | |
| .Site-footer { | |
| flex-shrink: 0; /* 2 */ | |
| } | |
| .Site-content { | |
| flex: 1 0 auto; /* 2 */ | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment