Skip to content

Commit

Permalink
Administration: Remove any CSS related to Internet Explorer versions …
Browse files Browse the repository at this point in the history
…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.

git-svn-id: https://develop.svn.wordpress.org/trunk@47771 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
ocean90 committed May 6, 2020
1 parent 26439dd commit 3d31284
Show file tree
Hide file tree
Showing 26 changed files with 30 additions and 1,065 deletions.
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ module.exports = function(grunt) {
},
cssmin: {
options: {
compatibility: 'ie7'
compatibility: 'ie11'
},
core: {
expand: true,
Expand Down
3 changes: 1 addition & 2 deletions src/js/_enqueues/admin/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,6 @@ $document.ready( function() {
currentPage = pageInput.val(),
isIOS = /iPhone|iPad|iPod/.test( navigator.userAgent ),
isAndroid = navigator.userAgent.indexOf( 'Android' ) !== -1,
isIE8 = $( document.documentElement ).hasClass( 'ie8' ),
$adminMenuWrap = $( '#adminmenuwrap' ),
$wpwrap = $( '#wpwrap' ),
$adminmenu = $( '#adminmenu' ),
Expand Down Expand Up @@ -1060,7 +1059,7 @@ $document.ready( function() {
var windowPos = $window.scrollTop(),
resizing = ! event || event.type !== 'scroll';

if ( isIOS || isIE8 || $adminmenu.data( 'wp-responsive' ) ) {
if ( isIOS || $adminmenu.data( 'wp-responsive' ) ) {
return;
}

Expand Down
11 changes: 0 additions & 11 deletions src/js/_enqueues/lib/admin-bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
shortlink,
skipLink,
mobileEvent,
fontFaceRegex,
adminBarSearchInput,
i;

Expand All @@ -37,7 +36,6 @@
shortlink = document.getElementById( 'wp-admin-bar-get-shortlink' );
skipLink = adminBar.querySelector( '.screen-reader-shortcut' );
mobileEvent = /Mobile\/.+Safari/.test( navigator.userAgent ) ? 'touchstart' : 'click';
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/;

// Remove nojs class after the DOM is loaded.
removeClass( adminBar, 'nojs' );
Expand Down Expand Up @@ -111,15 +109,6 @@
window.scrollBy( 0, -32 );
}

// Add no-font-face class to body if needed.
if (
navigator.userAgent &&
fontFaceRegex.test( navigator.userAgent ) &&
! hasClass( document.body, 'no-font-face' )
) {
addClass( document.body, 'no-font-face' );
}

// Clear sessionStorage on logging out.
if ( adminBarLogout ) {
adminBarLogout.addEventListener( 'click', emptySessionStorage );
Expand Down
1 change: 0 additions & 1 deletion src/wp-admin/admin-header.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
<?php

wp_enqueue_style( 'colors' );
wp_enqueue_style( 'ie' );
wp_enqueue_script( 'utils' );
wp_enqueue_script( 'svg-painter' );

Expand Down
19 changes: 0 additions & 19 deletions src/wp-admin/css/admin-menu.css
Original file line number Diff line number Diff line change
Expand Up @@ -391,11 +391,6 @@ div.wp-menu-image:before {
color: #00b9eb;
}

/* IE8 doesn't redraw the pseudo elements unless you make a change to the content, this restore the initial color after hover */
.ie8 #adminmenu li.opensub div.wp-menu-image:before {
color: #a0a5aa;
}

.folded #adminmenu div.wp-menu-image {
width: 35px;
height: 30px;
Expand All @@ -407,20 +402,6 @@ div.wp-menu-image:before {
height: 34px;
}

/* No @font-face support */
.no-font-face #adminmenu .wp-menu-image {
display: none;
}

.no-font-face #adminmenu div.wp-menu-name {
padding: 8px 12px;
}

.no-font-face.auto-fold #adminmenu .wp-menu-name {
margin-left: 0;
}
/* End no @font-face support */

/* Sticky admin menu */
.sticky-menu #adminmenuwrap {
position: fixed;
Expand Down
3 changes: 1 addition & 2 deletions src/wp-admin/css/colors/_admin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,7 @@ ul#adminmenu > li.current > a.current:after {
#adminmenu li.wp-has-current-submenu.opensub div.wp-menu-image:before,
#adminmenu li:hover div.wp-menu-image:before,
#adminmenu li a:focus div.wp-menu-image:before,
#adminmenu li.opensub div.wp-menu-image:before,
.ie8 #adminmenu li.opensub div.wp-menu-image:before {
#adminmenu li.opensub div.wp-menu-image:before {
color: $menu-current-icon;
}

Expand Down
19 changes: 0 additions & 19 deletions src/wp-admin/css/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,6 @@ a:focus .media-icon img,
outline: 1px solid transparent;
}

.ie8 a:focus {
outline: #5b9dd9 solid 1px;
}

#adminmenu a:focus {
box-shadow: none;
/* Only visible in Windows High Contrast mode */
Expand Down Expand Up @@ -1441,10 +1437,6 @@ div.error p,
0 0 2px 1px rgba(30, 140, 190, 0.8);
}

.ie8 .notice-dismiss:focus {
outline: 1px solid #5b9dd9;
}

.notice-success,
div.updated {
border-left-color: #46b450;
Expand Down Expand Up @@ -1766,10 +1758,6 @@ form.upgrade .hint {
font-weight: 600;
}

.ie8 #screen-options-wrap legend {
color: inherit;
}

.metabox-prefs label {
display: inline-block;
padding-right: 15px;
Expand Down Expand Up @@ -2247,13 +2235,6 @@ h1.nav-tab-wrapper, /* Back-compat for pre-4.4 */
clear: both;
}

.ie8 .nav-tab-wrapper {
/* contain floats establishing a new block formatting context */
display: inline-block;
width: 100%;
vertical-align: top;
}

/*------------------------------------------------------------------------------
26.0 - Misc
------------------------------------------------------------------------------*/
Expand Down
4 changes: 0 additions & 4 deletions src/wp-admin/css/customize-nav-menus.css
Original file line number Diff line number Diff line change
Expand Up @@ -475,10 +475,6 @@
-moz-osx-font-smoothing: grayscale;
}

.ie8 .menu-item-bar .item-delete:before {
top: -10px;
}

.menu-item-bar .item-delete:hover,
.menu-item-bar .item-delete:focus {
box-shadow: none;
Expand Down
22 changes: 0 additions & 22 deletions src/wp-admin/css/dashboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,6 @@
border: none !important;
}

.ie8 #wpbody-content #dashboard-widgets .postbox-container {
width: 49.5%;
}

.ie8 #wpbody-content #dashboard-widgets #postbox-container-2,
.ie8 #wpbody-content #dashboard-widgets #postbox-container-3,
.ie8 #wpbody-content #dashboard-widgets #postbox-container-4 {
float: right;
width: 50.5%;
}

.ie8 #dashboard-widgets #postbox-container-3 .empty-container,
.ie8 #dashboard-widgets #postbox-container-4 .empty-container {
border: 0 none;
height: 0;
min-height: 0;
}

#dashboard-widgets-wrap {
overflow: hidden;
margin: 0 -8px;
Expand Down Expand Up @@ -180,10 +162,6 @@
float: left;
}

.ie8 .welcome-panel .welcome-panel-column {
min-width: 230px;
}

.welcome-panel .welcome-panel-column:first-child {
width: 36%;
}
Expand Down
5 changes: 0 additions & 5 deletions src/wp-admin/css/edit.css
Original file line number Diff line number Diff line change
Expand Up @@ -635,11 +635,6 @@ form#tags-filter {
max-width: 100%;
}

.ie8 #poststuff .inside #parent_id,
.ie8 #poststuff .inside #page_template {
width: 250px;
}

.post-attributes-label-wrapper {
margin-bottom: 0.5em;
}
Expand Down

0 comments on commit 3d31284

Please sign in to comment.