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.

Built from https://develop.svn.wordpress.org/trunk@25736


git-svn-id: http://core.svn.wordpress.org/trunk@25649 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Lance Willett 2013-10-08 21:37:09 +00:00
parent c78cbb19ce
commit 8816dd8108
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. * 1. Single or multiple authors.
* 2. Index views. * 2. Index views.
* 3. Full-width content layout. * 3. Full-width content layout.
* 4. Presence of footer widgets.
* *
* @param array $classes A list of existing body class values. * @param array $classes A list of existing body class values.
* @return array The filtered body class list. * @return array The filtered body class list.
@ -476,6 +477,9 @@ function twentyfourteen_body_classes( $classes ) {
|| is_attachment() ) || is_attachment() )
$classes[] = 'full-width'; $classes[] = 'full-width';
if ( is_active_sidebar( 'sidebar-4' ) )
$classes[] = 'footer-widgets';
return $classes; return $classes;
} }
add_filter( 'body_class', 'twentyfourteen_body_classes' ); add_filter( 'body_class', 'twentyfourteen_body_classes' );

View File

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