From 512dd9f00d2cfef5f63b3cadb411ba6fbcd245a2 Mon Sep 17 00:00:00 2001 From: GitHub Copilot Date: Thu, 27 Aug 2026 19:21:42 +0200 Subject: [PATCH] [FIX] website_sale_aplicoop: restore the compact metrics on product tags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit .badge-km seeds --badge-padding-*, --badge-font-* and --badge-border-radius, but so does Bootstrap's own .badge rule, and this file is @imported — which the spec hoists above the rest of the bundle, so at equal specificity Bootstrap always came later and won. The tags rendered at Bootstrap's default metrics instead of the compact ones written here. Qualify the selector as .badge.badge-km (0,2,0). Measured on the card: 7.8/4.2px padding, 12px, 4px radius -> 4/2px, 11px, --ac-radius-sm, the values the rule asks for. The colour half needs no qualifier and keeps its own selector reach: Odoo only reads --background-color/--color/--bg-solid, it never sets them. Co-Authored-By: Claude Sonnet 5 --- .../static/src/css/components/product-card.css | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/website_sale_aplicoop/static/src/css/components/product-card.css b/website_sale_aplicoop/static/src/css/components/product-card.css index 5ec9e51..ae06318 100644 --- a/website_sale_aplicoop/static/src/css/components/product-card.css +++ b/website_sale_aplicoop/static/src/css/components/product-card.css @@ -198,7 +198,13 @@ border: Odoo 18 paints every .badge from those three and marks them !important, so a direct declaration here never lands. See the header of components/tag-filter.css for the full story. */ -.badge-km { +/* The `.badge` qualifier is load-bearing for the --badge-* half: Bootstrap's + own .badge rule seeds those same custom properties, and this file is + @imported, so at equal specificity Bootstrap comes later and wins — the + compact metrics below never applied. .badge.badge-km (0,2,0) settles it. + The --background-color/--color/--bg-solid half needs no qualifier: Odoo + only reads those, it never sets them. */ +.badge.badge-km { --badge-padding-x: var(--ac-space-2xs); --badge-padding-y: var(--ac-space-3xs); --badge-font-size: var(--ac-text-2xs);