Product and Discount badges are e-commerce badges.
How to add them to a page. The file is components/css/badge.css.
Link the shared file once per page. Never copy the rules.
| Step | What to do |
|---|---|
| 1. Link | <link rel="stylesheet" href="/components/css/badge.css">. Both templates already have it. |
| 2. Choose | Class badge-promo (Discount), badge-promo--closing or badge-promo--product. |
| 3. Group | Put Discount and Closing sale in badge-promo-group (next to each other) or badge-promo-stack (stacked). |
| Class | Use |
|---|---|
badge-promo | The badge. Red: Discount. |
badge-promo--closing | Black: Closing sale. |
badge-promo--product | Grey with a border: Product. |
badge-promo__icon | The icon (Material Symbols name as text, aria-hidden="true"), 14px. |
badge-promo-group | Wrapper: badges next to each other. |
badge-promo-stack | Wrapper: badges stacked, left-aligned. |
The component is one CSS file, shared by every page. Link it, never copy it.