Merchant documentation

Custom CSS

Wishlist Zero renders the product save button as a Web Component with a Shadow DOM. Your theme's CSS cannot reach inside it, so use the Custom CSS field in the Wishlist Zero settings to style the component.

The CSS you add there is scoped to the button and does not affect the rest of your storefront.

Available selectors

SelectorTargets
:hostThe Wishlist Zero button component itself. Use it for placement, width, and component-level custom properties.
.wrapThe wrapper around the button and its confirmation message.
buttonThe product save button.
.iconThe heart, star, or bookmark icon inside the button.
.labelThe Save or Saved button text.
.noticeThe confirmation message displayed after a product is saved.
.notice aThe View wishlist link in the confirmation message.
.setup-noticeThe setup message shown in the Theme Editor when the block needs configuration.

Examples

Create a pill-shaped button

button {
  background: #0f172a;
  border: 1px solid #0f172a;
  border-radius: 999px;
  color: #ffffff;
  padding: 0.8rem 1.25rem;
}

button:hover {
  background: #10b981;
  border-color: #10b981;
}

Change the icon and label spacing

.icon {
  height: 1.25rem;
  width: 1.25rem;
}

.label {
  margin-inline-start: 0.5rem;
  font-weight: 600;
}

Style the saved confirmation

.notice {
  background: #ecfdf5;
  border-radius: 0.5rem;
  color: #065f46;
  margin-top: 0.75rem;
  padding: 0.75rem;
}

.notice a {
  color: inherit;
  font-weight: 700;
}

Make the button span its container

:host {
  display: block;
  width: 100%;
}

button {
  justify-content: center;
  width: 100%;
}

Tips