1 import {Workflow} from "..";
3 export class DynamicStylesheet {
4 private styleElement: HTMLStyleElement;
5 private scopedSelector: string;
6 private innerStyle = "";
8 constructor(workflow: Workflow) {
10 this.styleElement = document.createElement("style");
11 this.styleElement.type = "text/css";
13 this.scopedSelector = `svg.${workflow.svgID}`;
15 document.getElementsByTagName("head")[0].appendChild(this.styleElement);
19 this.styleElement.remove();
23 this.innerStyle = style;
25 this.styleElement.innerHTML = `
26 ${this.scopedSelector} {