From d902f1f16786d38d4fb43abe76688fd3f4be2bdc Mon Sep 17 00:00:00 2001 From: "David A. Kennedy" Date: Sun, 13 Nov 2016 23:31:31 +0000 Subject: [PATCH] Twenty Seventeen: Fix Customizer preview display issues in IE9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../themes/twentyseventeen/assets/css/ie9.css | 37 +++++++++++++++++++ .../themes/twentyseventeen/functions.php | 6 +++ wp-includes/version.php | 2 +- 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 wp-content/themes/twentyseventeen/assets/css/ie9.css diff --git a/wp-content/themes/twentyseventeen/assets/css/ie9.css b/wp-content/themes/twentyseventeen/assets/css/ie9.css new file mode 100644 index 0000000000..24c8905162 --- /dev/null +++ b/wp-content/themes/twentyseventeen/assets/css/ie9.css @@ -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; + } +} diff --git a/wp-content/themes/twentyseventeen/functions.php b/wp-content/themes/twentyseventeen/functions.php index 7b4b34e989..5c176f2a88 100644 --- a/wp-content/themes/twentyseventeen/functions.php +++ b/wp-content/themes/twentyseventeen/functions.php @@ -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' ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 89a95fedab..eef1cab1d6 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.