JSFiddle - React, Tailwind, and code Playground

HTML

<svg xmlns="http://www.w3.org/2000/svg" viewBox="-100,-100,200,200">
  <polygon points="-50,-50 50,-50 50,50 -50,50" />
  <text id="nw" x="-50" y="-52">A</text>
  <text id="ne" transform="translate(50,-52) skewY(20)">B</text>
  <text id="sw" transform="translate(-50,60)">C</text>
  <text id="se" transform="translate(52,50) rotate(90)">D</text>
</svg>

<p>This example courtesy of <a href="http://stackoverflow.com/q/23645150/405017">this Stack Overflow question</a>. The desire is to keep the text the same size on screen as the viewBox zooms in and out, while maintaining transformations such as rotations and skews.</p>

CSS

svg { width:500px; height:400px; display:block; margin:1em auto; border:1px solid #ccc }
polygon {
    fill:none; stroke:black; opacity:0.3;
    stroke-width:1px; vector-effect:non-scaling-stroke
}
circle { fill:red; opacity:0.1 }
text { font-size:12px; text-anchor:middle }

JavaScript

setInterval(function(){
    var s = 300*(Math.cos(new Date/1000)+1)/2+75;
    document.querySelector('svg').setAttribute('viewBox',[-s,-s,s*2,s*2].join(' '));
},50);