Skip to content

Instantly share code, notes, and snippets.

@itsamoreh
Last active May 22, 2024 18:32
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 from https://itsamoreh.dev/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.
See https://itsamoreh.dev/full-height-layouts-in-wordpress-block-themes/
*/
.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