#46015 closed enhancement (fixed)
Remove any CSS related to Internet Explorer 6 – 8
Reported by: | afercia | Owned by: | 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)
Change History (25)
This ticket was mentioned in Slack in #accessibility by audrasjb. View the logs.
5 years ago
This ticket was mentioned in Slack in #core-css by notlaura. View the logs.
4 years ago
#6
@
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
@
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.
@
4 years ago
46015-1.patch no longer applies clean. This is the diff off a rebase skipping merge conflicts.
#8
@
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
@
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
#12
@
4 years ago
- Owner set to ocean90
- Status changed from new to reviewing
- Type changed from defect (bug) to enhancement
#13
@
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.
This ticket was mentioned in PR #251 on WordPress/wordpress-develop by ocean90.
4 years ago
#14
Trac ticket: https://core.trac.wordpress.org/ticket/46015
#15
@
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:
↓ 17
@
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
@
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:
↓ 19
@
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
@
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.
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.