title: Canvas inline height and width attributes overridden with css styles. Is this is a bug?
body: <p>I recently <a href="https://stackoverflow.com/questions/13770118/html5-canvas-image-scaling-to-a-smaller-size-and-back-to-original">asked a question</a> on how to draw an image larger than my canvas onto the canvas without cropping and save the image back into its original dimensions after performing some changes on it. I found the solution is to set the inline <code>height</code> and <code>width</code> attributes for the canvas larger than the image, and use css <code>height</code> and <code>width</code> properties to style the canvas to fit into your layout.</p>
  
  <p>For example, assuming my images could range between 400px to 2000 px in dimensions. But I don't want the canvas to be so big, and I don't want the images to be cropped as well (because when saving the image with <code>toDataURL</code> what is on the canvas is what is saved). This is what works:</p>
  
  <pre><code>//style
  #mycanvas{
      width: 400px;
      height: 400px;
  }
  
  &lt;canvas id="mycanvas" width="2000" height="2000" /&gt;
  </code></pre>
  
  <p>This works fine and my images come out well.
  But is this behavior buggy and bound to be changed/fixed in the future? I'm planning to use this solution for a task at hand.</p>
  
  <p>Any guidance?</p>