title: html2canvas is not reading inline background-color style
body: <p>I am using html2canvas which works great except the background colour of the div is not being read when I use inline styling. However it does work when a style sheet is used, but as the colour is controlled by react, I need it to read the inline style preferably, can anyone help fix this pls?</p>
  
  <p>My html:<br/></p>
  
  <pre><code>&lt;div id="testDiv" class="page" style="width: 530px; height: 630px; background-color: red; position: relative;"&gt;...&lt;/div&gt;
  </code></pre>
  
  <p>My js:<br/></p>
  
  <pre><code>function getThumbnail = (div) =&gt; {
    return html2canvas(div).then(canvas =&gt; {
      return canvas.toDataURL();
    });
  }
  </code></pre>
  
  <p>The image is rendered with no background in the above code unless I add:</p>
  
  <pre><code>#testDiv {
    background-color: red;
  }
  </code></pre>
  
  <p>in a style sheet but then it is not easy to make the background variable.</p>
  
  <p>UPDATE: I've also tried using css variables but html2canvas does not pick up this styling either.</p>
  
  <pre><code>:root {
    --garment-colour: #000000;
  };
  
  #testDiv {
    background-color: var(--garment-colour);
  }
  </code></pre>