Make WordPress Core

Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#46015 closed enhancement (fixed)

Remove any CSS related to Internet Explorer 6 – 8

Reported by: afercia's profile afercia Owned by: ocean90's profile ocean90
Milestone: 5.5 Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-patch commit
Focuses: css, performance Cc:

Description

Splitting this out from #46003.

More than one year ago, with the 4.8 release, WordPress officially ended support for Internet Explorer versions 8, 9, and 10.

However, the WordPress admin CSS is still targeting old IE versions, even IE 6. It is true that in the admin some of these rules are only served to old IE versions via conditional comments. There are many other rules targeting IE 7 and IE 8 polluting styesheets served to all browsers though.

Not to mention the majority of the bundled themes. As far as I can tell, Twenty Nineteen is the first bundled theme to not use conditional comments.

At the very least, I'd like to propose to remove any admin CSS targeting IE 6 – 8. That would require to:

  • remove wp-admin/css/ie.css
  • remove the conditional comments
  • remove any CSS rule that use selectors with .ie7 and .ie8.
  • check if anything else is needed

As mentioned in #46003, some of the related CSS is served also in the front end. For example, the CSS related to the admin bar, when users are logged in, and the media views, when enqueued in the front end.

It would be great to consider to do the same also for the JavaScript part. That would certainly be a bit more complicated and I guess it needs to be considered separately. Instead, the CSS part seems easy enough to address.

/Cc @swissspidy

Attachments (3)

46015.patch (32.0 KB) - added by ayeshrajans 5 years ago.
46015-2.patch (16.5 KB) - added by ayeshrajans 4 years ago.
46015-1.patch no longer applies clean. This is the diff off a rebase skipping merge conflicts.
46015.diff (29.0 KB) - added by isabel_brison 4 years ago.
Updated patch

Download all attachments as: .zip

Change History (25)

#1 @ayeshrajans
5 years ago

I took an attempt to clean up this. I will attach a patch, but I think it will be easier to split it to multiple commits.

https://github.com/Ayesh/wordpress-develop/compare/master...46015-ie8-removal

This is far from being ready, but I hope is a start.

@ayeshrajans
5 years ago

#2 @isabel_brison
4 years ago

  • Focuses css added
  • Keywords has-patch added

This ticket was mentioned in Slack in #accessibility by audrasjb. View the logs.


4 years ago

This ticket was mentioned in Slack in #core-css by notlaura. View the logs.


4 years ago

#6 @isabel_brison
4 years ago

  • Keywords needs-refresh added

Thanks for working on this, @ayeshrajans! I'm afraid the patch no longer applies cleanly, are you able to refresh it?

#7 @ayeshrajans
4 years ago

Hi @isabel_brison - I tried to rebase on current master branch, but there are so many conflicts that I had to give up. I will upload a patch that did apply clean during, so it will be starting point.

@ayeshrajans
4 years ago

46015-1.patch no longer applies clean. This is the diff off a rebase skipping merge conflicts.

@isabel_brison
4 years ago

Updated patch

#8 @isabel_brison
4 years ago

  • Keywords needs-refresh removed

Thanks @ayeshrajans! Based on your new patch, I added the remaining changes and generated a new one. This should be good for review now.

#9 @ayeshrajans
4 years ago

New patch from @isabel_brison looks good to me, almost 1000 lines removed from front end code! 👍.

This ticket was mentioned in Slack in #core-css by isabelbrison. View the logs.


4 years ago

#11 @netweb
4 years ago

  • Milestone changed from Awaiting Review to 5.5

Nice, let’s get this into 5.5 👍🏼

#12 @ocean90
4 years ago

  • Owner set to ocean90
  • Status changed from new to reviewing
  • Type changed from defect (bug) to enhancement

#13 @sabernhardt
4 years ago

  • Keywords needs-refresh added

In /wp-admin/css/colors/_admin.scss, the color scheme styles should still include this:

#adminmenu li.opensub div.wp-menu-image:before {
	color: $menu-current-icon;
}

Otherwise, it looks good.

#15 @ocean90
4 years ago

  • Keywords needs-refresh removed

Moved the latest patch into a PR and fixed a few things, see https://github.com/WordPress/wordpress-develop/pull/251.

Found another IE7 reference in this regex which was added in [26819] for "mobile browsers and IE7". Any objections for removing this and all the .no-font-face CSS?

#16 follow-up: @isabel_brison
4 years ago

Thanks for picking this up @ocean90 !

Found another IE7 reference in this regex which was added in [26819] for "mobile browsers and IE7". Any objections for removing this and all the .no-font-face CSS?

We don't support any of the browsers listed in the regex anymore so should be good to scrap the whole thing.

#17 in reply to: ↑ 16 @ocean90
4 years ago

Replying to isabel_brison:

Found another IE7 reference in this regex which was added in [26819] for "mobile browsers and IE7". Any objections for removing this and all the .no-font-face CSS?

We don't support any of the browsers listed in the regex anymore so should be good to scrap the whole thing.

Thanks for the confirmation, removed in https://github.com/WordPress/wordpress-develop/pull/251/commits/438bd10460b9023f7770e06bc77fa9011a00898a.

Curious why this ticket only targets IE 6 – 8. What about 9 and 10? Thinking we should further increase the compatibility mode for cssmin and remove adding (unused) IE 9 helper classes as well.

#18 follow-up: @afercia
4 years ago

Curious why this ticket only targets IE 6 – 8. What about 9 and 10? Thinking we should further increase the compatibility mode for cssmin and remove adding (unused) IE 9 helper classes as well.

Makes sense.

This ticket originally focused on IE 6 – 8 because it mainly considered CSS files. The original proposal was, at the very least, to remove any related CSS. The core CSS doesn't use any .ie9 selector, as you already mentioned in the linked pull request on GitHub. Conditional comments are no longer supported in IE10 and IE11.

The original proposal also suggested to split in a separate ticket changes to the JS part (and PHP part, where needed). if you'all are comfortable with broadening the scope of this ticket, I have no objections :)

#19 in reply to: ↑ 18 @ocean90
4 years ago

Replying to afercia:

The original proposal also suggested to split in a separate ticket changes to the JS part (and PHP part, where needed). if you'all are comfortable with broadening the scope of this ticket, I have no objections :)

Thanks for clarifying! Yes, the latest patch also touches some JS/PHP parts but only when related to building CSS or adding CSS classes which I think is still fine for the scope of thicket ticket. We likely still need a separate ticket for some other JS parts like in svg-painter.js.

#20 @netweb
4 years ago

  • Keywords commit added

PR 251 looks good to me 👍🏼

#21 @ocean90
4 years ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 47771:

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.

#22 @johnbillion
4 years ago

In 48380:

Administration: Reinstate the description for the admin_xml_ns hook which was accidentally removed in [47771].

See #46015.

Note: See TracTickets for help on using tickets.