{"id":21831414,"url":"https://github.com/nodef/svgdom-css","last_synced_at":"2026-05-11T04:43:17.985Z","repository":{"id":31977203,"uuid":"131114441","full_name":"nodef/svgdom-css","owner":"nodef","description":"Include custom CSS along svgdom.","archived":false,"fork":false,"pushed_at":"2023-10-15T11:34:18.000Z","size":107,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-26T09:15:50.817Z","etag":null,"topics":["css","dom","svg","svgdom"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/svgdom-css","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nodef.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-26T07:07:12.000Z","updated_at":"2022-04-09T13:14:51.000Z","dependencies_parsed_at":"2023-10-16T04:21:43.815Z","dependency_job_id":null,"html_url":"https://github.com/nodef/svgdom-css","commit_stats":{"total_commits":18,"total_committers":2,"mean_commits":9.0,"dds":0.05555555555555558,"last_synced_commit":"94a137ca64c0b0d350b66c30c954f5fe0bdc86fe"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodef%2Fsvgdom-css","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodef%2Fsvgdom-css/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodef%2Fsvgdom-css/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodef%2Fsvgdom-css/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nodef","download_url":"https://codeload.github.com/nodef/svgdom-css/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244803634,"owners_count":20512951,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["css","dom","svg","svgdom"],"created_at":"2024-11-27T19:10:19.796Z","updated_at":"2026-05-11T04:43:17.979Z","avatar_url":"https://github.com/nodef.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Include custom CSS along svgdom.\n\u003e I was using this to use [chartist] on node.js.\n\n\u003cbr\u003e\n\n```javascript\nconst css = require('svgdom-css');\nconst fs = require('fs');\n/* (a default window is defined) */\n// css(\u003ccss string\u003e)\n// -\u003e window\n\nvar customcss = '.ct-label { font-family: Courier; font-weight: bold; }';\nvar window1 = css(customcss);\n// -\u003e window\n\nvar path = require.resolve('chartist/dist/chartist.min.css');\nvar window2 = css(fs.readFileSync(path, 'utf8'));\n// -\u003e window\n\nvar window3 = css(customcss + fs.readFileSync(path, 'utf8'));\n/* (css overloading not supported, custom css must be included first!) */\n// -\u003e window\n```\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n\n## References\n\n- [svgdom :: Ulrich-Matthias Schäfer](https://www.npmjs.com/package/svgdom)\n- [stylis :: Sultan](https://www.npmjs.com/package/stylis)\n\n[chartist]: https://www.npmjs.com/package/chartist\n\n![](https://ga-beacon.deno.dev/G-RC63DPBH3P:SH3Eq-NoQ9mwgYeHWxu7cw/github.com/nodef/svgdom-css)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodef%2Fsvgdom-css","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnodef%2Fsvgdom-css","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodef%2Fsvgdom-css/lists"}