Make WordPress Core

Changeset 39215


Ignore:
Timestamp:
11/13/2016 11:30:53 PM (8 years ago)
Author:
davidakennedy
Message:

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.

Location:
trunk/src/wp-content/themes/twentyseventeen
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyseventeen/functions.php

    r39208 r39215  
    357357    }
    358358
     359    // Load the Internet Explorer 9 specific stylesheet, to fix display issues in the Customizer.
     360    if ( is_customize_preview() ) {
     361        wp_enqueue_style( 'twentyseventeen-ie9', get_theme_file_uri( '/assets/css/ie9.css' ), array( 'twentyseventeen-style' ), '1.0' );
     362        wp_style_add_data( 'twentyseventeen-ie9', 'conditional', 'IE 9' );
     363    }
     364
    359365    // Load the Internet Explorer 8 specific stylesheet.
    360366    wp_enqueue_style( 'twentyseventeen-ie8', get_theme_file_uri( '/assets/css/ie8.css' ), array( 'twentyseventeen-style' ), '1.0' );
Note: See TracChangeset for help on using the changeset viewer.