I used to work in company where we have spent a lot of time making custom fixes for our software in order to work-around wired hardware/software bugs on machines of individual customers. Yes, we provided service for remaining 2% or so, but in cost of slowing-down overall product development and not making our product better for remaining 98%.
People who don't update browsers for years (or even decades) do so willingly.
Of course, you do not know this exactly, but the point is that it's easy to look at the wrong statistic and come to conclusions that are not necessarily useful in some context. The lens matters just as much as the percentage, if not more.
The web has been doing this since, when, the 90's?
I use Firefox. In the last year, suddenly quite a few web sites have just stopped working on it for me. Firefox is over 2% market share.
With a website, you can have the "real" layout, but when someone is blocking your JS, you can fallback and still provide content.
We won't get every mobile application working on old browsers, but we can offer something to the end user. Even a page that lets them know they are missing out.
But CSS Nesting? We can have that and a fallback.
Yes a restaurant that poisons 2% of its customers is a bad restaurant. A restaurant that has nothing for people who are strict kosher, strict halal, strict vegan, or have severe multiple food allergies is not a bad restaurant. There may be 5% of people who simply can’t eat there because the kitchen cooks pork and there’s peanut shells on the ground but their idiosyncratic requirements don’t dictate the experience of the other 95%. Or 90%, or what have you.
Close, but the other way round. Don't avoid a feature because it lacks good enough support. Write code to progressively enhance the experience if the feature is supported in the user's browser. If you're not willing to do that, then don't use the feature.
Progressive enhancement today means you can use pretty much any browser feature you want. You just have to do a bit of legwork with some @supports or JS prototype checking after doing the basic version first. It's not really much extra work.
That's a bit lower than I would be comfortable with, however not that bad, we have been even considering switching all our images to AVIF: https://caniuse.com/?search=AVIF
And google uses Webp all over the place and that's sitting at 96% https://caniuse.com/webp
Author's 98% take is a bit misguided.
A professional B2B car parts dealer has a very different user profile than say, a local news site in rural Africa.
A site selling concert tickets (for popular artist) probably won't care if site doesn't work for 5% of visitors, the tickets will just take a bit longer to sell out.
But otoh I'm sure there's many businesses out there who wouldn't mind a 2..5% bump in conversion ratio for very little effort.
Personally I don't care. If I'm out to buy something online & webshop doesn't work or takes too long to load, my purchase goes elsewhere.
And ofc government services should be very conservative in this respect.
Edit: and yes, graceful degradation. It's ok if site doesn't look as intended but is still useable for that 2%. And eg. I love that some news site have a text-only lite version.
It kind of makes me wonder if anyone has made a build system / framework that serves nested CSS to modern browsers, and falls back to a preprocessed CSS file that removes all the nesting for older browsers.
What they say is that you have to ensure that your site still works for the remaining users, through graceful degradation.
If people have new fancy browsers, use their features to make the interface jazzy. If they don't, ensure that the site still offers its core functionality to them without the fancy features.
WebP is especially hated for this among non-techies (31.8k upvotes, 1 month ago): https://www.reddit.com/r/mildlyinfuriating/comments/1trpuvr/...
So I like the opposite approach. If there's literally one guy on the planet, and this article/app/idea changes his life... what would that look like?