Skip to content
Log in

Cart menu styling reference

On this page

The cart menu is the screen that opens over the cart when operators tap the cart’s menu button, with entries such as Add customer, Coupon code, and Place hold. The entries, the section headings that group them, and any actions your store adds come from the cart_menu action group (see POS action groups). You can change the space between the entries, the color of the section headings and the lines between sections, the fill of one section, the color of one kind of entry, etc. Follow the POS styling API rules when you style the cart menu.

Where the cart menu appears

The cart menu appears over the cart when operators tap the cart’s menu button. The cart menu contains these things:

  • The Back button at the top, which returns to the cart
  • The cart’s title and pictures, and the Empty or Cancel button
  • The entries from the cart_menu action group: each standard entry, such as Add customer or Place hold, and each action your store adds
  • A section for each Group item in the cart_menu action group, with the section heading and the entries under it

Each entry in the cart menu is a menu button, so it also carries the menu button part names and properties (see the menu button styling reference). The Back button is a button (see the button styling reference).

Parts

Part What it is Available from
cart-menu-root The whole cart menu screen, from the Back button at the top to the last entry. v22.0.19
cart-menu-back The Back button at the top of the screen, which returns to the cart. It is a button, so style it with the button properties. v22.0.19
cart-menu-list The list of entries under the cart’s title and pictures, with the sections and dividers. v22.0.19
cart-menu-section Each section: the heading and the entries under it. There is a section for each Group item in the menu, including a Group item inside a section. v22.0.19
cart-menu-heading The heading at the top of a section, with the line after the section’s name. v22.0.19
cart-menu-heading-label The section’s name in the heading: the Group item’s Display Name. v22.0.19
cart-menu-divider The line between a section and the entries after it that are not in a section. A menu with no sections has no dividers. v22.0.19
cart-menu-entry Each entry from the cart_menu action group, standard or added by your store, in a section or not, including the fulfillment entries such as Place hold. It is a menu button, so style it with the menu button properties. v22.0.19

The Available from column shows the first release that carries the name.

Attributes

To style one kind of entry or one section, narrow cart-menu-entry by data-action, and cart-menu-section by data-nested or data-section, inside :where().

Attribute Values Default Available from
cart-menu-entry[data-action] customer, notes, adjust-price, coupon, park, memo, assisted-by, save-and-exit, fulfillment, other other v22.0.19
cart-menu-section[data-nested] true, false false v22.0.19
cart-menu-section[data-section] Set by your store None v22.0.19
  • data-action — which standard entry the entry is: the entry’s action without cart:menu:, with - in place of _. For example, cart:menu:adjust_price is adjust-price. Every fulfillment entry is fulfillment, whatever the fulfillment type. An action your store adds is other.
  • data-nested — true on a section that comes from a Group item inside another section. The nested section appears at the same level as the others.
  • data-section — the Identifier of the section’s child action group, exactly as your store set it in Salesforce, such as cart_menu_pricing. The value doesn’t change when you rename or translate the heading. A section whose child group has no Identifier has no data-section, so fill in the Identifier to style that section alone. Give the child group an Identifier that names it for the menu, such as cart_menu_pricing. Some identifiers, such as cart_menu and register_actions, place a group on a POS screen, so a child group with one of those identifiers also appears on that screen. Quote the value: [data-section='cart_menu_pricing'].

Component properties

Set these on cart-menu-root.

Property What it sets Default Available from
--sc-cart-menu-gap The space between the entries, in the list and in each section. 4px v22.0.19
--sc-cart-menu-heading-color The color of a section’s heading. var(--sc-color-on-surface-variant) v22.0.19
--sc-cart-menu-divider-color The color of the dividers and of the line in each section’s heading. var(--sc-color-border-subtle) v22.0.19

Examples

Each example is tested against the POS on every change.

“Show the section headings and their lines in our brand color.”

```css

[part~=’cart-menu-root’] { –sc-cart-menu-heading-color: #0b5394; –sc-cart-menu-divider-color: #0b5394; } ```

“Give the entries more room.”

```css

[part~=’cart-menu-root’] { –sc-cart-menu-gap: 8px; } ```

“Make the section names bold and not in capitals.”

```css

[part~=’cart-menu-heading-label’] { font-weight: 700; text-transform: none; } ```

“Put the pricing section on a tinted panel.” The section’s child group has the Identifier cart_menu_pricing:

```css

background-color: #eef4fb; border-radius: 12px; } ```

“Show the fulfillment entries in our brand color.”

```css

–sc-menu-button-color: #0b5394; } ```

“Indent a section that sits inside another.”

```css

padding-left: 16px; } ```

“Show Park cart in red.”

```css

–sc-menu-button-color: #b3261e; } ```

“Make the Back button our brand color.”

```css

[part~=’cart-menu-back’] { –sc-button-color: #0b5394; } ```

What can’t be styled yet

  • One action your store adds apart from another, because action items have no Identifier
  • One fulfillment entry apart from another, such as Place hold apart from Arrange delivery
  • The cart’s title, the cart’s pictures, and the Empty or Cancel button above the list
  • The line in a section’s heading, apart from the line’s color

Retired

None yet.

Was this article helpful?

Was this article helpful?