-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Usage of cutting-edge :where
selector broken in old browsers
#7617
Comments
cf facebookincubator/infima#243 for our decision-making and #7455 for further discussions on this. Why would anyone even use a Chrome that's not the latest version (and in fact 15 versions behind the latest)? Is there anything preventing you from upgrading? Web dev these days kind of assumes that you are on a reasonably new version as long as you are using Chrome/Firefox/Safari (hence the name evergreen). |
@Josh-Cena The first version support css where selector was released in Jan 2021, less than 2 years. And Caniuse shows only 56% users in China use newer version browsers, it needs more time to complete upgrade. |
Yes—but out of the rest 44%, probably <3% read websites set up with Docusaurus (most of them are state-affiliated organizations). I'm pretty optimistic about supporting only recent versions, and I'm simply curious about you as a particular user who's using an outdated browser, not the general picture of how many people may be affected. This will help us make decisions in #7455. Also—I'm really curious about that 56% figure. For my own education, can I get a link please? |
:where
selector is experimental feature and broken in old browsers:where
selector broken in old browsers
The usage figure from https://caniuse.com/?search=where , maybe need change settings to view China region data. I can not tell how many users affected, the bug was first reported by one of my customer. I think many people simply use Wechat to open links sent by friends, most of them are affected. It's fine to keep the issue open, if other people run into the same issue, they will 👍 here. |
Ah—I see. I still had to manually add a "China" filter, not sure why. No problem, we can leave it open for now, since the discussion of browser support is still underway. |
😬 this is annoying, cc @lex111 We also introduced flex gap property, which is not very well supported in China https://caniuse.com/?search=gap In the future, we should probably whitelist new CSS features one by one to mark them as safe to use after some study 🤷♂️ In the meantime, I'm not sure it would be nice to revert all our modern CSS changes. But maybe we can revert the critical issues that prevent a decent usage of the Docusaurus site? Now it's also worth considering what is a "critical issue"? Maybe inaccessible labels are critical, but bad spacing due to missing flex gaps is not a big deal? Do you see many other things in a Docusaurus site that appears broken on older browsers, apart those buttons?
I don't know how it works in China. Are large organizations freezing their desktop employees to a fixed version? |
I think it happens in other countries as well—state-affiliated organizations are especially slow to migrate to modern IT infrastructure because of worries of security, legal issues, financing, politics, software compatibility, etc. (e.g. there are many British hospitals still using Windows XP + IE.) But these people have a particularly big share in the Chinese market. Now, whether individuals fail to upgrade their browsers I don't know, because the privilege I enjoy is probably disproportionate compared to most Chinese people. But from my observation, the actual Docusaurus users in China mostly work at Internet giants like Alibaba & ByteDance, and both site creators and users of these sites usually have access to modern browsers. |
Have you adjusted for survivors bias? |
If I understand you correctly—you are saying those that don't have access to modern browsers and/or those that need to target ancient browsers are excluded from Docusaurus' audience in the first place. Yes, that's a fair point. But, what do we actually aim for?
Docusaurus primarily goes towards (2) and (3). It doesn't mean (1) is unimportant—but you have to look into the comparative. Most JavaScript bundle can still be downleveled, so this problem is very limited in scope and impact. Also, we have to do actual user portraits—how many users visiting Docusaurus websites are actually using outdated browsers? Are they our intended audience? Do we want to make these people happy at the cost of making CSS overriding harder and/or penalizing everyone with bigger bundles? When I say "the actual Docusaurus users in China", it's not purely an a posteriori assertion. Docusaurus is not a general-purpose site builder—its design goals have naturally created a niche user base. Our main focus is on technical, or tech-oriented, documentation, intended for open-source projects and personal tech blogs. Keeping this goal in mind, we drew the conclusion that readers of the site are also those that are interested in technology. If you are using Docusaurus for a government landing page or service panel where your users can be on all kinds of devices, Docusaurus is probably not the best choice. |
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.Description
Button style css
:where
selector is experimental feature and broken in many browsers. Can reproduce by visit https://docusaurus.io/ in some old version browser, the "Get Started" and "Try a Demo" button style is broken.And I checked the css file, seems no needs to use
:where
selector, change them to simple css selector can fix the issue.See also: https://caniuse.com/?search=where
Reproducible demo
https://docusaurus.io/
Steps to reproduce
Expected behavior
Expect the Button style is same as the style show in latest browser.
Actual behavior
The Button style not work, no background color.
Your environment
Self-service
The text was updated successfully, but these errors were encountered: