From 5d9f36129dea098a239a564121dbf5730dfb4987 Mon Sep 17 00:00:00 2001 From: Zack Spear Date: Mon, 31 Mar 2025 19:28:06 -0700 Subject: [PATCH] style: delete duplicate theme-specific CSS files and update VMTemplates.css to use CSS variables for background colors, enhancing maintainability and consistency across themes --- .../sheets/VMTemplates-azure.css | 1 - .../sheets/VMTemplates-black.css | 2 -- .../sheets/VMTemplates-gray.css | 2 -- .../sheets/VMTemplates-white.css | 2 -- .../dynamix.vm.manager/sheets/VMTemplates.css | 26 ++++++++++++++++++- 5 files changed, 25 insertions(+), 8 deletions(-) delete mode 100644 emhttp/plugins/dynamix.vm.manager/sheets/VMTemplates-azure.css delete mode 100644 emhttp/plugins/dynamix.vm.manager/sheets/VMTemplates-black.css delete mode 100644 emhttp/plugins/dynamix.vm.manager/sheets/VMTemplates-gray.css delete mode 100644 emhttp/plugins/dynamix.vm.manager/sheets/VMTemplates-white.css diff --git a/emhttp/plugins/dynamix.vm.manager/sheets/VMTemplates-azure.css b/emhttp/plugins/dynamix.vm.manager/sheets/VMTemplates-azure.css deleted file mode 100644 index f5548270d..000000000 --- a/emhttp/plugins/dynamix.vm.manager/sheets/VMTemplates-azure.css +++ /dev/null @@ -1 +0,0 @@ -.fileTree{background:#f2f2f2;width:300px;max-height:150px;overflow-y:scroll;overflow-x:hidden;position:absolute;z-index:100;display:none} \ No newline at end of file diff --git a/emhttp/plugins/dynamix.vm.manager/sheets/VMTemplates-black.css b/emhttp/plugins/dynamix.vm.manager/sheets/VMTemplates-black.css deleted file mode 100644 index bc79e2b47..000000000 --- a/emhttp/plugins/dynamix.vm.manager/sheets/VMTemplates-black.css +++ /dev/null @@ -1,2 +0,0 @@ -.fileTree{background:#1c1c1c;width:300px;max-height:150px;overflow-y:scroll;overflow-x:hidden;position:absolute;z-index:100;display:none} - diff --git a/emhttp/plugins/dynamix.vm.manager/sheets/VMTemplates-gray.css b/emhttp/plugins/dynamix.vm.manager/sheets/VMTemplates-gray.css deleted file mode 100644 index bc79e2b47..000000000 --- a/emhttp/plugins/dynamix.vm.manager/sheets/VMTemplates-gray.css +++ /dev/null @@ -1,2 +0,0 @@ -.fileTree{background:#1c1c1c;width:300px;max-height:150px;overflow-y:scroll;overflow-x:hidden;position:absolute;z-index:100;display:none} - diff --git a/emhttp/plugins/dynamix.vm.manager/sheets/VMTemplates-white.css b/emhttp/plugins/dynamix.vm.manager/sheets/VMTemplates-white.css deleted file mode 100644 index e93340e20..000000000 --- a/emhttp/plugins/dynamix.vm.manager/sheets/VMTemplates-white.css +++ /dev/null @@ -1,2 +0,0 @@ -.fileTree{background:#f2f2f2;width:300px;max-height:150px;overflow-y:scroll;overflow-x:hidden;position:absolute;z-index:100;display:none} - diff --git a/emhttp/plugins/dynamix.vm.manager/sheets/VMTemplates.css b/emhttp/plugins/dynamix.vm.manager/sheets/VMTemplates.css index 2d4a912a7..1c300ed3d 100644 --- a/emhttp/plugins/dynamix.vm.manager/sheets/VMTemplates.css +++ b/emhttp/plugins/dynamix.vm.manager/sheets/VMTemplates.css @@ -1,9 +1,20 @@ +.Theme--gray:root, +.Theme--black:root { + --filetree-background: #1c1c1c; +} + +.Theme--azure:root, +.Theme--white:root { + --filetree-background: #f2f2f2; +} + .vmheader { padding: 10px; font-size: 1.4rem; text-align: left; color: var(--gray-500); /* Condensed from: #888 */ } + .vmtemplate { display: inline-block; width: 80px; @@ -13,10 +24,12 @@ text-align: center; vertical-align: top; } + .vmtemplate img { width: 48px; height: 48px; } + .vmtemplate p { text-align: center; margin-top: 8px; @@ -26,5 +39,16 @@ div.template, div#dialogWindow, input#upload { - display:none; + display: none; +} + +.fileTree { + background: var(--filetree-background); + width: 300px; + max-height: 150px; + overflow-y: scroll; + overflow-x: hidden; + position: absolute; + z-index: 100; + display: none; }