title: Center an element of a SVG mask
body: <p>I'm a newbie in SVG so it's probably an easy question. I'm trying to make an SVG Mask with a simple triangle shape inside a rectangle. What I want to achieve is to get the rectangle responsive with his width but the triangle should
  -  get a fixed size
  - be always at the center of the viewport</p>
  
  <p>You'll understand better with my snippet:</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>.header-arrow {
    height: 70px;
  }
  svg {
    height: inherit;
  }
  #arrow-down-alpha {
    transform: translateX(calc(50vw - 130px/2));
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="header-arrow"&gt;
    &lt;svg width="100%"&gt;
      &lt;defs&gt;
        &lt;mask id="myMask" x="0" y="0" width="100%" height="100%"&gt;
          &lt;rect fill="white" x="0" y="0" width="100%" height="100%" /&gt;
          &lt;polygon id="arrow-down-alpha" fill="black" x="00" y="0" width="165px" height="100%" points="55.91 37.8 111.81 0 0 0 55.91 37.8" /&gt;
        &lt;/mask&gt;
      &lt;/defs&gt;
  
      &lt;rect id="base-mask" mask="url(#myMask)" x="0" y="0" width="100%" height="100%" /&gt;
    &lt;/svg&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>It's workning right now in chrome, but the translateX (or translate) is not working in firefox and edge. I've tried to use the transform SVG attribute but it seems that I can't use percentages values.
  I'm not realy familiar with the viewbox but I'm not sure it will help in this case.</p>
  
  <p>Thanks anyway for any kind of help !</p>