From: Dominik Csapak <d.csapak@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [PATCH datacenter-manager v2 2/4] ui: css: use mask for svg icons
Date: Mon, 30 Mar 2026 15:07:38 +0200 [thread overview]
Message-ID: <20260330131044.693709-3-d.csapak@proxmox.com> (raw)
In-Reply-To: <20260330131044.693709-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-30 13:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-30 13:07 [PATCH datacenter-manager v2 0/4] add resource gauge panels to dashboard/views Dominik Csapak
2026-03-30 13:07 ` [PATCH datacenter-manager v2 1/4] api: return global cpu/memory/storage statistics Dominik Csapak
2026-04-01 11:34 ` Lukas Wagner
2026-04-02 13:02 ` Dominik Csapak
2026-04-02 13:48 ` Lukas Wagner
2026-03-30 13:07 ` Dominik Csapak [this message]
2026-03-30 13:07 ` [PATCH datacenter-manager v2 3/4] ui: dashboard: add new gauge panels widget type Dominik Csapak
2026-04-01 11:34 ` Lukas Wagner
2026-04-01 11:36 ` Lukas Wagner
2026-03-30 13:07 ` [PATCH datacenter-manager v2 4/4] ui: dashboard: add resource gauges to default dashboard Dominik Csapak
2026-04-01 11:34 ` [PATCH datacenter-manager v2 0/4] add resource gauge panels to dashboard/views Lukas Wagner
2026-04-02 13:24 ` superseded: " 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=20260330131044.693709-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox