title: CSS: transform scale by pixel rather than proportion
body: <p>I have a bunch of cards on a page. They scale up on hover. The cards are of <strong>variable size</strong>, and some cards will scale up too much since the <strong>scale is a proportion</strong>. I would like to scale up less for a bigger card, and more for a smaller card. E.g, <strong>scaling up every card by, say, 10px.</strong></p>
  
  <p>Note that solutions changing the paddings etc aren't great because they don't cause the rest of the content to scale (e.g. font sizes etc).</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.container {
    display: flex;
    flex-direction: row;
    height: 100%;
    align-items: center;
  }
  
  .card {
    background: red;
    margin: 3rem;
    
  }
  
  .card:hover {
     transform: scale(1.25);
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="container"&gt;
  &lt;div class="card"&gt;
  Hello &lt;/div&gt;
  
  &lt;div class="card"&gt;
  Hello more text text text this is a lot of text we go on forever it never stops &lt;/div&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Note, in the snippet, how the right card appears to scale up much much more than the smaller one. Is there any <strong>CSS-only solution</strong> to this problem?</p>