WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 2 years ago

Last modified 10 months ago

#37651 closed enhancement (fixed)

Update autoprefixer supported browser matrix

Reported by: netweb Owned by: jorbin
Milestone: 4.9 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch early commit
Focuses: Cc:
PR Number:

Description

caniuse.com documents browser usage http://caniuse.com/usage-table, this data is sourced from http://gs.statcounter.com/

In the build tools we currently use a browser matrix to determine supported browser for autoprefixer, the autoprefixer browser matrix is powered by https://github.com/ai/browserslist which sources its data from http://caniuse.com/usage-table

Our current browser matrix is: (source)

  • Android >= 2.1
  • Chrome >= 21
  • Edge >= 12
  • Explorer >= 7
  • Firefox >= 17
  • Opera >= 12.1
  • Safari >= 6.0

Below are some current worldwide browser stats:

Top 5 browsers: browserslist ">6.5%"

  • and_chr 51
  • and_uc 9.9
  • chrome 51
  • chrome 50
  • ios_saf 9.3

Browsers with greater than 2.5% market: browserslist ">2.5%"

  • and_chr 51
  • and_uc 9.9
  • chrome 51
  • chrome 50
  • firefox 47
  • ie 11
  • ios_saf 9.3
  • op_mini all
  • samsung 4

Browsers with greater than 1.0% market: browserslist ">1.0%"

  • and_chr 51
  • and_uc 9.9
  • android 4.4
  • chrome 51
  • chrome 50
  • chrome 49
  • chrome 29
  • edge 13
  • firefox 47
  • firefox 46
  • ie 11
  • ios_saf 9.3
  • ios_saf 9.0-9.2
  • op_mini all
  • safari 9.1
  • samsung 4

My biggest surprise here was and_uc UC Browser(WikiPedia) which I had not even heard of until I looked at theses stats. It's the #1 mobile browser in China, and 3rd worldwide behind iOS Safari and Chrome. source.

I suggest we these browsers to the Autoprefixer matrix:

  • and_uc >= 9
  • ios >= 6
  • op_mini = all
  • samsung >= 4

Attachments (4)

autoprefixer.diff (428 bytes) - added by stunnedbeast 3 years ago.
Autoprefixer Browser Matrix
37651.diff (428 bytes) - added by stunnedbeast 3 years ago.
Updated autoprefixer browser support
37651.2.diff (739 bytes) - added by jorbin 2 years ago.
37651.3.diff (755 bytes) - added by netweb 2 years ago.

Download all attachments as: .zip

Change History (17)

@stunnedbeast
3 years ago

Autoprefixer Browser Matrix

#1 @stunnedbeast
3 years ago

  • Keywords has-patch added; needs-patch removed

Doesn't look like "op_mini = all" is a valid option for autoprefixer. I got this error, "Fatal error: Unknown browser query op_mini = all". After looking here, http://www.androidapksfree.com/version-history/opera-mini-fast-web-browser-version-history/, I changed that to "op_mini >= 7".

@stunnedbeast
3 years ago

Updated autoprefixer browser support

#2 @stunnedbeast
3 years ago

  • Keywords needs-testing added

#3 in reply to: ↑ description @netweb
3 years ago

  • Keywords needs-patch added; good-first-bug has-patch removed

Replying to stunnedbeast:

Doesn't look like "op_mini = all" is a valid option for autoprefixer. I got this error, "Fatal error: Unknown browser query op_mini = all". After looking here, http://www.androidapksfree.com/version-history/opera-mini-fast-web-browser-version-history/, I changed that to "op_mini >= 7".

Thanks for the patch @stunnedbeast, as I noted in the original ticket, the browser versions are taken from "browserlist":

In the build tools we currently use a browser matrix to determine supported browser for autoprefixer, the autoprefixer browser matrix is powered by https://github.com/ai/browserslist which sources its data from http://caniuse.com/usage-table

And Opera Mini support for op_mini = all was fixed in browserlist release v1.4.0 which in turn is included in Autoprefixer 6.5.0 included in WordPress [38688]

Could you refresh your patch please and use op_mini = all

This ticket was mentioned in Slack in #docs by netweb. View the logs.


3 years ago

#5 @netweb
3 years ago

Supported browser versions are now documented in the Core Handbook:

https://make.wordpress.org/design/handbook/browser-support/

Currently this is:

Full support back to IE11, partial back to IE8.
Firefox, Chrome, Safari: Current – 1.
iOS Safari: Current – 1.
Android browser: Current major.
Chrome/Android: Current.
Everything else: Bugs fixed as reported.

#6 @netweb
2 years ago

  • Keywords needs-refresh added

See also: https://make.wordpress.org/core/2017/04/23/target-browser-coverage/

tl;dr: "...we are officially ending support for Internet Explorer versions 8, 9, and 10, starting with WordPress 4.8."

@jorbin
2 years ago

#7 @jorbin
2 years ago

  • Keywords has-patch early added; needs-patch needs-refresh removed
  • Milestone changed from Awaiting Review to 4.9

New version hard codes IE 11 as a minimum, otherwise specifies either last 2 or last 1 based on browser support doc.

Going to land this early along with a massive removal of old prefixes to maximize testing time.

#8 @netweb
2 years ago

I think we should also include the following:

  • 'last 1 operamini versions' - 2.82%
  • "last 1 Samsung versions" - 3.71%
  • "last 1 UCAndroid versions" - 8.95% (This is ranked 3rd in global browser usage, only Chrome and Chrome Android are ranked higher in browser usage)

Each of those percentages are significant shares of the global browser usage per https://caniuse.com/usage-table

I think we should do this in 4.8.1 rather than 4.9 as it's an easy get that would add WordPress support on mobile devices that we've not previously included vendor prefixes for i.e. Android Chrome, iOS Safari, nor Android UC.

What do you think @jorbin ?

#9 @jorbin
2 years ago

I down with that. Maybe also a catch all "> 1%" to help cover the Everything else: Bugs fixed as reported. in our browser support docs. It doesn't actually cause any different css right now, but could help in the future.

I don't think we should backport this for 4.8.1. It will cause a lot of files to change and the more files that change, the more failures there have been with auto updates.

@netweb
2 years ago

#10 @netweb
2 years ago

  • Keywords commit added; needs-testing removed

Interestingly I just tested 37651.2.diff as it currently stands and here's the diff https://cloudup.com/cUiTLb-5M7y, nothing but *red* which is great, more specifically 126 instances of the single webkit rule -webkit-box-shadow are removed (126 for each minified and unminified CSS files) of the MP6 themes generated from SCSS.

I've added 37651.3.diff which adds the catch all > 1%

There is *no* difference in the resulting CSS when compared to the 37651.2.diff patch.

So by not including it in 4.8.1 no longer matters to us as there are no "functional changes" to be concerned with, 37651.3.diff is right for commit.

#11 @netweb
2 years ago

The design handbook should also be updated to include the browsers not listed Edge, Opera etc

https://make.wordpress.org/design/handbook/design-guide/browser-support/

cc @karmatosed can you update this with the browsers listed in 37651.3.diff please?

#12 @karmatosed
2 years ago

@netweb yep, done: https://make.wordpress.org/design/handbook/design-guide/browser-support/. Thanks for that ammendment.

Last edited 2 years ago by karmatosed (previous) (diff)

#13 @jorbin
2 years ago

  • Owner set to jorbin
  • Resolution set to fixed
  • Status changed from new to closed

In 41062:

Update autoprefixer browser support matrix

WordPress no longer supports many old old browsers: https://make.wordpress.org/core/2017/04/23/target-browser-coverage/

This also removes alot of no longer necessary CSS. It served us well, but we are never getting back together with IE8,9,10.

So, in the (paraphrased) words of Taylor Swift:

I remember when we dropped support the first time
Saying, "This is it, I've had enough, " 'cause like
We hadn't seen many users in a month
When you said you needed flexbox. (What?)
Then you postMessage again and say
"IE8, I miss you and I swear I'm gonna change, trust me."
Remember how that lasted for a day?
I say, "I hate the box model, " we break up, you call me, "I love css-grids."
Ooh, we called it off again last night
But ooh, this time I'm telling you, I'm telling you

We are never ever ever supporting IE 8,9,10,
We are never ever ever supporting IE 8,9,10,
You go talk to EDGE, talk to my FIREFOX, talk to CHROME
But we are never ever ever ever getting back together
Like, ever...

Fixes #37651.
Props stunnedbeast, netweb, jorbin.

Note: See TracTickets for help on using tickets.