mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Twenty Seventeen: Fix Customizer preview display issues in IE9
IE9 doesn't understands `vh ` (vertical height) when inside of an `iframe`. Normally IE9 will understand `vh` as the vertical height relative to the viewport, but in an `iframe`, IE9 thinks the vertical height is relative to the size of the whole page. So this fixes that when the site is viewed in the Customizer preview – an `iframe`. Props laurelfulford. Fixes #38722. Built from https://develop.svn.wordpress.org/trunk@39215 git-svn-id: http://core.svn.wordpress.org/trunk@39155 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
fd166077ad
commit
d902f1f167
37
wp-content/themes/twentyseventeen/assets/css/ie9.css
Normal file
37
wp-content/themes/twentyseventeen/assets/css/ie9.css
Normal file
@ -0,0 +1,37 @@
|
||||
/*
|
||||
Theme Name: Twenty Seventeen
|
||||
Description: IE9 specific styles.
|
||||
*/
|
||||
|
||||
.has-header-image.twentyseventeen-front-page .custom-header,
|
||||
.has-header-image.home.blog .custom-header {
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
.has-header-image .custom-header-image img,
|
||||
.has-header-image .custom-header-image video,
|
||||
.has-header-image .custom-header-image iframe {
|
||||
min-width: 100%;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 30em) {
|
||||
|
||||
.has-header-image.twentyseventeen-front-page .custom-header,
|
||||
.has-header-image.home.blog .custom-header,
|
||||
.twentyseventeen-front-page.has-header-image .custom-header-image,
|
||||
.home.blog.has-header-image .custom-header-image,
|
||||
.panel-image {
|
||||
height: 700px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 48em) {
|
||||
|
||||
.has-header-image.twentyseventeen-front-page .custom-header,
|
||||
.has-header-image.home.blog .custom-header,
|
||||
.twentyseventeen-front-page.has-header-image .custom-header-image,
|
||||
.home.blog.has-header-image .custom-header-image,
|
||||
.panel-image {
|
||||
height: 1000px;
|
||||
}
|
||||
}
|
@ -356,6 +356,12 @@ function twentyseventeen_scripts() {
|
||||
wp_enqueue_style( 'twentyseventeen-colors-dark', get_theme_file_uri( '/assets/css/colors-dark.css' ), array( 'twentyseventeen-style' ), '1.0' );
|
||||
}
|
||||
|
||||
// Load the Internet Explorer 9 specific stylesheet, to fix display issues in the Customizer.
|
||||
if ( is_customize_preview() ) {
|
||||
wp_enqueue_style( 'twentyseventeen-ie9', get_theme_file_uri( '/assets/css/ie9.css' ), array( 'twentyseventeen-style' ), '1.0' );
|
||||
wp_style_add_data( 'twentyseventeen-ie9', 'conditional', 'IE 9' );
|
||||
}
|
||||
|
||||
// Load the Internet Explorer 8 specific stylesheet.
|
||||
wp_enqueue_style( 'twentyseventeen-ie8', get_theme_file_uri( '/assets/css/ie8.css' ), array( 'twentyseventeen-style' ), '1.0' );
|
||||
wp_style_add_data( 'twentyseventeen-ie8', 'conditional', 'lt IE 9' );
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.7-beta3-39214';
|
||||
$wp_version = '4.7-beta3-39215';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user