title: Chrome Extension: How to remove content script CSS after injection?
body: <p>I need to remove CSS file <code>styles.css</code> injected from content_scripts (manifest.json)</p>
  
  <pre><code>"content_scripts": [{
    "matches": ["*://*.youtube.com/*"],
    "css": ["styles.css"],
    "js": ["jquery-3.1.1.min.js", "content.js"]
  }],
  </code></pre>
  
  <p>Some explanation for I want to do in my extension.</p>
  
  <p>At first <code>styles.css</code> is loaded and it changes some code on the page. It works.</p>
  
  <p>Then, the user wants to click on the button and turn off extension. It works.</p>
  
  <p>But then <code>styles.css</code> has to be removed. It doesn't work.</p>
  
  <p>And after some times user wants to turn on extension and <code>styles.css</code> has to be added again. </p>
  
  <p>When I tried to solve it like this:</p>
  
  <pre><code>var style = document.createElement('link');
  style.rel = 'stylesheet';
  style.type = 'text/css';
  style.href = chrome.extension.getURL('myStyles.css');
  (document.head||document.documentElement).appendChild(style);
  </code></pre>
  
  <p>it did not work well, because when the extension is getting started then page will be flicker for a few milliseconds.</p>