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

CSS conflicts with Bootstrap 5 CSS #9

Open
mylastore opened this issue Jun 24, 2021 · 1 comment
Open

CSS conflicts with Bootstrap 5 CSS #9

mylastore opened this issue Jun 24, 2021 · 1 comment

Comments

@mylastore
Copy link

I am using Bootstrap 5 CSS and apparently svelte-images is using common classes found on Bootstrap CSS for example "container and nav" so the carousel was not working correctly for me. I suggest adding a prefix to your CSS classes for example "c-container and c-nav" that fixed my CSS issues hope this help someone else.

@BrettBurbidge
Copy link

@mylastore Nice Catch! I was trying to figure out why my Carousel was not working.

I made the following changes to Carousel.svelte and it fixes the issues. I only made these changes locally so if/when I update from npm they will be overwritten.
from:

  .container {...}

to:

  .i-container {...}

I also changed all the

.nav{...} to .i-nav{...}

I updated all references to these changed classes now my Carousel works awesome.

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

2 participants