Next Planet of Monkeys

    svg-style-inliner

    0.0.2 • Public • Published

    svg-style-inliner

    A pure JavaScript utility to inline styles of all elements in an SVG. Useful to get accurate screenshots of SVGs with libs like html2canvas when using CSS for styling.

    This code was straight ripped from the NYT's excellent svg-crowbar.

    Use

    import inliner from 'svg-style-inliner';
     
    inliner(document.getElementById('your-svg'));

    Keywords

    none

    Install

    npm i svg-style-inliner

    DownloadsWeekly Downloads

    2

    Version

    0.0.2

    License

    ISC

    Last publish

    Collaborators

    • hobbes7878