Skip to content
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

Ignore all webkit, ms and Mozilla specific pseudo elements #3150

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

silaslenz
Copy link

What:

Adds -webkit-scrollbar-button, -webkit-scrollbar-thumb and webkit-scrollbar-track to ignored vendor prefixes, similar to #2920, #2393 and #2149. Fixes #3111.

Why:

These errors appear in non-webkit-browsers (Firefox) when using these webkit specific pseudo-elements.

These are only the ones we specifically use, I don't know if we want to add a more comprehensive list, or perhaps do a filter like :(-webkit-:.*|-moz-.*|-ms-.*){ (though that may risk introducing false positives?)?

How:

The existing regex was extended.

Checklist:

  • Documentation (N/A ; there does not seem to exist any documentation on this)
  • Tests (N/A ; there seem to be no existing tests for this, and I'm not sure how to properly test this in the first place. I've manually tested this in Firefox)
  • Code complete
  • Changeset

Copy link

changeset-bot bot commented Jan 17, 2024

🦋 Changeset detected

Latest commit: 98b889a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@emotion/sheet Patch

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

Copy link

codesandbox-ci bot commented Jan 17, 2024

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.

Latest deployment of this branch, based on commit 98b889a:

Sandbox Source
Emotion Configuration

Copy link

codecov bot commented Jan 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b0014b4) 95.07% compared to head (98b889a) 95.07%.

Additional details and impacted files
Files Coverage Δ
packages/sheet/src/index.js 100.00% <100.00%> (ø)

@Andarist
Copy link
Member

These are only the ones we specifically use, I don't know if we want to add a more comprehensive list, or perhaps do a filter like :(-webkit-:.|-moz-.|-ms-.*){ (though that may risk introducing false positives?)?

Those are known to be vendor-prefixed though so perhaps this would just cover everything automatically without a huge risk of false positives?

@silaslenz
Copy link
Author

These are only the ones we specifically use, I don't know if we want to add a more comprehensive list, or perhaps do a filter like :(-webkit-:.|-moz-.|-ms-.*){ (though that may risk introducing false positives?)?

Those are known to be vendor-prefixed though so perhaps this would just cover everything automatically without a huge risk of false positives?

Sounds reasonable to me, though I may not have enough CSS/emotion knowledge to make that judgement. Do you want me to update the PR to use that filter instead?

@silaslenz
Copy link
Author

I've changed the PR to use the more generic regex. Here is an example to show that all three types of vendor-prefixes are still caught:

image
(source https://regex101.com/r/oOCpFp/1)

@silaslenz silaslenz changed the title Add -webkit-scrollbar pseudo-elements to ignored prefixes Ignore all webkit, ms and Mozilla specific pseudo elements Jan 25, 2024
@silaslenz
Copy link
Author

@Andarist Any chance you could take a look at the latest version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Errors shown in console using Firefox in debug build with speedy enabled
2 participants