Skip to content

Instantly share code, notes, and snippets.

@itsamoreh
Created November 10, 2023 07:25
Show Gist options
  • Save itsamoreh/b934159977313b7098e1435c289d2172 to your computer and use it in GitHub Desktop.
Save itsamoreh/b934159977313b7098e1435c289d2172 to your computer and use it in GitHub Desktop.
Full height layouts in WordPress block themes
/*
Global WordPress Layout
Ensures that the footer is always at the bottom of
the page even if the page doesn't have enough content.
*/
.wp-site-blocks {
display: flex;
flex-direction: column;
min-height: 100svh;
.site-footer {
margin-top: auto;
}
}
.admin-bar .wp-site-blocks {
min-height: calc(100svh - var(--wp-admin--admin-bar--height));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment