sharp
sharp copied to clipboard
SVG with transform-origin property
code
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 300" xml:lang="fa">
<rect x="0" y="0" width="300" height="300" fill="white"/>
<g transform="scale(-1, 1)" transform-origin="center">
<rect x="50%" y="35" width="39" height="30" fill="#007BA4" transform="scale(1, 1)" transform-origin="center"/>
<text x="50%" y="35" transform="translate(19.5, 15) scale(-1, 1)" transform-origin="center" text-anchor="middle" dy="4" fill="white">-13</text>
</g>
</svg>
Chrome

output

Hi, the transform-origin property is SVG2 and part of the CSS Transforms Module - please see https://gitlab.gnome.org/GNOME/librsvg/-/issues/754