Make WordPress Core

Changeset 47771


Ignore:
Timestamp:
05/06/2020 08:13:38 PM (7 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
Files:
1 deleted
25 edited

Legend:

Unmodified
Added
Removed
  • trunk/Gruntfile.js

    r47497 r47771  
    414414                cssmin: {
    415415                        options: {
    416                                 compatibility: 'ie7'
     416                                compatibility: 'ie11'
    417417                        },
    418418                        core: {
  • trunk/src/js/_enqueues/admin/common.js

    r47122 r47771  
    475475                isIOS = /iPhone|iPad|iPod/.test( navigator.userAgent ),
    476476                isAndroid = navigator.userAgent.indexOf( 'Android' ) !== -1,
    477                 isIE8 = $( document.documentElement ).hasClass( 'ie8' ),
    478477                $adminMenuWrap = $( '#adminmenuwrap' ),
    479478                $wpwrap = $( '#wpwrap' ),
    … …  
    10611060                        resizing = ! event || event.type !== 'scroll';
    10621061
    1063                 if ( isIOS || isIE8 || $adminmenu.data( 'wp-responsive' ) ) {
     1062                if ( isIOS || $adminmenu.data( 'wp-responsive' ) ) {
    10641063                        return;
    10651064                }
  • trunk/src/js/_enqueues/lib/admin-bar.js

    r47122 r47771  
    2323                        skipLink,
    2424                        mobileEvent,
    25                         fontFaceRegex,
    2625                        adminBarSearchInput,
    2726                        i;
    … …  
    3837                skipLink = adminBar.querySelector( '.screen-reader-shortcut' );
    3938                mobileEvent = /Mobile\/.+Safari/.test( navigator.userAgent ) ? 'touchstart' : 'click';
    40                 fontFaceRegex = /Android (1.0|1.1|1.5|1.6|2.0|2.1)|Nokia|Opera Mini|w(eb)?OSBrowser|webOS|UCWEB|Windows Phone OS 7|XBLWP7|ZuneWP7|MSIE 7/;
    4139
    4240                // Remove nojs class after the DOM is loaded.
    … …  
    110108                if ( window.location.hash ) {
    111109                        window.scrollBy( 0, -32 );
    112                 }
    113 
    114                 // Add no-font-face class to body if needed.
    115                 if (
    116                         navigator.userAgent &&
    117                         fontFaceRegex.test( navigator.userAgent ) &&
    118                         ! hasClass( document.body, 'no-font-face' )
    119                 ) {
    120                         addClass( document.body, 'no-font-face' );
    121110                }
    122111
  • trunk/src/wp-admin/admin-header.php

    r47745 r47771  
    7676
    7777wp_enqueue_style( 'colors' );
    78 wp_enqueue_style( 'ie' );
    7978wp_enqueue_script( 'utils' );
    8079wp_enqueue_script( 'svg-painter' );
  • trunk/src/wp-admin/css/admin-menu.css

    r47745 r47771  
    392392}
    393393
    394 /* IE8 doesn't redraw the pseudo elements unless you make a change to the content, this restore the initial color after hover */
    395 .ie8 #adminmenu li.opensub div.wp-menu-image:before {
    396         color: #a0a5aa;
    397 }
    398 
    399394.folded #adminmenu div.wp-menu-image {
    400395        width: 35px;
    … …  
    407402        height: 34px;
    408403}
    409 
    410 /* No @font-face support */
    411 .no-font-face #adminmenu .wp-menu-image {
    412         display: none;
    413 }
    414 
    415 .no-font-face #adminmenu div.wp-menu-name {
    416         padding: 8px 12px;
    417 }
    418 
    419 .no-font-face.auto-fold #adminmenu .wp-menu-name {
    420         margin-left: 0;
    421 }
    422 /* End no @font-face support */
    423404
    424405/* Sticky admin menu */
  • trunk/src/wp-admin/css/colors/_admin.scss

    r46967 r47771  
    271271#adminmenu li:hover div.wp-menu-image:before,
    272272#adminmenu li a:focus div.wp-menu-image:before,
    273 #adminmenu li.opensub div.wp-menu-image:before,
    274 .ie8 #adminmenu li.opensub div.wp-menu-image:before {
     273#adminmenu li.opensub div.wp-menu-image:before {
    275274        color: $menu-current-icon;
    276275}
  • trunk/src/wp-admin/css/common.css

    r47751 r47771  
    280280}
    281281
    282 .ie8 a:focus {
    283         outline: #5b9dd9 solid 1px;
    284 }
    285 
    286282#adminmenu a:focus {
    287283        box-shadow: none;
    … …  
    14421438}
    14431439
    1444 .ie8 .notice-dismiss:focus {
    1445         outline: 1px solid #5b9dd9;
    1446 }
    1447 
    14481440.notice-success,
    14491441div.updated {
    … …  
    17651757        font-size: 13px;
    17661758        font-weight: 600;
    1767 }
    1768 
    1769 .ie8 #screen-options-wrap legend {
    1770         color: inherit;
    17711759}
    17721760
    … …  
    22482236}
    22492237
    2250 .ie8 .nav-tab-wrapper {
    2251         /* contain floats establishing a new block formatting context */
    2252         display: inline-block;
    2253         width: 100%;
    2254         vertical-align: top;
    2255 }
    2256 
    22572238/*------------------------------------------------------------------------------
    22582239  26.0 - Misc
  • trunk/src/wp-admin/css/customize-nav-menus.css

    r45129 r47771  
    476476}
    477477
    478 .ie8 .menu-item-bar .item-delete:before {
    479         top: -10px;
    480 }
    481 
    482478.menu-item-bar .item-delete:hover,
    483479.menu-item-bar .item-delete:focus {
  • trunk/src/wp-admin/css/dashboard.css

    r47592 r47771  
    3737#dashboard-widgets-wrap .columns-3 #postbox-container-4 .empty-container {
    3838        border: none !important;
    39 }
    40 
    41 .ie8 #wpbody-content #dashboard-widgets .postbox-container {
    42         width: 49.5%;
    43 }
    44 
    45 .ie8 #wpbody-content #dashboard-widgets #postbox-container-2,
    46 .ie8 #wpbody-content #dashboard-widgets #postbox-container-3,
    47 .ie8 #wpbody-content #dashboard-widgets #postbox-container-4 {
    48         float: right;
    49         width: 50.5%;
    50 }
    51 
    52 .ie8 #dashboard-widgets #postbox-container-3 .empty-container,
    53 .ie8 #dashboard-widgets #postbox-container-4 .empty-container {
    54         border: 0 none;
    55         height: 0;
    56         min-height: 0;
    5739}
    5840
    … …  
    179161        min-width: 200px;
    180162        float: left;
    181 }
    182 
    183 .ie8 .welcome-panel .welcome-panel-column {
    184         min-width: 230px;
    185163}
    186164
  • trunk/src/wp-admin/css/edit.css

    r47572 r47771  
    634634#poststuff .inside #page_template {
    635635        max-width: 100%;
    636 }
    637 
    638 .ie8 #poststuff .inside #parent_id,
    639 .ie8 #poststuff .inside #page_template {
    640         width: 250px;
    641636}
    642637
  • trunk/src/wp-admin/css/install.css

    r47746 r47771  
    2929                0 0 0 1px #5b9dd9,
    3030                0 0 2px 1px rgba(30, 140, 190, 0.8);
    31 }
    32 
    33 .ie8 a:focus {
    34         outline: #5b9dd9 solid 1px;
    3531}
    3632
  • trunk/src/wp-admin/css/list-tables.css

    r47340 r47771  
    6161        line-height: 1.90909090;
    6262        text-align: center;
    63 }
    64 
    65 .ie8 .column-response .comment-count-no-comments,
    66 .ie8 .column-response .comment-count-approved,
    67 .ie8 .column-comments .comment-count-no-comments,
    68 .ie8 .column-comments .comment-count-approved {
    69         min-width: 0;
    7063}
    7164
    … …  
    514507}
    515508
    516 .ie8 .wp-list-table .toggle-row:focus:before {
    517         outline: #5b9dd9 solid 1px;
    518 }
    519 
    520509.wp-list-table .toggle-row:active {
    521510        box-shadow: none;
    … …  
    10811070}
    10821071
    1083 .ie8 .inline-edit-row #post_parent,
    1084 .ie8 .inline-edit-row select[name="page_template"] {
    1085         width: 250px;
    1086 }
    1087 
    10881072.quick-edit-row-post fieldset label.inline-edit-status {
    10891073        float: left;
  • trunk/src/wp-admin/css/revisions.css

    r45729 r47771  
    8080        top: calc( 50% - 10px );
    8181        transition: opacity 0.5s;
    82         filter: alpha(opacity=0); /* ie8 and earlier */
    8382}
    8483
    … …  
    9594.revisions.loading .loading-indicator {
    9695        opacity: 1;
    97         filter: alpha(opacity=100); /* ie8 and earlier */
    9896}
    9997
    … …  
    104102.revisions.loading .diff {
    105103        opacity: 0.5;
    106         filter: alpha(opacity=50); /* ie8 and earlier */
    107104}
    108105
    … …  
    386383}
    387384
    388 .ie8 .revisions-tooltip-arrow > span {
    389         left: 15px;
    390         top: -25px;
    391         -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand', M11=0.7071067811865476, M12=-0.7071067811865475, M21=0.7071067811865475, M22=0.7071067811865476)";
    392 }
    393 
    394 .ie8 .revisions-tooltip.flipped .revisions-tooltip-arrow > span {
    395         right: 25px;
    396 }
    397 
    398385.revisions-tooltip,
    399386.revisions-tooltip-arrow > span {
  • trunk/src/wp-admin/css/themes.css

    r47750 r47771  
    6060        box-shadow: 0 1px 1px -1px rgba(0, 0, 0, 0.1);
    6161        box-sizing: border-box;
    62 }
    63 
    64 .ie8 .theme-browser .theme {
    65         width: 30%;
    66         margin: 0 3% 4% 0;
    6762}
    6863
    … …  
    503498        box-sizing: border-box;
    504499        border-top: 1px solid #eee;
    505 }
    506 
    507 .ie8 .theme-overlay .theme-actions {
    508         border: 1px solid #eee;
    509500}
    510501
  • trunk/src/wp-admin/includes/media.php

    r47550 r47771  
    527527                wp_enqueue_style( 'deprecated-media' );
    528528        }
    529         wp_enqueue_style( 'ie' );
    530529
    531530        ?>
  • trunk/src/wp-admin/includes/template.php

    r47557 r47771  
    24432443        ?>
    24442444<!DOCTYPE html>
    2445 <!--[if IE 8]>
    2446 <html xmlns="http://www.w3.org/1999/xhtml" class="ie8 <?php echo $admin_html_class; ?>"
    2447         <?php
    2448         /**
    2449          * Fires inside the HTML tag in the admin header.
    2450          *
    2451          * @since 2.2.0
    2452          */
    2453         do_action( 'admin_xml_ns' );
    2454 
    2455         language_attributes();
    2456         ?>
    2457         >
    2458 <![endif]-->
    2459 <!--[if !(IE 8) ]><!-->
    24602445<html xmlns="http://www.w3.org/1999/xhtml" class="<?php echo $admin_html_class; ?>"
    24612446        <?php
    … …  
    24652450        language_attributes();
    24662451        ?>
    2467         >
    2468 <!--<![endif]-->
     2452>
    24692453<head>
    24702454<meta http-equiv="Content-Type" content="<?php bloginfo( 'html_type' ); ?>; charset=<?php echo get_option( 'blog_charset' ); ?>" />
  • trunk/src/wp-admin/includes/update-core.php

    r47550 r47771  
    793793        'wp-admin/js/wp-fullscreen-stub.js',
    794794        'wp-admin/js/wp-fullscreen-stub.min.js',
     795        // 5.5
     796        'wp-admin/css/ie.css',
     797        'wp-admin/css/ie.min.css',
     798        'wp-admin/css/ie-rtl.css',
     799        'wp-admin/css/ie-rtl.min.css',
    795800);
    796801
  • trunk/src/wp-admin/upgrade.php

    r47230 r47771  
    6363        <meta name="robots" content="noindex,nofollow" />
    6464        <title><?php _e( 'WordPress &rsaquo; Update' ); ?></title>
    65         <?php
    66         wp_admin_css( 'install', true );
    67         wp_admin_css( 'ie', true );
    68         ?>
     65        <?php wp_admin_css( 'install', true ); ?>
    6966</head>
    7067<body class="wp-core-ui">
  • 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}
  • trunk/src/wp-login.php

    r47232 r47771  
    8787
    8888        ?><!DOCTYPE html>
    89         <!--[if IE 8]>
    90                 <html xmlns="http://www.w3.org/1999/xhtml" class="ie8" <?php language_attributes(); ?>>
    91         <![endif]-->
    92         <!--[if !(IE 8) ]><!-->
    93                 <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
    94         <!--<![endif]-->
     89        <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
    9590        <head>
    9691        <meta http-equiv="Content-Type" content="<?php bloginfo( 'html_type' ); ?>; charset=<?php bloginfo( 'charset' ); ?>" />
Note: See TracChangeset for help on using the changeset viewer.