Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

386
Views
How can I use bootstrap 5 in the content script so that it does not conflict with the main CSS on the site? (Chrome Extension)

I am trying to use the Bootstrap 5 library in the chrome extension. So I am adding the bootstrap 5 (CSS and js) files with a manifest to the content script but it conflicts with the main CSS file on some sites.

content_scripts": 
    [{
      "matches": ["*://*.amazon.com/*"],
      "js":["bootstrap.bundle.min.js","injection.js"],
      "css":["bootstrap.min.css"]
    }]

When I try to use bootstrap for example on amazon.com, some CSS elements conflict. I am trying to solve the problem with an artificial solution by commenting on some Bootstrap CSS codes.

I couldn't find any details about it. If there is a better solution or if the way I tried it is wrong, could someone tell me the logic of it or help me with another solution?

How it should be

Css current solution

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I don't think there is a way to avoid the CSS conflicts in the content script. I think you can build a namespace bootstrap version. Please check this. Separate content script css from site css?

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!