title: CSS triangle that doesn't work like a square?
body: <p>I am wondering is there actually any way to create a triangle with a true triangle shape? Or a way to fake it to get as close as possible?</p>
  
  <p>Whenever you draw a triangle with something like svg you are always stuck with a transparent triangle that is mirrored because elements are being drawn as boxes.</p>
  
  <p>I made an example because I find it hard to explain this:</p>
  
  <p><a href="http://codepen.io/stephan-v/pen/gaxdjm" rel="nofollow noreferrer">http://codepen.io/stephan-v/pen/gaxdjm</a></p>
  
  <p><div class="snippet" data-lang="js" data-hide="true" data-console="false" data-babel="false">
  <div class="snippet-code snippet-currently-hidden">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>svg {
    width: 100px;
    height: 100px;
    position: absolute;
    right: 0;
    top: 0;
  }
  svg polygon {
    fill: rgba(168, 210, 71, 0.6);
    cursor: pointer;
  }
  svg polygon:hover {
    fill: rgba(168, 210, 71, 0.9);
    cursor: pointer;
  }
  article {
    position: relative;
    width: 200px;
    height: 200px;
    background-color: whitesmoke;
    border: 1px solid lightgrey;
  }
  article a {
    display: block;
    width: 100%;
    height: 100%;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;article&gt;
    &lt;a href="#"&gt;
    &lt;/a&gt;
    &lt;svg&gt;
      &lt;polygon points="0,0 100,0 100,100" /&gt;
    &lt;/svg&gt;
  &lt;/article&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I made the entire article a link and the svg triangle a link as well. But because the triangle is being rendered as a block there is a small part that is exactly the mirror image of the triangle that is not clickable.</p>
  
  <p>For a project I would like to remove the part that cannot be clicked. That is the part in red:</p>
  
  <p><a href="https://i.stack.imgur.com/XqCnM.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XqCnM.jpg" alt="triangle with a mirrored square"></a></p>