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

Pagination classes with special characters aren't escaped. Throws a DOMException #7812

Open
5 of 6 tasks
letoast opened this issue Dec 4, 2024 · 0 comments
Open
5 of 6 tasks

Comments

@letoast
Copy link

letoast commented Dec 4, 2024

Check that this is really a bug

  • I confirm

Reproduction link

https://codesandbox.io/p/sandbox/swiper-pagination-forked-dstj52

Bug description

When using tailwind arbitrary properties classes https://tailwindcss.com/docs/adding-custom-styles#arbitrary-properties the querySelectorAll fails for pagination

Uncaught SyntaxError: Failed to execute 'querySelectorAll' on 'Element': '.[&>*]:h-2' is not a valid selector.

Even though [&>*] is a completely valid tailwind selector. Characters like "[" and "]" probably aren't escaped

This is not a duplicate of #4403 where I mentioned the issue a month ago but didn't get a reply.

Expected Behavior

Any tailwind possible class to work

Actual Behavior

No response

Swiper version

^11.2.0

Platform/Target and Browser Versions

macOS Safari

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • Make sure this is a Swiper issue and not a framework-specific issue

Would you like to open a PR for this bug?

  • I'm willing to open a PR
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

No branches or pull requests

1 participant