Inkscape.org
Beginners' Questions Can I run CSS modifications to an SVG in Inkscape?
  1. #1
    Moult Moult @Moult

    I have generated an SVG file. If I include that SVG file in a webpage, I can include some CSS which will change the style of the SVG.

    Is it possible to open up the SVG file in Inkscape and also apply / view the results of the CSS styles without having to first place it in a webpage?

    In addition, is there a way to "bake" the CSS-modified results to the SVG file inside or outside (ideally command line) Inkscape?

  2. #2
    Maren Hachmann Maren Hachmann @Moini

    Yes, this is possible with Inkscape 1.0, as far as I know. Not sure if it will load external CSS files, but inside the SVG definitely works (and even has a GUI).

  3. #3
    Moult Moult @Moult

    Thank you Maren, is there a guide you can link me to? As Inkscape 1.0 is not yet released, would it be suitable for me to download a recent build? Is it stable enough for use?

  4. #4
    Maren Hachmann Maren Hachmann @Moini

    We don't have more than the release notes draft, currently, and that is still empty in the section for it:

    http://wiki.inkscape.org/wiki/index.php/Release_notes/1.0#Selectors_and_CSS

    You can either ask @jabiertxof in the chat for more info, or try it out and report back. I'd like it if the release notes draft contained all relevant info, but didn't have time (or motivation) to try everything out myself - unfortunately, developers don't seem to care enough about letting users know about their changes to drop some keywords to those who do.

    You can install the latest beta or the latest master, in parallel, if you want to. It is recommendable to use separate folders for the preferences, or at least separate preferences.xml files, so the new Inkscape cannot break them - it's not supposed to do that, but that part is also never really tested, so ...

    Use the environment variable INKSCAPE_PROFILE_DIR to set your preferences directory to a different one from your production version.

    The beta crashes on me regularly, more often than 0.92.x.

Inkscape Inkscape.org Inkscape Forum Beginners' Questions Can I run CSS modifications to an SVG in Inkscape?