[yew-devel] [PATCH proxmox-yew-widget-toolkit 1/1] space: fix space calculation for pwt units

Stefan Hanreich s.hanreich at proxmox.com
Thu Jan 30 19:29:26 CET 2025


The px here is unnecessary and causes the calc expression to be
invalid. Since pwt-spacer-base-width is already defined in px we can
simply remove it.

Signed-off-by: Stefan Hanreich <s.hanreich at proxmox.com>
---
 src/props/pwt_space.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/props/pwt_space.rs b/src/props/pwt_space.rs
index 6ea6cd4..c829796 100644
--- a/src/props/pwt_space.rs
+++ b/src/props/pwt_space.rs
@@ -13,7 +13,7 @@ pub enum PwtSpace {
 impl std::fmt::Display for PwtSpace {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
         match self {
-            PwtSpace::Pwt(v) => write!(f, "calc({v} * var(--pwt-spacer-base-width))px"),
+            PwtSpace::Pwt(v) => write!(f, "calc({v} * var(--pwt-spacer-base-width))"),
             PwtSpace::Px(v) => write!(f, "{v}px"),
             PwtSpace::Em(v) => write!(f, "{v}em"),
             PwtSpace::Fraction(v) => write!(f, "{}%", v * 100.0),
-- 
2.39.5




More information about the yew-devel mailing list