From: Dominik Csapak <d.csapak@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [PATCH datacenter-manager 2/4] ui: css: use mask for svg icons
Date: Mon, 23 Mar 2026 12:03:39 +0100 [thread overview]
Message-ID: <20260323110728.1500528-3-d.csapak@proxmox.com> (raw)
In-Reply-To: <20260323110728.1500528-1-d.csapak@proxmox.com>
That way the color can be overwritten instead of relying on the svg
color and using invert for dark mode.
We already did this (somewhat) for the sdn icons, so do it here too.
Aligning of the icons to text isn't always perfect, but that is
something we can improve later too.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
ui/css/pdm.scss | 35 ++++++++++++++++++-----------------
1 file changed, 18 insertions(+), 17 deletions(-)
diff --git a/ui/css/pdm.scss b/ui/css/pdm.scss
index a15b4e8e..a6f25210 100644
--- a/ui/css/pdm.scss
+++ b/ui/css/pdm.scss
@@ -37,35 +37,38 @@
.fa-cpu::before {
content: " ";
- background-image: url(./images/icon-cpu.svg);
- background-size: 16px 16px;
- background-repeat: no-repeat;
+ mask-image: url(./images/icon-cpu.svg);
+ mask-size: 16px 16px;
+ mask-repeat: no-repeat;
width: 16px;
height: 16px;
vertical-align: bottom;
display: inline-block;
+ background-color: var(--pwt-color);
}
.fa-memory::before {
content: " ";
- background-image: url(./images/icon-memory.svg);
- background-size: 16px 16px;
- background-repeat: no-repeat;
+ mask-image: url(./images/icon-memory.svg);
+ mask-size: 16px 16px;
+ mask-repeat: no-repeat;
width: 16px;
height: 16px;
vertical-align: bottom;
display: inline-block;
+ background-color: var(--pwt-color);
}
.fa-cdrom::before {
content: " ";
- background-image: url(./images/icon-cd-drive.svg);
- background-size: 16px 16px;
- background-repeat: no-repeat;
+ mask-image: url(./images/icon-cd-drive.svg);
+ mask-size: 16px 16px;
+ mask-repeat: no-repeat;
width: 16px;
height: 16px;
vertical-align: bottom;
display: inline-block;
+ background-color: var(--pwt-color);
}
.fa-sdn-vnet::before {
@@ -93,6 +96,9 @@
}
.pwt-nav-menu .pwt-nav-link.active{
+ .fa-cdrom:before,
+ .fa-memory:before,
+ .fa-cpu:before,
.fa-sdn:before,
.fa-sdn-vnet:before {
background-color: var(--pwt-accent-color);
@@ -100,20 +106,15 @@
}
.pwt-panel-header-text{
+ .fa-cdrom:before,
+ .fa-memory:before,
+ .fa-cpu:before,
.fa-sdn:before,
.fa-sdn-vnet:before {
background-color: var(--pwt-accent-color-background);
}
}
-:root.pwt-dark-mode {
- .fa-cdrom,
- .fa-memory,
- .fa-cpu {
- filter: invert(90%);
- }
-}
-
.proxmox-content-spacer {
@include color-scheme-vars("surface");
color: var(--pwt-color);
--
2.47.3
next prev parent reply other threads:[~2026-03-23 11:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-23 11:03 [PATCH datacenter-manager 0/4] add resource gauge panels to dashboard/views Dominik Csapak
2026-03-23 11:03 ` [PATCH datacenter-manager 1/4] api: return global cpu/memory/storage statistics Dominik Csapak
2026-03-25 16:49 ` Thomas Lamprecht
2026-03-26 7:59 ` Dominik Csapak
2026-03-23 11:03 ` Dominik Csapak [this message]
2026-03-23 11:03 ` [PATCH datacenter-manager 3/4] ui: dashboard: add new gauge panels widget type Dominik Csapak
2026-03-23 11:03 ` [PATCH datacenter-manager 4/4] ui: dashboard: add resource gauges to default dashboard Dominik Csapak
2026-03-24 10:25 ` [PATCH datacenter-manager 0/4] add resource gauge panels to dashboard/views Lukas Wagner
2026-03-25 11:48 ` Thomas Lamprecht
2026-03-25 13:12 ` Dominik Csapak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260323110728.1500528-3-d.csapak@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pdm-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.