Skip to content

core modules + modules injectStylesUrls #7946

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

Open
TerryXu-97 opened this issue Apr 3, 2025 · 0 comments
Open

core modules + modules injectStylesUrls #7946

TerryXu-97 opened this issue Apr 3, 2025 · 0 comments

Comments

@TerryXu-97
Copy link

@nolimits4web first of all, thanks for creating the wonderful library.

In a project, we're trying to migrate from Swiper React to Elements, and I second @awacode21 comments, the documentation does not provide enough clarity on what to do. My code is almost exactly as documented here but this part of the documentation is a bit vague:

we also need to add modules styles globally and also inject modules styles to the shadow DOM

  • Does "add modules styles globally" mean import "swiper/element/css/pagination" in the context of a React app?

  • Does "inject modules styles to the shadow DOM" mean injectStylesUrls: ["swiper/element/css/pagination"]?

  • If not, how can we inject the existing styles provided by the package (i.e. stylesheets that already exist like node_modules/swiper/modules/pagination-element.min.css)?

Thanks for the response.

Originally posted by @arman-h in #7485

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