-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Removed auto-prefixing for widely available features #3296
Conversation
🦋 Changeset detectedLatest commit: e8dbb53 The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I basically agree with this (and probably agree with shipping it in the next major in a way that I don't really with #3294) with the caveat that to understand whether all of it is actually obselete, it'd be good to see something like: run the stylis prefixer over some specifically generated css to exercise all the properties that stylis prefixes, compare that with caniuse/mdn compat data/whatever and see what we get
Quick look on caniuse:
|
Sorry, I looked more into this before the holidays and got side-tracked, basically my thoughts are since the number of properties where prefixes are still relevant seems to be not nothing, I think we should probably have a smaller prefixer that includes what is currently prefixed but excluding everything that is Baseline "Widely Available" (I don't think the estimated browser support percentages to decide things is very useful). Over time, it would shrink, though the exact details of how we'd want to do that wrt to major versions, I'm not super sure about. |
This reverts commit 3759507.
@emmatown I changed the PR and kept the prefixer. I cross-checked with caniuse, the resource u mentioned here and MDN. The end result is that we end up prefixing just a few things. Could you take a look at this and let me know what do you think? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are mostly just my notes from going through the properties still here with some small actions, still thinking about it overall
packages/cache/src/prefixer.ts
Outdated
WEBKIT + | ||
replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + | ||
value | ||
) | ||
// cursor | ||
case 6187: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the zoom and grab prefixing is unnecessary and image-set
will be widely available later this year, also the image-set
prefixing seems weird since it's not exclusive to the cursor
property.
case 5844: | ||
case 3191: | ||
case 6645: | ||
// box-decoration-break | ||
case 3005: | ||
// mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
widely available early 2026 by my math https://caniuse.com/css-masks
case 5844: | ||
case 3191: | ||
case 6645: | ||
// box-decoration-break |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still prefixed in webkit https://caniuse.com/css-boxdecorationbreak
// color-adjust | ||
case 5103: | ||
return WEBKIT + 'print-' + value + value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like an awkward one, color-adjust
is obsolete, print-color-adjust
is the real one though it's still prefixed in chromium
return WEBKIT + value + value | ||
// appearance, user-select, transform, hyphens, text-size-adjust | ||
case 5349: | ||
// user-select, hyphens, text-size-adjust |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- user-select still prefixed in webkit https://caniuse.com/mdn-css_properties_user-select, moz prefix has been unnecessary since 2019
- hyphens will be widely available early 2026 https://caniuse.com/css-hyphens, moz prefix has been unnecessary since 2015
- text-size-adjust still prefixed in mobile safari https://caniuse.com/text-size-adjust, it seems like the
-moz-
prefix was needed a while ago but firefox for android has supported-webkit-text-size-adjust
for a while
For all of these, we don't need the MS prefix since that's all IE/pre-Chromium Edge which are old enough to not matter for "Widely Available".
So none of these need moz
/or ms
prefixes
…ble so soon, just prefixing image-set for cursor is weird and cursor is such a small progressive enhancement thing anyway that if it doesn't work in older browsers, it's fine)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'm happy with this (assuming updates to the changeset). While it's a bit small, it feels like it's just enough properties that it's worth keeping
closes #2747
IMHO, this plugin is not really needed in 2025, but I haven't rechecked whether all the included rules are obsolete. Many are, we definitely shouldn't be prefixing flexbox