From 741c286df5f09ec6aa859be8ef33fffcd23de46b Mon Sep 17 00:00:00 2001 From: Denis Skripchenko Date: Thu, 19 Nov 2026 09:54:20 +0300 Subject: [PATCH] ProductSwitcher: a count keeps to its own segment Centred on the corner, a two-digit count covered the next product. Co-Authored-By: Claude Opus 5.5 --- .changeset/product-badge-inside.md | 5 +++++ src/patterns/ProductSwitcher/UidProductSwitcher.css | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100644 .changeset/product-badge-inside.md diff --git a/.changeset/product-badge-inside.md b/.changeset/product-badge-inside.md new file mode 100644 index 0000000..1ec7c0a --- /dev/null +++ b/.changeset/product-badge-inside.md @@ -0,0 +1,5 @@ +--- +'@dskripchenko/ui': patch +--- + +`UidProductSwitcher`: a product's count keeps to its own segment (its right edge on the segment's) instead of covering the next product when it is two or three digits wide. diff --git a/src/patterns/ProductSwitcher/UidProductSwitcher.css b/src/patterns/ProductSwitcher/UidProductSwitcher.css index 75de9d4..0ba5e5c 100644 --- a/src/patterns/ProductSwitcher/UidProductSwitcher.css +++ b/src/patterns/ProductSwitcher/UidProductSwitcher.css @@ -71,3 +71,14 @@ padding: 0 4px; font-size: 10px; } + +/* + * The segments stand side by side: a count centred on the corner (as on the + * bell) would cover the next product. Here it keeps to its own segment — its + * right edge on the segment's, «12» and «99+» growing over its own icon. + */ +.uid-product-switcher__badge.uid-notification-badge--top-right .uid-notification-badge__count, +.uid-product-switcher__badge.uid-notification-badge--top-right .uid-notification-badge__dot { + right: 0; + transform: translateY(-40%); +}