title: How to set CSS for embedded PDF viewer with CSP enabled
body: <p>I got the following problem:
  Having set</p>
  
  <pre><code>Content-Security-Policy style-src 'self' 
  </code></pre>
  
  <p>within .htacess file, chrome complains in the developer console when displaying PDF files linked like <code>&lt;a href="file.pdf"&gt;</code>.</p>
  
  <pre><code>Refused to apply inline style because it violates the following
  Content Security Policy directive: "style-src 'self'". Either the
  'unsafe-inline' keyword, a hash ('sha256-[deleted]'), or a nonce
  ('nonce-...') is required to enable inline execution.
  </code></pre>
  
  <p>I can also see that chrome applies some css to the PDF display:</p>
  
  <pre><code>element.style {
  background-color: rgb(38,38,38);
  height: 100%;
  width: 100%;
  overflow: hidden;
  margin: 0;
  }
  </code></pre>
  
  <p>Of course, the easy way would be to just change the CSP settings in .htaccess to</p>
  
  <pre><code>Content-Security-Policy style-src 'self' 'unsafe-inline'
  </code></pre>
  
  <p>but that would damage security. Also I hesitate to give a hash to code I can not control.
  So the question is:
  How do I specify CSS code for PDF files I link to?</p>