lishu / vscode-svg2

A vscode svg langauge support extension
MIT License
200 stars 10 forks source link

Please add external CSS file reference support #147

Closed SetTrend closed 1 year ago

SetTrend commented 1 year ago

Currently, external CSS files referenced by something this:

<svg xmlns="http://www.w3.org/2000/svg">
  <style>
    @import url('./my.css');
  </style>
</svg>

… are not supported. Preview doesn't show the styled result.

Please add support.

lishu commented 1 year ago

The new version has been implemented, but it is important to know that it cannot be updated in real time, and the CSS selector of the toolbar can be used to update in real time.

SetTrend commented 1 year ago

@lishu:

This is strange. So a manual refresh is necessary even when opening a fresh file?

Doesn't work:

SVG extension fails