From 95cec85c3f1afe70ea12fb1c0ed45d3d9b0170ea Mon Sep 17 00:00:00 2001 From: Austin Mroz Date: Fri, 4 Oct 2024 13:42:16 -0500 Subject: [PATCH] Move css to style.css Since the the css is now static the clutter of an added style element is no longer needed --- src/assets/css/style.css | 21 ++++++++++++++++++ src/extensions/core/documentationSidebar.ts | 24 --------------------- 2 files changed, 21 insertions(+), 24 deletions(-) diff --git a/src/assets/css/style.css b/src/assets/css/style.css index 1e9596df4..d7de7d645 100644 --- a/src/assets/css/style.css +++ b/src/assets/css/style.css @@ -715,3 +715,24 @@ audio.comfy-audio.empty-audio-widget { .p-tree-node-content { padding: var(--comfy-tree-explorer-item-padding) !important; } + +.doc-node { + font-size: 1.5em +} +.doc-section { + background-color: var(--comfy-menu-bg) +} +.doc-item div { + margin-inline-start: 1vw; +} +@keyframes selectAnimation { + 0% { background-color: #5555} + 80% { background-color: #5555} + 100% { background-color: #0000} +} +.doc-item:focus { + animation: selectAnimation 2s; +} +.DocumentationIcon:before { + font-size: 1.5em; content: '?'; +} diff --git a/src/extensions/core/documentationSidebar.ts b/src/extensions/core/documentationSidebar.ts index 81ebb0c1e..9a304d559 100644 --- a/src/extensions/core/documentationSidebar.ts +++ b/src/extensions/core/documentationSidebar.ts @@ -158,30 +158,6 @@ function updateNode(node?) { } } } -let docStyleElement = document.createElement('style') -docStyleElement.innerHTML = ` -.doc-node { - font-size: 1.5em -} -.doc-section { - background-color: var(--comfy-menu-bg) -} -.doc-item div { - margin-inline-start: 1vw; -} -@keyframes selectAnimation { - 0% { background-color: #5555} - 80% { background-color: #5555} - 100% { background-color: #0000} -} -.doc-item:focus { - animation: selectAnimation 2s; -} -.DocumentationIcon:before { - font-size: 1.5em; content: '?'; -} -` -document.body.append(docStyleElement) var bringToFront class DocumentationSidebar implements CustomSidebarTabExtension {