Twenty Fourteen: fill browser height to 100% for views with short content. Accounts for footer widgets, in which case the height isn't set to 100% so that the widgets remain visible. Props wycks and taupecat, fixes #25389.

git-svn-id: https://develop.svn.wordpress.org/trunk@25736 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Lance Willett 2013-10-08 21:36:46 +00:00
parent 7771626637
commit 66c2dfbae9
2 changed files with 8 additions and 0 deletions

View File

@ -459,6 +459,7 @@ add_action( 'pre_get_posts', 'twentyfourteen_pre_get_posts' );
* 1. Single or multiple authors.
* 2. Index views.
* 3. Full-width content layout.
* 4. Presence of footer widgets.
*
* @param array $classes A list of existing body class values.
* @return array The filtered body class list.
@ -476,6 +477,9 @@ function twentyfourteen_body_classes( $classes ) {
|| is_attachment() )
$classes[] = 'full-width';
if ( is_active_sidebar( 'sidebar-4' ) )
$classes[] = 'footer-widgets';
return $classes;
}
add_filter( 'body_class', 'twentyfourteen_body_classes' );

View File

@ -2517,9 +2517,13 @@ span > object {
float: left;
line-height: 1.6363636363;
margin: 0 0 0 -100%;
min-height: 100vh;
padding: 0 27px;
width: 128px;
}
body.footer-widgets #secondary {
min-height: 0;
}
.site-description {
display: block;
line-height: 1.6363636363;