CRA postCSS - vender prefixes not working?

The CRA DOCs, it says that it already comes with auto prefixing, and that css should automatically prefix… The CRA docs image below shows vendor prefixes… however none of my CSS has been prefixed… they look the same. Does anyone know why it is not showing prefixes?

yes, i saw that same stackoverflow link while researching. and I tried using different queries to see if it would change… but it did not change or kick in… I think CRA needs to update their docs to reflect that no changes would happen if you had the latest browsers installed… otherwise it would confuse a lot of people… Anyone else have the same issue, or solution?

It isn’t an issue, so I’m not sure they need to update anything. The point is not to automatically prefix everything: that is pointless, because it means generating huge amounts of useless code. CRA maintainers are going to have a preset that caters to the majority of people, not the 0.1% of users who need support for old versions of both Safari and IE (that’s what the example of prefixed properties shows, it’s just An Example). Which is crap if you’re in that group, but catering to you is not very fair on the other 99.9% of people who don’t need that extra stuff.

Why do you need the prefixes there? Under what circumstances do you expect people will be using very old versions of Safari and IE <= 10? I’m not saying you don’t need them, just that the circumstances where needed would be unusual. And if you needed something that unusual it’s generally assumed you know what you’re doing, so it shouldn’t be an important thing in the docs.

I’m guessing it’s just an example, not based on current settings. The docs tells you to change the browserslist settings in package.json as needed (not saying you need it).

The -ms prefixs won’t make much sense unless you also add the polyfill (unless there is some old Edge specific CSS stuff there as well).

1 Like

the doc is somewhat misleading and confusing…