POS product price styling reference
On this page
A product price is a product’s price: the amount to pay, the price before a discount beside it when there is one, struck through, and a short note under them, such as Variable pricing. Follow the POS styling API rules when styling it.
Where it appears
The prices on product cards, in product lists and on variants, at the top of a product’s screen and a bundle’s screen, on a bundle’s components, and on the running total of each group on a bundle’s screen. The prices in the cart are drawn differently, and styles written against these parts do not reach them.
A price inside a card takes the spacing between the lines and the note’s size from the card’s width. Most cards leave the price out at their two smallest sizes. A price a card shows as one of the card’s fields, as a product card does when the layout picks the fields, is drawn as a faint placeholder bar at the second smallest size instead.
Parts
| Part | What it is | Available from |
|---|---|---|
product-price-root |
The whole price: the amount, the original price beside it when there is a discount, and the caption under them. | v22.0.7 |
product-price-amount |
The price to pay. | v22.0.7 |
product-price-original |
The price before the discount, struck through, when there is one. | v22.0.7 |
product-price-caption |
A short note under the price, with an icon, such as Variable pricing, when there is one. | v22.0.7 |
The Available from column shows the first release that carries the name.
Attributes
Narrow product-price-root by this, inside :where(), to style one size of price.
| Attribute | Values | Default | Available from |
|---|---|---|---|
data-size |
small, base, large, xlarge |
base |
v22.0.7 |
Component properties
Set these on product-price-root to change every price.
| Property | What it sets | Default | Available from |
|---|---|---|---|
--sc-product-price-original-color |
The original price’s text color. | none | v22.0.7 |
--sc-product-price-original-text-decoration |
How the original price is struck through, such as none to show it plain. | line-through | v22.0.7 |
Examples
Each example is tested against the POS on every change.
“Make the prices bolder.”
```css
[part~=’product-price-amount’] { font-weight: 700; } ```
“Show the price before a discount in our brand color.”
```css
part~=’product-price-root’ { –sc-product-price-original-color: #0b5394; } ```
“Show the price before a discount plain on the biggest prices, and leave the rest struck through.” The prices at the top of a product’s or a bundle’s screen, and the total of each group on a bundle’s screen, are the extra-large size, so narrow by it:
```css
–sc-product-price-original-text-decoration: none; } ```
“Set the notes under prices in italics.”
```css
[part~=’product-price-caption’] { font-style: italic; } ```
What can’t be styled yet
- The prices on one screen on their own, such as only those on product cards: no screen gives a price a name yet
- The icon in the caption on its own
- The placeholder bar drawn in place of a price a card shows as one of the card’s fields
Retired
None yet.
Was this article helpful?
Thanks for your feedback! It helps us improve our docs.