Item details styling reference
On this page
The item details are the text on an item’s row in the cart or on an order: the item name, with the code, description, and notes under it. You can change the size, weight, and color of each line of text, the space between the lines, etc. Follow the POS styling API rules when you style the item details.
Where the item details appear
The item details appear in these places:
- The rows of the cart, including a bundle row and the items in a bundle
- The card at the top of an item screen
- The item picker, when you choose what to fulfill
- The items and bundles on an order screen
On an item row in the cart, the item details are also named cart-item-card-details. Set a
property on cart-item-card-details to change the rows of the cart only. A bundle row and the rows
on an order have no separate name yet.
The notes under an item are labeled values, such as a status
that needs attention or an order being prepared. Alert notes are red, and success notes are green.
Neutral and primary notes have the same color as the item name. A color you set on
item-details-caption replaces the color of the note theme. The badge on a note has the tone of
the note theme. To style the loading dots, see the
loading dots styling reference.
Parts
| Part | What it is | Available from |
|---|---|---|
item-details-root |
The whole block: the item’s name over the code, description, and captions, and the space between them. | v22.0.17 |
item-details-name |
The item’s name, such as a product’s or a bundle’s. | v22.0.17 |
item-details-code |
The line under the name with the item’s product code and serial numbers, when there are any. | v22.0.17 |
item-details-description |
The line with how the item is fulfilled, the quantity and unit price, or why it was cancelled, when there is one. | v22.0.17 |
item-details-caption |
Each note under the item, such as a status that needs attention or an order being prepared. It is a labeled value, so the icon and badge are the labeled value’s parts. | v22.0.17 |
The Available from column shows the first release that carries the name.
Attributes
Narrow item-details-root by data-size, inside :where(), to style one size of item details,
and item-details-caption by data-theme to style one kind of note.
| Attribute | Values | Default | Available from |
|---|---|---|---|
data-size |
small, medium, large |
medium |
v22.0.17 |
item-details-caption[data-theme] |
neutral, primary, alert, success |
neutral |
v22.0.17 |
Each size has a different type for the name, and the large size also has a larger code. A type you
set on item-details-name applies at every size, so narrow by data-size to change one size
only. The name wraps to two lines at most, or one line on a bundle row in the cart. The code and
description are slightly dimmed, so set opacity when you set their color.
Component properties
Set this on item-details-root to change every item, or on cart-item-card-details to change the
rows of the cart only.
| Property | What it sets | Default | Available from |
|---|---|---|---|
--sc-item-details-gap |
The space between the lines. | 2px | v22.0.17 |
Examples
Each example is tested against the POS on every change.
“Make the item names bolder.”
```css
[part~=’item-details-name’] { font-weight: 700; } ```
“Make the names on the large rows bigger, and leave the rest.” Narrow by the size:
```css
font-size: 18px; line-height: 24px; } ```
“Make the codes and descriptions darker.”
```css
[part~=’item-details-code’], [part~=’item-details-description’] { opacity: 1; color: #334155; } ```
“Show the alert notes in our own red, and leave the other notes alone.” Narrow by the theme:
```css
color: #b42318; } ```
“Give the lines more room.”
```css
part~=’item-details-root’ { –sc-item-details-gap: 4px; } ```
What can’t be styled yet
- One item’s details on their own, beyond the rows of the cart: a bundle’s own row and the rows on an order have no name yet
- The name, code, description, or notes in the cart apart from those on an order: the parts reach both
- The tag beside the name, such as Partly paid on an order
- The promotions and discounts under an item
- The space between the name and the tag, and between the notes
- A note’s icon, badge, or loading dots for one theme apart from the text: the icon takes the
note’s color, the badge takes the theme’s tone, and
labeled-value-iconandlabeled-value-badgereach every note
Retired
None yet.
Was this article helpful?
Thanks for your feedback! It helps us improve our docs.