Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

387
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda