svg-weirdness icon indicating copy to clipboard operation
svg-weirdness copied to clipboard

Safari filter and html base tag

Open wald-tq opened this issue 5 years ago • 0 comments

When using a html <base href="" /> tag svg filter attribute makes element invisible:

example code:

<html>
  <head>
    <base href="test"/> <!-- ######### remove this base tag to make it work ######  -->
  </head>
  <body>
<svg>
  <defs>
    <filter x="0" y="0" width="1" height="1" id="solid">
      <feFlood flood-color="white"/>
      <feComposite in="SourceGraphic"/>
    </filter>
  </defs>
  <path d="m20 20h150v10h-150" stroke="#000" stroke-miterlimit="10"/>
  <text filter="url(#solid)" fill="#c45" x="50" y="30" font-size="50px">tesst</text>
</svg>
  </body>
</html>

Probably related to #22

wald-tq avatar Jan 20 '20 09:01 wald-tq