1

I am injecting CSS from my service_worker like this :

await chrome.scripting.insertCSS({
    target: { tabId: tab.id },
    files: ['static/css/main.css'],
})

I see my CSS on some elements, but all elements that already have style will not be influenced by my CSS (h1, h2.. a, p, span...) even if I set !important to the rule...

Here is an example of my CSS :

.my-app h1{
    font-family: Rubik !important;
}

Does CSS injected by Chrome extension has less priority ? Or am I doing something wrong ?

cbdev
  • 243
  • 3
  • 12

0 Answers0