Make WordPress Core

Changeset 22201


Ignore:
Timestamp:
10/11/2012 10:07:06 PM (12 years ago)
Author:
lancewillett
Message:

Twenty Twelve: implement better support for IE7 and IE8 (don't use mobile menu). See #22044.

Location:
trunk/wp-content/themes/twentytwelve
Files:
2 added
3 edited

Legend:

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

    r22066 r22201  
    8989 */
    9090function twentytwelve_scripts_styles() {
     91    global $wp_styles;
     92
    9193    /*
    9294     * Adds JavaScript to pages with the comment form to support
     
    142144     */
    143145    wp_enqueue_style( 'twentytwelve-style', get_stylesheet_uri() );
     146
     147    /*
     148     * Loads the Internet Explorer specific stylesheet.
     149     */
     150    wp_enqueue_style( 'twentytwelve-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentytwelve-style' ), '20121010' );
     151    $wp_styles->add_data( 'twentytwelve-ie', 'conditional', 'lt IE 9' );
    144152}
    145153add_action( 'wp_enqueue_scripts', 'twentytwelve_scripts_styles' );
  • trunk/wp-content/themes/twentytwelve/header.php

    r22186 r22201  
    1010 */
    1111?><!DOCTYPE html>
    12 <!--[if IE 7 | IE 8]>
    13 <html class="ie" <?php language_attributes(); ?>>
     12<!--[if IE 7]>
     13<html class="ie ie7" <?php language_attributes(); ?>>
     14<![endif]-->
     15<!--[if IE 8]>
     16<html class="ie ie8" <?php language_attributes(); ?>>
    1417<![endif]-->
    1518<!--[if !(IE 7) | !(IE 8)  ]><!-->
  • trunk/wp-content/themes/twentytwelve/style.css

    r22191 r22201  
    483483}
    484484
    485 
    486485/* Page structure */
    487486.site {
     
    16601659    }
    16611660}
    1662 
    1663 
    1664 /* =IE 7 and 8
    1665 ----------------------------------------------- */
    1666 
    1667 .ie .assistive-text {
    1668     clip: rect(1px 1px 1px 1px); /* IE7 */
    1669 }
    1670 .ie .site {
    1671     margin: 48px auto;
    1672     max-width: 960px;
    1673 }
    1674 .ie .site-content {
    1675     float: left;
    1676     width: 65.104166667%;
    1677 }
    1678 .ie .full-width .site-content {
    1679     float: none;
    1680     width: 100%;
    1681 }
    1682 .ie .widget-area {
    1683     float: right;
    1684     width: 26.041666667%;
    1685 }
    1686 .ie img.size-full,
    1687 .ie img.size-large,
    1688 .ie img.header-image,
    1689 .ie img.wp-post-image {
    1690     width: auto; /* Prevent stretching of full-size and large-size images with height and width attributes in IE8 */
    1691 }
Note: See TracChangeset for help on using the changeset viewer.