From 266c3c4f5e27f7a24d73193582de1fe795ba5dc3 Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Wed, 28 Aug 2024 09:23:03 +0200 Subject: [PATCH] Allow to change badge size and border radius --- src/badges/template/template-badge.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/badges/template/template-badge.ts b/src/badges/template/template-badge.ts index 684d4574..30215db6 100644 --- a/src/badges/template/template-badge.ts +++ b/src/badges/template/template-badge.ts @@ -289,12 +289,15 @@ export class HuiEntityBadge extends LitElement implements LovelaceBadge { align-items: center; justify-content: center; gap: 8px; - height: 36px; - min-width: 36px; + height: var(--ha-badge-size, 36px); + min-width: var(--ha-badge-size, 36px); padding: 0px 8px; box-sizing: border-box; width: auto; - border-radius: 18px; + border-radius: var( + --ha-badge-border-radius, + calc(var(--ha-badge-size, 36px) / 2) + ); background-color: var(--card-background-color, white); border-width: var(--ha-card-border-width, 1px); box-shadow: var(--ha-card-box-shadow, none);