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%); +}