Make WordPress Core


Ignore:
Timestamp:
05/06/2020 08:13:38 PM (5 years ago)
Author:
ocean90
Message:

Administration: Remove any CSS related to Internet Explorer versions 6 – 10.

In WordPress 3.2 support for IE6 was dropped, IE7 followed a few versions later. With the 4.8 release, WordPress officially ended support for Internet Explorer versions 8, 9, and 10. Yet, we still have shipped CSS for the unsupported IE versions....until now! Goodbye to ie.css and star hacks!

  • Removes ie.css and ie style handle.
  • Removes IE specific class names and any related CSS.
  • Drops support for IE8 and older in wp_customize_support_script().
  • Updates compatibility mode for CSS minification to ie11.

Props ayeshrajans, isabel_brison, afercia, netweb, peterwilsoncc, ocean90.
Fixes #17232, #46015.

Location:
trunk/src/wp-includes
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-admin-bar.php

    r47219 r47771  
    425425
    426426    /**
    427      * @global bool $is_IE
    428427     * @param object $root
    429428     */
    430429    final protected function _render( $root ) {
    431         global $is_IE;
    432 
    433430        // Add browser classes.
    434431        // We have to do this here since admin bar shows on the front end.
    435432        $class = 'nojq nojs';
    436         if ( $is_IE ) {
    437             if ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 7' ) ) {
    438                 $class .= ' ie7';
    439             } elseif ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 8' ) ) {
    440                 $class .= ' ie8';
    441             } elseif ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 9' ) ) {
    442                 $class .= ' ie9';
    443             }
    444         } elseif ( wp_is_mobile() ) {
     433        if ( wp_is_mobile() ) {
    445434            $class .= ' mobile';
    446435        }
  • trunk/src/wp-includes/css/admin-bar.css

    r45930 r47771  
    148148    position: absolute;
    149149    float: none;
    150 }
    151 
    152 #wpadminbar.ie7 .menupop .ab-sub-wrapper,
    153 #wpadminbar.ie7 .shortlink-input {
    154     top: 32px;
    155     left: 0;
    156150}
    157151
     
    423417}
    424418
    425 #wpadminbar.ie8 #wp-admin-bar-my-account.with-avatar .ab-item {
    426     white-space: nowrap;
    427 }
    428 
    429419#wpadminbar #wp-admin-bar-user-actions > li {
    430420    margin-left: 16px;
     
    490480}
    491481
    492 #wpadminbar.ie8 #wp-admin-bar-my-account.with-avatar > .ab-empty-item img,
    493 #wpadminbar.ie8 #wp-admin-bar-my-account.with-avatar > a img {
    494     width: auto;
    495 }
    496 
    497482/**
    498483 * WP Logo
     
    607592 * Search
    608593 */
    609 #wpadminbar.ie8 #wp-admin-bar-search {
    610     display: block;
    611     min-width: 32px;
    612 }
     594
    613595#wpadminbar #wp-admin-bar-search .ab-item {
    614596    padding: 0;
     
    671653}
    672654
    673 #wpadminbar.ie7 > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input {
    674     margin-top: 3px;
    675     width: 120px;
    676 }
    677 
    678 #wpadminbar.ie8 > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input {
    679     /* IE8 z-index bug with transparent / empty elements - fill in with an encoded transparent GIF */
    680     background: transparent 0 0 repeat scroll url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
    681 }
    682 
    683 /* IE8 doesn't redraw the pseudo elements unless you make a change to the content */
    684 #wpadminbar.ie8 #adminbarsearch.adminbar-focused:before {
    685     content: "\f179 "; /* extra space */
    686 }
    687 
    688 #wpadminbar.ie8 > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input:focus {
    689     background: #fff;
    690     z-index: -1;
    691 }
    692 
    693655#wpadminbar #adminbarsearch .adminbar-button {
    694656    display: none;
     
    747709}
    748710
    749 /**
    750  * IE 6-targeted rules
    751  */
    752 * html #wpadminbar {
    753     overflow: hidden;
    754     position: absolute;
    755 }
    756 
    757 * html #wpadminbar .quicklinks ul li a {
    758     float: left;
    759 }
    760 
    761 * html #wpadminbar .menupop a span {
    762     background-image: none;
    763 }
    764 
    765 /* No @font-face support */
    766 .no-font-face #wpadminbar ul.ab-top-menu > li > a.ab-item {
    767     display: block;
    768     width: 45px;
    769     text-align: center;
    770     overflow: hidden;
    771     margin: 0 3px;
    772 }
    773 
    774 .no-font-face #wpadminbar #wp-admin-bar-my-sites > .ab-item,
    775 .no-font-face #wpadminbar #wp-admin-bar-site-name > .ab-item,
    776 .no-font-face #wpadminbar #wp-admin-bar-edit > .ab-item {
    777     text-indent: 0;
    778 }
    779 
    780 .no-font-face #wpadminbar .ab-icon,
    781 .no-font-face #wpadminbar .ab-icon:before,
    782 .no-font-face #wpadminbar a.ab-item:before,
    783 .no-font-face #wpadminbar #wp-admin-bar-wp-logo > .ab-item {
    784     display: none !important;
    785 }
    786 
    787 .no-font-face #wpadminbar ul.ab-top-menu > li > a > span.ab-label {
    788     display: inline;
    789 }
    790 
    791 .no-font-face #wpadminbar #wp-admin-bar-menu-toggle span.ab-icon {
    792     display: inline !important;
    793 }
    794 
    795 .no-font-face #wpadminbar #wp-admin-bar-menu-toggle span.ab-icon:before {
    796     content: "Menu";
    797     font: 14px/45px sans-serif !important;
    798     display: inline-block !important;
    799     color: #fff;
    800 }
    801 
    802 .no-font-face #wpadminbar #wp-admin-bar-site-name a.ab-item {
    803     color: #fff;
    804 }
    805 /* End no @font-face */
    806 
    807711@media screen and (max-width: 782px) {
    808712    /* Toolbar Touchification*/
  • trunk/src/wp-includes/css/buttons.css

    r46866 r47771  
    234234}
    235235
    236 .ie8 .wp-core-ui .button-link:focus {
    237     outline: #5b9dd9 solid 1px;
    238 }
    239236
    240237/* ----------------------------------------------------------------------------
  • trunk/src/wp-includes/media-template.php

    r47202 r47771  
    153153 *
    154154 * @since 3.5.0
    155  *
    156  * @global bool $is_IE
    157155 */
    158156function wp_print_media_templates() {
    159     global $is_IE;
    160157    $class = 'media-modal wp-core-ui';
    161     if ( $is_IE && strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 7' ) !== false ) {
    162         $class .= ' ie7';
    163     }
    164158
    165159    $alt_text_description = sprintf(
  • trunk/src/wp-includes/script-loader.php

    r47572 r47771  
    16921692    $styles->add( 'install', "/wp-admin/css/install$suffix.css", array( 'dashicons', 'buttons', 'forms', 'l10n' ) );
    16931693    $styles->add( 'wp-color-picker', "/wp-admin/css/color-picker$suffix.css" );
    1694     $styles->add( 'customize-controls', "/wp-admin/css/customize-controls$suffix.css", array( 'wp-admin', 'colors', 'ie', 'imgareaselect' ) );
     1694    $styles->add( 'customize-controls', "/wp-admin/css/customize-controls$suffix.css", array( 'wp-admin', 'colors', 'imgareaselect' ) );
    16951695    $styles->add( 'customize-widgets', "/wp-admin/css/customize-widgets$suffix.css", array( 'wp-admin', 'colors' ) );
    16961696    $styles->add( 'customize-nav-menus', "/wp-admin/css/customize-nav-menus$suffix.css", array( 'wp-admin', 'colors' ) );
    1697 
    1698     $styles->add( 'ie', "/wp-admin/css/ie$suffix.css" );
    1699     $styles->add_data( 'ie', 'conditional', 'lte IE 7' );
    17001697
    17011698    // Common dependencies.
     
    18111808        'customize-nav-menus',
    18121809        'customize-preview',
    1813         'ie',
    18141810        'login',
    18151811        'site-health',
  • trunk/src/wp-includes/theme.php

    r47573 r47771  
    33183318 * @since 3.4.0
    33193319 * @since 4.7.0 Support for IE8 and below is explicitly removed via conditional comments.
     3320 * @since 5.5.0 IE8 and older are no longer supported.
    33203321 */
    33213322function wp_customize_support_script() {
     
    33253326    $type_attr    = current_theme_supports( 'html5', 'script' ) ? '' : ' type="text/javascript"';
    33263327    ?>
    3327     <!--[if lte IE 8]>
    3328         <script<?php echo $type_attr; ?>>
    3329             document.body.className = document.body.className.replace( /(^|\s)(no-)?customize-support(?=\s|$)/, '' ) + ' no-customize-support';
    3330         </script>
    3331     <![endif]-->
    3332     <!--[if gte IE 9]><!-->
    3333         <script<?php echo $type_attr; ?>>
    3334             (function() {
    3335                 var request, b = document.body, c = 'className', cs = 'customize-support', rcs = new RegExp('(^|\\s+)(no-)?'+cs+'(\\s+|$)');
    3336 
    3337         <?php   if ( $cross_domain ) : ?>
    3338                 request = (function(){ var xhr = new XMLHttpRequest(); return ('withCredentials' in xhr); })();
    3339         <?php   else : ?>
    3340                 request = true;
    3341         <?php   endif; ?>
    3342 
    3343                 b[c] = b[c].replace( rcs, ' ' );
    3344                 // The customizer requires postMessage and CORS (if the site is cross domain).
    3345                 b[c] += ( window.postMessage && request ? ' ' : ' no-' ) + cs;
    3346             }());
    3347         </script>
    3348     <!--<![endif]-->
     3328    <script<?php echo $type_attr; ?>>
     3329        (function() {
     3330            var request, b = document.body, c = 'className', cs = 'customize-support', rcs = new RegExp('(^|\\s+)(no-)?'+cs+'(\\s+|$)');
     3331
     3332    <?php   if ( $cross_domain ) : ?>
     3333            request = (function(){ var xhr = new XMLHttpRequest(); return ('withCredentials' in xhr); })();
     3334    <?php   else : ?>
     3335            request = true;
     3336    <?php   endif; ?>
     3337
     3338            b[c] = b[c].replace( rcs, ' ' );
     3339            // The customizer requires postMessage and CORS (if the site is cross domain).
     3340            b[c] += ( window.postMessage && request ? ' ' : ' no-' ) + cs;
     3341        }());
     3342    </script>
    33493343    <?php
    33503344}
Note: See TracChangeset for help on using the changeset viewer.